Gift Card Validations
Operations related to validating gift cards.
Checks the validity of a gift card based on its code and the value intended to be used.
Authorizations
Query parameters
gift_card_codestringRequiredExample:
The code of the gift card to validate.
GIFT0C307PBFJC3A5
value_usedstringRequiredExample:
The amount of value to be used from the gift card.
100
Responses
200
The validation result and details of the gift card.
application/json
400
Bad Request. Missing or invalid query parameters.
401
Unauthorized. The request lacks valid authentication credentials.
404
Not Found. A gift card with the specified code does not exist.
get
GET /gift-cards/validate HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
"validation_status": {
"status": 1000,
"message": "Gift Card is valid"
},
"data": {
"href": "https://example.com",
"type": "text",
"id": "text",
"gift_card_code": "text",
"tag": "text",
"created": 1,
"start_time": 1,
"expiry_time": 1,
"total_value": "text",
"balance": "text",
"value_unit": "text",
"currency": "text",
"active_status": "text",
"brand_id": "text",
"teams": [
"text"
],
"brands": [],
"metadata": {
"from_name": "text",
"from_email": "name@gmail.com",
"to_name": "text",
"to_email": "name@gmail.com",
"to_phone": "text",
"message": "text"
}
}
}
Checks the validity of a specific gift card by its ID and the value intended to be used.
Authorizations
Path parameters
gift_card_idstringRequiredExample:
The unique identifier of the gift card to validate.
gift-148061360458405ee43a1a8
Query parameters
value_usedstringRequiredExample:
The amount of value to be used from the gift card.
100
Responses
200
The validation result and details of the gift card.
application/json
400
Bad Request. Missing or invalid query parameter.
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}/validate HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
"validation_status": {
"status": 1000,
"message": "Gift Card is valid"
},
"data": {
"href": "https://example.com",
"type": "text",
"id": "text",
"gift_card_code": "text",
"tag": "text",
"created": 1,
"start_time": 1,
"expiry_time": 1,
"total_value": "text",
"balance": "text",
"value_unit": "text",
"currency": "text",
"active_status": "text",
"brand_id": "text",
"teams": [
"text"
],
"brands": [],
"metadata": {
"from_name": "text",
"from_email": "name@gmail.com",
"to_name": "text",
"to_email": "name@gmail.com",
"to_phone": "text",
"message": "text"
}
}
}