Voucher Redemptions
Operations related to voucher redemptions.
Retrieves a list of all redemptions for a specific voucher.
The ID of the voucher to retrieve redemptions for.
vcr-150659959859cce2ae044b5A successful response returning a list of redemptions.
Unauthorized. The API key or Merchant ID is invalid or missing.
Voucher not found.
Internal Server Error.
GET /vouchers/{voucherId}/redemptions HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
"href": "https://api.vauchar.com/vouchers/vcr-150659959859cce2ae044b5/redemptions",
"data": [
{
"href": "https://api.vauchar.com/vouchers/vcr-150659959859cce2ae044b5/redemptions/res-150660197859ccebfa8b218",
"type": "redemption",
"id": "res-150660197859ccebfa8b218",
"voucher_id": "vcr-150659959859cce2ae044b5",
"user_id": "user001",
"customer_id": "cust-150658890659ccb8ea8b387",
"user_email": "text",
"user_phone": "text",
"transaction_id": "text",
"value_used": "185.00",
"team_id": "text",
"created": 1506601978
}
]
}Redeems a voucher against a transaction.
The ID of the voucher to redeem.
vcr-150676308659cf614e2f56eThe ID of the user making the redemption.
123The email address of the user.
test@vauchar.comThe phone number of the user.
82383209830An external transaction ID for tracking.
transa001The value of the voucher being used in this transaction.
50Redemption successful. Returns the details of the redemption.
Bad Request. The request body is invalid or the voucher is not valid for redemption.
Unauthorized. The API key or Merchant ID is invalid or missing.
Voucher not found.
Internal Server Error.
POST /vouchers/{voucherId}/redemptions HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 121
{
"user_id": "123",
"user_email": "test@vauchar.com",
"user_phone": "82383209830",
"transaction_id": "transa001",
"value_used": 50
}{
"href": "https://api.vauchar.com/vouchers/vcr-150659959859cce2ae044b5/redemptions/res-150660197859ccebfa8b218",
"type": "redemption",
"id": "res-150660197859ccebfa8b218",
"voucher_id": "vcr-150659959859cce2ae044b5",
"user_id": "user001",
"customer_id": "cust-150658890659ccb8ea8b387",
"user_email": "text",
"user_phone": "text",
"transaction_id": "text",
"value_used": "185.00",
"team_id": "text",
"created": 1506601978
}Deletes a specific voucher redemption. This is useful for reversing a redemption.
The ID of the voucher associated with the redemption.
vcr-150676308659cf614e2f56eThe ID of the redemption to delete.
res-150676438959cf6665717f4Redemption deleted successfully. No content is returned.
No content
Unauthorized. The API key or Merchant ID is invalid or missing.
Voucher or Redemption not found.
Internal Server Error.
DELETE /vouchers/{voucherId}/redemptions/{redemptionId} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
No content
Last updated