Gift Card Redemptions
Operations related to gift card redemptions.
Retrieves the redemption history for a specific gift card.
Authorizations
Path parameters
gift_card_idstringRequiredExample:
The unique identifier of the gift card.
gift-148061212058405918eee94
Responses
200
A successful response with the gift card's redemption history.
application/json
401
Unauthorized. The request lacks valid authentication credentials.
404
Not Found. A gift card with the specified ID does not exist.
get
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.
Authorizations
Path parameters
gift_card_idstringRequiredExample:
The unique identifier of the gift card to redeem.
gift-148061360458405ee43a1a8
Body
user_idstringOptional
user_emailstring · emailOptional
user_phonestringOptional
value_usednumberRequired
The amount of value to be used from the gift card.
Responses
201
Redemption created successfully.
application/json
400
Bad Request. The request body is invalid or the gift card cannot be redeemed.
401
Unauthorized. The request lacks valid authentication credentials.
404
Not Found. A gift card with the specified ID does not exist.
post
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.
Authorizations
Path parameters
gift_card_idstringRequiredExample:
The unique identifier of the gift card.
gift-148061360458405ee43a1a8
redemption_idstringRequiredExample:
The unique identifier of the redemption.
res-148061693358406be5cbe66
Responses
200
A successful response with the redemption details.
application/json
401
Unauthorized. The request lacks valid authentication credentials.
404
Not Found. A redemption with the specified ID does not exist.
get
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.
Authorizations
Path parameters
gift_card_idstringRequiredExample:
The unique identifier of the gift card.
gift-148061360458405ee43a1a8
redemption_idstringRequiredExample:
The unique identifier of the redemption to delete.
res-148061693358406be5cbe66
Responses
204
No Content. The redemption was successfully deleted.
401
Unauthorized. The request lacks valid authentication credentials.
404
Not Found. The specified redemption does not exist.
delete
DELETE /gift-cards/{gift_card_id}/redemptions/{redemption_id} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
No content