v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Get Customer Coupons

Retrieves the details of coupons (issued, redeemed, expired) of a specific customer.

get/customer/coupons

Query parameters

mobilestring

Mobile number of the customer.

emailstring

Email ID of the customer.

external_idstring

External ID of the customer.

idinteger

Unique ID of the customer.

start_datestring date

Get coupons issued or redeemed on or after a specific date (YYYY-MM-DD). To get coupon history of a specific duration, pass the date range in start_date and end_date.

end_datestring date

Get coupons issued or redeemed before a specific date (YYYY-MM-DD). To get coupon history of a specific duration, pass the date range in start_date and end_date.

status'unredeemed' | 'redeemed' | 'expired' | 'active'

Retrieve coupons by coupon status. active is based on the coupon expiry date and does not validate redemptions. Hence you will see all coupons whose expiry (valid_till) is a future date.

series_idinteger

Retrieve details of a specific coupon series by series id.

store_idstring

Retrieves the details of active coupons of the customer that can be redeemed at a specific store.

order_by'created_date' | 'created_by' | 'valid_till'

"valid_till" is used to filter coupons by their validity. Use "sort_order" alongside this to sort the results in ascending or descending order of coupon validity.

sort_order'asc' | 'desc'

Sort the results in ascending (asc) or descending (desc) order of order_by.

limitinteger

Limit the number of results to be retrieved. For example: limit=10 to retrieve the history of ten recent coupons of the customer.

Response

200

Example response

{
  "response": {
    "pagination": {
      "limit": "100",
      "offset": "0",
      "total": 1
    },
    "status": {
      "success": "true",
      "code": 200,
      "message": "Success"
    },
    "customers": {
      "customer": [
        {
          "firstname": "Tom",
          "lastname": "Sawyer",
          "email": "tom.sawyer@gmail.com",
          "mobile": "9988776655",
          "id": "98662653",
          "coupons": {
            "coupon": [
              {
                "id": "163267982",
                "series_id": "12360",
                "series_name": "Spin_The_Wheel",
                "created_date": "2019-07-29T16:13:14.000Z",
                "valid_till": "2019-12-31 23:59:59",
                "code": "6WRNA5UM"
              }
            ]
          },
          "item_status": {
            "success": "true",
            "code": 1000,
            "message": "Coupons retrieved successfully"
          }
        }
      ]
    }
  }
}