Voucher Redemptions
Operations related to voucher redemptions.
Retrieves a list of all redemptions for a specific voucher.
Basic Authentication using Merchant ID as username and API Key as password.
The ID of the voucher to retrieve redemptions for.
vcr-150659959859cce2ae044b5A successful response returning a list of redemptions.
The URI for the collection of redemptions.
https://api.vauchar.com/vouchers/vcr-150659959859cce2ae044b5/redemptionsUnauthorized. 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.
Basic Authentication using Merchant ID as username and API Key as password.
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.
The unique URI for the redemption resource.
https://api.vauchar.com/vouchers/vcr-150659959859cce2ae044b5/redemptions/res-150660197859ccebfa8b218The type of the object.
redemptionThe unique identifier for the redemption.
res-150660197859ccebfa8b218The ID of the voucher that was redeemed.
vcr-150659959859cce2ae044b5The ID of the user who made the redemption.
user001The ID of the customer associated with the redemption.
cust-150658890659ccb8ea8b387The email of the user.
The phone number of the user.
The ID of the associated transaction.
The value used in this redemption.
185.00The ID of the team associated with the redemption.
The timestamp when the redemption occurred.
1506601978Bad 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.
Basic Authentication using Merchant ID as username and API Key as password.
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