Get All Customer Coupons

This API retrieves the coupon history details of a customer with basic details. For each customer, information includes coupon codes, validity, discount type and amount, redemption history, and issuing details, as well as pagination to manage large data sets efficiently. This API is ideal for accessing an overview of all coupons across customers. If you want to retrieve more information about coupons, use this API.

👍

Note

For detailed information about our APIs and for hands-on testing, refer documentation in API overview and step-by-step guide on making your first API call in Make your first API call .

Prerequisites

  • Authentication: Basic or OAuth authentication
  • Default access group

Resource information

URL/customers/coupons
HTTP MethodGET
PaginationYes
Batch supportNo
Rate limit informationNone

API endpoint example

https://eu.api.capillarytech.com/v2/customers/coupons?mobile=917003222195&coupon_code_case=LOWER&limit=20&offset=5

Request query parameters

ParametersData TypeDescription
mobileIntegerMobile of the customer.
emailIntegerEmail of the customer.
externalIdIntegerExternal ID of the customer.
idLongUnique ID of the customer.
statusEnumGet coupons of selected status(es). In the enum values, Active_Redeemed is for coupon is active but redeemed), Active_Unredeemed for coupons that are active and not redeemed, Expired_Redeemed for coupons that are expired but redeemed,and Expired_Unredeemed for coupons that are expired and not redeemed.
coupon_code_caseEnumThis parameter helps to retrieve the coupon code in the desired letter cases. By default, the system automatically converts the coupon code to upper case. The query itself is not case sensitive. Supported Values:
LOWER: Converts the coupon code to lower case.
UPPER: Converts the coupon codes to upper case.
AS_IT_IS: It ensure that the coupon code is retrieved exactly as it was created or provided, without altering the letter case. For instance, if the code is "abAB123," it should be retrieved and displayed as "abAB123," maintaining its original formatting.

Response parameters

ParameterDescription
limitMaximum number of records returned.
offsetStarting point of the records.
totalTotal number of records.
customersList of customer objects.
firstnameFirst name of the customer.
lastnameLast name of the customer.
emailEmail address of the customer.
mobileMobile number of the customer.
idInternal ID of the customer.
externalIdExternal ID of the customer.
couponsList of coupon objects assigned to the customer.
codeCode of the coupon.
seriesIdSeries ID to which the coupon belongs.
descriptionDescription of the coupon.
validTillCoupon expiry date in ISO format.
discountTypeType of discount (e.g., ABS for absolute value).
discountValueDiscount value of the coupon.
discountUptoMaximum discount limit (0 if not applicable).
redemptionCountNumber of times the coupon has been redeemed.
redemptionsLeftNumber of remaining redemptions.
couponIdInternal ID of the coupon.
createdDateCreation date of the coupon in ISO format.
transactionNumberAssociated transaction number (if any).
issued.codeCode of the store where the coupon was issued.
issued.nameName of the store where the coupon was issued.
customPropertyList of custom properties of the coupon.
nameName of the custom property.
valueValue of the custom property.
redemptionsList of redemptions associated with the coupon.
reversedRedemptionsList of reversed redemptions.
warningsList of warnings.
errorsList of errors.
successIndicates whether the operation was successful (true or false).
{
   "entity":{
      "pagination":{
         "limit":"100",
         "offset":"0",
         "total":4
      },
      "customers":[
         {
            "firstname":"Tom",
            "lastname":"Sawyer",
            "mobile":"918860000001",
            "id":401031250,
            "coupons":[
               {
                  "code":"KNRYHMRW",
                  "seriesId":363653,
                  "description":"NewCouponForAll",
                  "validTill":"2029-09-01T00:00:00+05:30",
                  "discountType":"ABS",
                  "discountValue":1000.0,
                  "discountUpto":0.0,
                  "redemptionCount":0,
                  "redemptionsLeft":1,
                  "id":399000028,
                  "createdDate":"2021-09-25T16:28:11+05:30",
                  "transactionNumber":"2147877652",
                  "issuedAt":{
                     "code":"storecode",
                     "name":"webstore1"
                  },
                  "redemptions":[
                     {
                       "date": "2022-03-10T14:48:09+05:30",
                       "transactionNumber": "1646903888000",
                       "redeemedAt": {
                       "code": "luciauto_store2",
                       "name": "Auto Store2"
                      }
                  ]
               },
               {
                  "code":"7TF6TBQB",
                  "seriesId":363653,
                  "description":"NewCouponForAll",
                  "validTill":"2029-09-01T00:00:00+05:30",
                  "discountType":"ABS",
                  "discountValue":1000.0,
                  "discountUpto":0.0,
                  "redemptionCount":0,
                  "redemptionsLeft":1,
                  "id":399000029,
                  "createdDate":"2021-09-25T16:28:11+05:30",
                  "transactionNumber":"2147877652",
                  "issuedAt":{
                     "code":"storecode",
                     "name":"webstore1"
                  },
                  "redemptions":[

                  ]
               },
               {
                  "code":"6JAFX7ZF",
                  "seriesId":363653,
                  "description":"NewCouponForAll",
                  "validTill":"2029-09-01T00:00:00+05:30",
                  "discountType":"ABS",
                  "discountValue":1000.0,
                  "discountUpto":0.0,
                  "redemptionCount":0,
                  "redemptionsLeft":1,
                  "id":399000026,
                  "createdDate":"2021-09-25T16:25:25+05:30",
                  "transactionNumber":"2147877651",
                  "issuedAt":{
                     "code":"storecode",
                     "name":"webstore1"
                  },
                  "redemptions":[

                  ]
               },
               {
                  "code":"KZWMCYTR",
                  "seriesId":14162,
                  "description":"Mobile Push offer 1",
                  "validTill":"2022-03-20T00:00:00+05:30",
                  "discountType":"PERC",
                  "discountValue":10.0,
                  "discountUpto":0.0,
                  "redemptionCount":0,
                  "redemptionsLeft":1,
                  "id":397755229,
                  "createdDate":"2021-09-01T17:53:43+05:30",
                  "transactionNumber":"2147861881",
                  "issuedAt":{
                     "code":"storecode",
                     "name":"webstore1"
                  },
                  "redemptions":[

                  ]
               }
            ]
         }
      ]
   },
   "warnings":[

   ],
   "errors":[

   ],
   "success":true
}
{
    "entity": {
        "pagination": {
            "limit": "100",
            "offset": "0",
            "total": 7
        },
        "customers": [
            {
                "firstname": "autofn_917003222195",
                "lastname": "autoln_917003222195",
                "email": "[email protected]",
                "mobile": "917003222195",
                "id": 345635529,
                "externalId": "ext_id917003222195",
                "coupons": [
                    {
                        "code": "tt6wzp7xnw",
                        "seriesId": 68579,
                        "description": "test-lekhana-2",
                        "validTill": "2024-10-31T00:00:00Z",
                        "discountType": "ABS",
                        "discountValue": 10.0,
                        "discountUpto": 0.0,
                        "redemptionCount": 0,
                        "redemptionsLeft": 1,
                        "id": 39004111,
                        "createdDate": "2024-10-11T13:18:03Z",
                        "transactionNumber": "0",
                        "issuedAt": {
                            "code": "store123",
                            "name": "MarvelAuto_Store"
                        },
                        "redemptions": [],
                        "reversedRedemptions": []
                    },
                    {
                        "code": "ziwy7lzgw8",
                        "seriesId": 68579,
                        "description": "test-lekhana-2",
                        "validTill": "2024-10-31T00:00:00Z",
                        "discountType": "ABS",
                        "discountValue": 10.0,
                        "discountUpto": 0.0,
                        "redemptionCount": 0,
                        "redemptionsLeft": 1,
                        "id": 39004112,
                        "createdDate": "2024-10-11T13:18:03Z",
                        "transactionNumber": "0",
                        "issuedAt": {
                            "code": "store123",
                            "name": "MarvelAuto_Store"
                        },
                        "redemptions": [],
                        "reversedRedemptions": []
                    },
                    {
                        "code": "hu1dh75hny",
                        "seriesId": 68579,
                        "description": "test-lekhana-2",
                        "validTill": "2024-10-31T00:00:00Z",
                        "discountType": "ABS",
                        "discountValue": 10.0,
                        "discountUpto": 0.0,
                        "redemptionCount": 0,
                        "redemptionsLeft": 1,
                        "id": 39004113,
                        "createdDate": "2024-10-11T13:18:03Z",
                        "transactionNumber": "0",
                        "issuedAt": {
                            "code": "store123",
                            "name": "MarvelAuto_Store"
                        },
                        "redemptions": [],
                        "reversedRedemptions": []
                    },
                    {
                        "code": "vmqvzcvymt",
                        "seriesId": 68579,
                        "description": "test-lekhana-2",
                        "validTill": "2024-10-31T00:00:00Z",
                        "discountType": "ABS",
                        "discountValue": 10.0,
                        "discountUpto": 0.0,
                        "redemptionCount": 0,
                        "redemptionsLeft": 1,
                        "id": 36502461,
                        "createdDate": "2024-10-10T10:37:03Z",
                        "transactionNumber": "0",
                        "issuedAt": {
                            "code": "store123",
                            "name": "MarvelAuto_Store"
                        },
                        "redemptions": [],
                        "reversedRedemptions": []
                    },
                    {
                        "code": "x6wqg8kb01",
                        "seriesId": 68579,
                        "description": "test-lekhana-2",
                        "validTill": "2024-10-31T00:00:00Z",
                        "discountType": "ABS",
                        "discountValue": 10.0,
                        "discountUpto": 0.0,
                        "redemptionCount": 0,
                        "redemptionsLeft": 1,
                        "id": 36502462,
                        "createdDate": "2024-10-10T10:37:03Z",
                        "transactionNumber": "0",
                        "issuedAt": {
                            "code": "store123",
                            "name": "MarvelAuto_Store"
                        },
                        "redemptions": [],
                        "reversedRedemptions": []
                    },
                    {
                        "code": "oo8hf7divr",
                        "seriesId": 68579,
                        "description": "test-lekhana-2",
                        "validTill": "2024-10-31T00:00:00Z",
                        "discountType": "ABS",
                        "discountValue": 10.0,
                        "discountUpto": 0.0,
                        "redemptionCount": 0,
                        "redemptionsLeft": 1,
                        "id": 36502463,
                        "createdDate": "2024-10-10T10:37:03Z",
                        "transactionNumber": "0",
                        "issuedAt": {
                            "code": "store123",
                            "name": "MarvelAuto_Store"
                        },
                        "redemptions": [],
                        "reversedRedemptions": []
                    },
                    {
                        "code": "w2jjud9yrguaprdur52o",
                        "seriesId": 68377,
                        "description": "test-lekhana",
                        "validTill": "2024-10-09T00:00:00Z",
                        "discountType": "ABS",
                        "discountValue": 10.0,
                        "discountUpto": 0.0,
                        "redemptionCount": 0,
                        "redemptionsLeft": 1,
                        "id": 36501088,
                        "createdDate": "2024-10-08T18:29:14Z",
                        "transactionNumber": "0",
                        "issuedAt": {
                            "code": "store123",
                            "name": "MarvelAuto_Store"
                        },
                        "customProperty": [
                            {
                                "name": "standard_image_1",
                                "value": ""
                            },
                            {
                                "name": "standard_image_2",
                                "value": ""
                            },
                            {
                                "name": "standard_description",
                                "value": "DescriptionCustom"
                            },
                            {
                                "name": "standard_image_3",
                                "value": ""
                            },
                            {
                                "name": "standard_terms_and_conditions",
                                "value": "Terms and conditionscustom"
                            },
                            {
                                "name": "test-xyz",
                                "value": "test-xyz custom"
                            }
                        ],
                        "redemptions": [],
                        "reversedRedemptions": []
                    }
                ]
            }
        ]
    },
    "warnings": [],
    "errors": [],
    "success": true
}
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!