Coupon Redemptions
Operations related to coupon redemptions.
Retrieves a list of all redemptions for a specific coupon.
The ID of the coupon for which to retrieve redemptions.
cpn-1502288320598b19c0d59fd
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.
The ID of the coupon to redeem.
cpn-1502288320598b19c0d59fd
The 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.
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.
The ID of the coupon.
cpn-1502288320598b19c0d59fd
The ID of the redemption to retrieve.
res-1502473727598dedff485f1
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.
The ID of the coupon.
cpn-1502288320598b19c0d59fd
The ID of the redemption to delete.
res-150675935459cf52bad9207
DELETE /coupons/{couponId}/redemptions/{redemptionId} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
No content