Coupon codes

Get a list of all coupon codes

Retrieves a paginated list of all coupon codes.

get/api-offers/coupon-codes

Request

Query parameters

sizeinteger
Example:10

Records the number returned by the endpoint.

startCursorstring nullable
Example:641cf986ca5b2c3180787e09

Record pointer to get items after that record

userIdstring
Example:user0001

Filter records by the user ID.

promotionIdstring
Example:641cf986ca5b2c3180787e09

Filter records by the promotion ID.

promoCodestring
Example:SUMMER

Filter records by coupon code.

status'ACTIVE' | 'INACTIVE' | 'REDEEMED'
Example:ACTIVE

Filter records by status.

startFromstring date-time
Example:2023-03-24T01:14:50.967Z

Filter records from a specific start date.

startTostring date-time
Example:2023-03-24T01:14:50.967Z

Filter records until a specific start date.

endFromstring date-time
Example:2023-03-24T01:14:50.967Z

Filter the records since a specific end date

endTostring date-time
Example:2023-03-24T01:14:50.967Z

Filter records until a specific end date.

additionalAttributesstring
Example:[{key:'type',value:'My Birthday'}]

Filter by the coupon code's additional attributes. This filter needs to be a valid JSON array to be able to make the search.

promoAdditionalAttributesstring
Example:[{key:'type',value:'Holiday'}]

Filter by the related promotion or coupon's additional attributes. This filter needs to be a valid JSON array to be able to make the search.

titlestring
Example:Summer promotion

Filter coupon codes by the related promotion title.

Headers

x-site-contextstring required
Example:{"date": "2023-01-01T00:00:00.000Z", "channel": 12, "account": "1234abcd5678efgh9ijklmno","stage":"production"}

The x-site-context header is a JSON object that contains information about the source you wish to pull from. The mandatory account is the 24 character identifier found in Copilot. The channel (Sales channel ID), stage (environment name), and date attributes can be used to further narrow the scope of your data source.

Response

OK

Example response

{
  "query": {
    "limit": 10,
    "count": 50
  },
  "promos": [
    {
      "_id": "abcdefg1ee7ce20123456789",
      "promoId": 100013,
      "promoCodes": [
        "SUMMER100",
        "SUMMER20"
      ],
      "promoCount": 1,
      "state": "SCHEDULED",
      "title": "CREATE PROMO",
      "startDate": "2019-08-24T14:15:22Z",
      "endDate": "2019-08-25T14:15:22Z",
      "isExclusive": true,
      "eligiblePriceList": [
        10000056
      ],
      "level": 1,
      "stackingType": "STACKABLE",
      "updatedAt": "2019-08-20T14:15:22Z"
    }
  ]
}

Changes

No recorded changes to this operation across all 2 revisions of this API.