This API allows you to retrieve points and coupons redemption history of a customer. You can filter the results by type, duration, coupon ids start with, and coupon ids end with. Besides filters you can also sort the results by ascending or descending order by redemption id/time and limit number of results to retrieve.
Example request
curl --location 'https://eu.api.capillarytech.com/v1.1/customer/redemptions?mobile=7744876415' \
--header 'Authorization: Basic =' \
--header 'Cookie: _cfuvid=a0NmZQvi.30LKK7NvCQJgMpK8Ig15sul9um2ZFRucDk-1757422794990-0.0.1.1-604800000'Example response
{
"response": {
"status": {
"success":true,
"code":200,
"message":"Success"
},
"customer": {
"mobile": "917744876415",
"email": "[email protected]",
"external_id": null,
"firstname": "tester",
"lastname": "capillary",
"user_groups2":[
],
"rows": 4,
"coupons_count": "3",
"points_count": 1,
"coupons_start_id": "16793490",
"points_start_id": 1,
"redemptions": {
"coupons": {
"coupon": [
{
"id":"16793490",
"code": "RT2EJTAE",
"series_id":"689078",
"description":"LIKE1w2w2345678910",
"discount_code":"XYZ1w23",
"discount_type":"ABS",
"discount_value":"500",
"transaction_number":"bill-110",
"bill_id":"0",
"redeemed_time":"2025-02-24 13:01:40",
"redeemed_at":"satish.maharana",
"redeemed_store":
{
"name":"DocStore",
"code":"doc123"
},
"redeemed_till":{
"name":"satish.maharana",
"code":"satish.maharana"
},
"custom_fields": {
"field": [
]
}
},
{
"id":"16793484",
"code": "LU251JB2",
"series_id":"689078",
"description":"LIKE1w2w2345678910",
"discount_code":"XYZ1w23",
"discount_type":"ABS",
"discount_value":"500",
"transaction_number":"bill-110",
"bill_id":"0",
"redeemed_time":"2025-02-24 13:01:13",
"redeemed_at":"satish.maharana",
"redeemed_store":
{
"name":"DocStore",
"code":"doc123"
},
"redeemed_till":{
"name":"satish.maharana",
"code":"satish.maharana"
},
"custom_fields": {
"field": [
]
}
},
{
"id":"16787110",
"code": "K6OXLR0Q",
"series_id":"689078",
"description":"LIKE1w2w2345678910",
"discount_code":"XYZ1w23",
"discount_type":"ABS",
"discount_value":"500",
"transaction_number":"bill-110",
"bill_id":"0",
"redeemed_time":"2025-02-23 22:33:01",
"redeemed_at":"satish.maharana",
"redeemed_store":
{
"name":"DocStore",
"code":"doc123"
},
"redeemed_till":{
"name":"satish.maharana",
"code":"satish.maharana"
},
"custom_fields": {
"field": [
]
}
}
]
},
"points": {
"point": [
{
"id" :1,
"program_id":973,
"points_redeemed":100,
"transaction_number":"",
"bill_id":"-1",
"validation_code":"",
"redeemed_time":"2025-03-10 14:37:11",
"redeemed_at":"sant.p_123",
"redemption_purpose":"",
"notes":"Redeemed to transfer points to the friend",
"external_reference_number":"",
"redemption_id":"AfL1vt",
"redeemed_store":{
"code":"doc123",
"name":"DocStore"
},
"redeemed_till":{
"code":"sant.p_123",
"name":"sant.p_123"
},
"custom_fields": {
"field": [
]
},
"reversals":
[
],
"redemption_breakup_by_program":
[
]
}
]
}
}
}
}
}
Request Parameters
Parameter | Data Type | Required | Description |
|---|---|---|---|
identifierName | string (enum) | Mandatory | Identifier of the customer to use. Allowed: |
identifierValue | string | Mandatory | Value of the specified identifier type. To retrieve transactions of multiple customers, provide each identifier separated by commas.Example: |
type | string (enum) | Optional | Type of redemption. Allowed: |
start_date | date | Optional | Retrieves redemptions made on or after a specific date ( |
end_date | date | Optional | Retrieves redemptions made on or before a specific date ( |
entity_code | string | Optional | Code of the specified entity_type. Example: to get transactions of a zone with code |
coupons_limit | int32 | Optional | Limit the number of coupon redemptions displayed. Use only when |
points_limit | int32 | Optional | Limit the number of points redemptions displayed. Use only when |
limit | int32 | Optional | Limit the number of redemption details (points and/or coupons). Default is 10. Use only when |
coupons_start_id | int64 | Optional | Filter results by coupon redemption ID starting with a specific number. Use only when |
coupons_end_id | int64 | Optional | Filter results by coupon redemption ID ending with a specific number. Use only when |
points_start_id | int64 | Optional | Filter results by points redemption ID starting with a specific number. Use only when |
points_end_id | int64 | Optional | Filter results by points redemption ID ending with a specific number. Use only when |
sort | string (enum) | Optional | Sort results by redemption ID or redeemed time. Defaults to descending order of redeemed time. |
order | string (enum) | Optional | Defines sort order. Defaults to |
mlp | boolean | Optional | Pass |
format | string (enum) | Optional | Format of the response. Allowed: |
user_id | boolean | Optional | Pass |
merchant_store_id | int64 | Optional | Merchant store ID to fetch redemptions from a specific store. |
program_id | int32 | Optional | Program ID to filter redemptions of a particular program. |
external_reference_number | string | Optional | Unique reference number provided when making the points redemption request. |
Response Parameters
| Parameter | Datatype | Description |
|---|---|---|
| coupons_count | int | Number of coupon redemptions retrieved. |
| points_count | int | Number of points redemptions received. |
| coupons | obj | Details of coupon redemptions. |
| points | obj | Details of points redemption. |
| code | string | Unique code of the coupon. |
| series_id | long | Coupon series ID associated to the coupon. |
| description | string | Description of the coupon. |
| discount_code | string | Coupon code used to avail discount. |
| discount_type | enum | Type of discount. PERC for discount in percentage, FLAT for flat amount discount. |
| id | long | Redemption ID of that points or coupon. |
| transaction_number | string | Transaction number associated to the points or coupon redemption. |
| bill_id | long | A numerical identifier for the bill. |
| redeemed_time | date-time | Date and time of points or coupon redemption. |
| redeemed_at | string | Store or TILL code associated to points or coupon redemption. |
| program_id | long | Unique ID of the loyalty program in which points is redeemed. |
| points_redeemed | int | Number of points redeemed. |
| transaction_number | string | Transaction number associated to the points or coupon redemption. |
| redeemed_time | date-time | Date and time of points or coupon redemption. |
| redeemed_at | string | Store or TILL code associated to points or coupon redemption. |
| redemption_breakup_by_program | obj | Breakup of points redeemed with respect to the program. |
| reversals | obj | Details of points reversed if the transaction for which points are redeemed is returned. |
| reversal_id | long | Unique ID generated for the reversal of a specific set of redeemed points. |
| points_reversed | int | number of points reversed. |
| reversal_time | date-time | Date and time of points reversal in YYYY-MM-DD HH:MM:SS format. |
| reversed_on_till_id | long | Till ID associated to the points reversal. |
| reversal_breakup_by_program | obj | Breakup of points reversed and associated loyalty program. |
