Coupon Redemptions
Operations related to coupon redemptions.
Retrieves a list of all redemptions for a specific coupon.
HTTP Basic Authentication. The username is your Merchant ID and the password is your API Key. The combined string Merchant_Id:Api_Key should be Base64 encoded.
The ID of the coupon for which to retrieve redemptions.
cpn-1502288320598b19c0d59fdA successful response returns a list of redemption objects.
Unauthorized. The API Key or Merchant ID is missing or invalid.
Not Found. The coupon with the specified ID does not exist.
Internal Server Error.
GET /coupons/{couponId}/redemptions HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
"href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions",
"count": 2,
"data": [
{
"href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-150507097559b58f7f8b276",
"type": "redemption",
"id": "res-150507097559b58f7f8b276",
"coupon_id": "cpn-1502288320598b19c0d59fd",
"user_id": "12",
"customer_id": "cust-149000628058cfb1084467c",
"user_email": "",
"user_phone": "",
"transaction_id": "",
"value_used": "",
"team_id": "E57BB2DOKBW",
"created": 1505070975
},
{
"href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-1502473727598dedff485f1",
"type": "redemption",
"id": "res-1502473727598dedff485f1",
"coupon_id": "cpn-1502288320598b19c0d59fd",
"user_id": "1",
"customer_id": "cust-148976158458cbf53023141",
"user_email": "vaibhav571@gmail.com",
"user_phone": "",
"transaction_id": "10",
"value_used": "300.00",
"team_id": "",
"created": 1502473727
}
]
}Redeems a coupon for a specific user. While only user_id is mandatory, providing more details is recommended for better tracking.
HTTP Basic Authentication. The username is your Merchant ID and the password is your API Key. The combined string Merchant_Id:Api_Key should be Base64 encoded.
The ID of the coupon to redeem.
cpn-1502288320598b19c0d59fdThe unique identifier for the user redeeming the coupon.
The email address of the user.
The phone number of the user.
The identifier for the transaction this redemption is part of.
The value used in this specific transaction.
Successful redemption. Returns the created redemption object.
Bad Request. The redemption is invalid (e.g., coupon expired, redemption limit reached).
Unauthorized. The API Key or Merchant ID is missing or invalid.
Not Found. The coupon with the specified ID does not exist.
Internal Server Error.
POST /coupons/{couponId}/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/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-150675935459cf52bad9207",
"type": "redemption",
"id": "res-150675935459cf52bad9207",
"coupon_id": "cpn-1502288320598b19c0d59fd",
"user_id": "123",
"customer_id": "cust-150614516859c5f39002a4a",
"user_email": "test@vauchar.com",
"user_phone": "82383209830",
"transaction_id": "transa001",
"value_used": "50.00",
"team_id": "",
"created": 1506759354
}Retrieves the details of a specific redemption by providing the coupon ID and redemption ID.
HTTP Basic Authentication. The username is your Merchant ID and the password is your API Key. The combined string Merchant_Id:Api_Key should be Base64 encoded.
The ID of the coupon.
cpn-1502288320598b19c0d59fdThe ID of the redemption to retrieve.
res-1502473727598dedff485f1A successful response returns the specified redemption object.
Unauthorized. The API Key or Merchant ID is missing or invalid.
Not Found. The redemption with the specified ID could not be found.
Internal Server Error.
GET /coupons/{couponId}/redemptions/{redemptionId} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
"href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-1502473727598dedff485f1",
"data": {
"href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-1502473727598dedff485f1",
"type": "redemption",
"id": "res-1502473727598dedff485f1",
"coupon_id": "cpn-1502288320598b19c0d59fd",
"user_id": "1",
"customer_id": "cust-148976158458cbf53023141",
"user_email": "vaibhav571@gmail.com",
"user_phone": "",
"transaction_id": "10",
"value_used": "300.00",
"team_id": "",
"created": 1502473727
}
}Deletes a specific coupon redemption. This can be useful for correcting mistaken redemptions.
HTTP Basic Authentication. The username is your Merchant ID and the password is your API Key. The combined string Merchant_Id:Api_Key should be Base64 encoded.
The ID of the coupon.
cpn-1502288320598b19c0d59fdThe ID of the redemption to delete.
res-150675935459cf52bad9207No Content. The redemption was successfully deleted.
Unauthorized. The API Key or Merchant ID is missing or invalid.
Not Found. The redemption with the specified ID could not be found.
Internal Server Error.
DELETE /coupons/{couponId}/redemptions/{redemptionId} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
No content
Last updated