This API allows you to redeem coupons issued to the loyalty customer. For all redeem coupon APIs event notification is only initiated when a redemption request contains a single coupon. If the request includes multiple coupons, the event will not be triggered.
Example request
curl --location 'https://eu.api.capillarytech.com/v1.1/coupon/redeem' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'Authorization: Basic bWFkaHVU2YQ==' \
--header 'Cookie: _cfuvid=n1F4JDvsnWvJO70uTvPplsrYQNylI_1WnW5hyjv7SmA-1759129564236-0.0.1.1-604800000' \
--data '{
"root": {
"coupon": [
{
"code": "UZHYF",
"customer": {
"mobile": "9999988886"//,
// "email": "[email protected]",
// "external_id": "0000011110"
},
// "custom_fields": {
// "field": [
// {
// "name": "Sport",
// "value": "Soccer"
// },
// {
// "name": "custom_field2",
// "value": "50"
// }
// ]
// },
"transaction": [
{
// "number": "test00transact068",
"amount": "5000"
}
]
}
]
}
}
'
Prerequisites
- Authentication: Basic or OAuth authentication
- Default access group
Resource information
URI | /v1.1/coupon/redeem |
HTTP method | POST |
Pagination | NA |
Rate limit | 1000 |
Batch support | NA |
Request body
Parameter | Type | Description |
---|---|---|
customer | obj | Pass any registered identifier type.
Supported identifiers:
|
code | string | Coupon code that need to be redeemed. |
validation_code | string | Validation code is required for the orgs that use validation based redemption. |
number | string | Transaction number against which the coupon needs to be redeemed. |
amount | double | Transaction amount against which the coupon is redeemed. |
custom_fields | obj | Coupon redemption level custom fields. |
name | string | Name of the custom field. |
value | string | Custom field value. |
Example response
{
"response": {
"status": {
"success": "true",
"code": 200,
"message": "Success"
},
"coupons": {
"coupon": {
"customer": {
"mobile": "919999988886",
"email": "[email protected]",
"external_id": "0000011110"
},
"redemption_id": "18956938",
"code": "UZHYF",
"discount_code": "uatNightly4",
"series_code": "844312",
"series_info": [],
"is_absolute": "true",
"coupon_value": "46389",
"transaction": {
"amount": "5000.00",
"number": ""
},
"side_effects": [],
"item_status": {
"success": "true",
"code": 700,
"message": "Coupon processing successful"
}
}
}
}
}