Voucher Validations
Operations related to validating voucher codes.
Checks the validity of a voucher code and returns its details if valid.
Authorizations
Query parameters
voucher_codestringRequiredExample:
The voucher code to validate.
E57BB0J3EH6R2
Responses
200
Voucher validation status and details.
application/json
401
Unauthorized. The API key or Merchant ID is invalid or missing.
404
Voucher code not found or is invalid.
500
Internal Server Error.
get
GET /vouchers/validate HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
"validation_status": {
"status": 1000,
"message": "Voucher is valid"
},
"data": {
"href": "https://api.vauchar.com/vouchers/vcr-150659959859cce2ae044b5",
"type": "voucher",
"id": "vcr-150659959859cce2ae044b5",
"voucher_code": "E57BBO2ASPF25",
"tag": "text",
"created": 1506599598,
"start_time": 1506579300,
"expiry_time": 1509474600,
"value": "50.00",
"value_unit": "percentage",
"currency": "USD",
"redeemed": 1,
"redeemed_date": 1506601978,
"teams": [
"text"
],
"brands": [
"text"
]
}
}
Checks the validity of a specific voucher by its ID.
Authorizations
Path parameters
voucherIdstringRequiredExample:
The ID of the voucher to validate.
vcr-150676308659cf614e36e1e
Responses
200
Voucher validation status and details.
application/json
401
Unauthorized. The API key or Merchant ID is invalid or missing.
404
Voucher not found.
500
Internal Server Error.
get
GET /vouchers/{voucherId}/validate HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
"validation_status": {
"status": 1000,
"message": "Voucher is valid"
},
"data": {
"href": "https://api.vauchar.com/vouchers/vcr-150659959859cce2ae044b5",
"type": "voucher",
"id": "vcr-150659959859cce2ae044b5",
"voucher_code": "E57BBO2ASPF25",
"tag": "text",
"created": 1506599598,
"start_time": 1506579300,
"expiry_time": 1509474600,
"value": "50.00",
"value_unit": "percentage",
"currency": "USD",
"redeemed": 1,
"redeemed_date": 1506601978,
"teams": [
"text"
],
"brands": [
"text"
]
}
}