Coupons

Get all coupons

Get a paginated list of coupons.

get/coupons

Request

Query parameters

sizeinteger

The maximum number of records per page.

offsetinteger

The number of records to skip before returning records. For example, with an offset of 20 and limit of 10, you will get records from 21 to 30.

sort'-updatedAt' | '+updatedAt' | '-couponCodes' | '+couponCodes' | '-startAt' | '+startAt' | '-endAt' | '+endAt' | '-name' | '+name'

The criteria to sort the results. Use the format {sort order}{field name}, where - refers to a descending order and + refers to an ascending order.

searchstring
Example:BLACK FRIDAY

Keyword to filter coupons

Headers

x-fabric-tenant-idstring required

A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.

x-fabric-channel-idstring
Example:12

x-fabric-channel-id identifies the sales channel where the API request is being made; primarily for multichannel use cases. The channel ids are 12 corresponding to US and 13 corresponding to Canada. The default channel id is 12. This field is required.

x-client-idstring

A unique identifier obtained from Copilot for the System app in the fabric ecosystem, essential for OpenID Connect authentication flows.

x-fabric-request-idstring
Example:263e731c-45c8-11ed-b878-0242ac120002

A unique request ID.

Response

OK

Example response

{
  "query": {
    "size": 10,
    "offset": 10,
    "count": 50
  },
  "data": [
    {
      "id": "6380e7ecb419a30009865fad",
      "name": "Christmas 2022 coupons",
      "status": "SCHEDULED",
      "startAt": "2022-08-24T14:15:22Z",
      "endAt": "2019-08-25T14:15:22Z",
      "type": "PRODUCT",
      "couponCodesCount": 100,
      "createdAt": "2019-08-20T14:15:22Z",
      "updatedAt": "2019-08-20T14:15:22Z",
      "level": 3,
      "stackingType": "STACKABLE",
      "singleMultiUse": "MULTI_USE",
      "couponCodes": [
        "SUMMER1000001"
      ],
      "promotionMessages": [
        {
          "title": "Buy 2 get 1 free",
          "message": "Offer valid at participating stores through September 5, 2023.",
          "pages": [
            "PDP",
            "Cart"
          ],
          "locales": [
            "en-CA",
            "fr-CA"
          ]
        }
      ],
      "additionalAttributes": [
        {
          "name": "type",
          "values": "Birthday",
          "attributeId": 100000
        }
      ]
    }
  ]
}

Changes

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