Gift Card Redemptions
Operations related to gift card redemptions.
Retrieves the redemption history for a specific gift card.
The unique identifier of the gift card.
gift-148061212058405918eee94A successful response with the gift card's redemption history.
Unauthorized. The request lacks valid authentication credentials.
Not Found. A gift card with the specified ID does not exist.
GET /gift-cards/{gift_card_id}/redemptions HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
"href": "https://example.com",
"data": [
{
"href": "https://example.com",
"type": "redemption",
"id": "text",
"gift_card_id": "text",
"user_id": "text",
"user_email": "name@gmail.com",
"user_phone": "text",
"transaction_id": "text",
"value_used": "text",
"created": 1
}
]
}Redeems a specific gift card by its ID.
The unique identifier of the gift card to redeem.
gift-148061360458405ee43a1a8The amount of value to be used from the gift card.
Redemption created successfully.
Bad Request. The request body is invalid or the gift card cannot be redeemed.
Unauthorized. The request lacks valid authentication credentials.
Not Found. A gift card with the specified ID does not exist.
POST /gift-cards/{gift_card_id}/redemptions HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 97
{
"user_id": "user001",
"user_email": "user1@vauchar.com",
"user_phone": "91100911100",
"value_used": 50
}{
"href": "https://example.com",
"type": "redemption",
"id": "text",
"gift_card_id": "text",
"user_id": "text",
"user_email": "name@gmail.com",
"user_phone": "text",
"transaction_id": "text",
"value_used": "text",
"created": 1
}Retrieves the details of a single gift card redemption.
The unique identifier of the gift card.
gift-148061360458405ee43a1a8The unique identifier of the redemption.
res-148061693358406be5cbe66A successful response with the redemption details.
Unauthorized. The request lacks valid authentication credentials.
Not Found. A redemption with the specified ID does not exist.
GET /gift-cards/{gift_card_id}/redemptions/{redemption_id} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
"href": "https://example.com",
"data": {
"href": "https://example.com",
"type": "redemption",
"id": "text",
"gift_card_id": "text",
"user_id": "text",
"user_email": "name@gmail.com",
"user_phone": "text",
"transaction_id": "text",
"value_used": "text",
"created": 1
}
}Permanently deletes a specific gift card redemption.
The unique identifier of the gift card.
gift-148061360458405ee43a1a8The unique identifier of the redemption to delete.
res-148061693358406be5cbe66No Content. The redemption was successfully deleted.
No content
Unauthorized. The request lacks valid authentication credentials.
Not Found. The specified redemption does not exist.
DELETE /gift-cards/{gift_card_id}/redemptions/{redemption_id} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
No content
Last updated