GET
/
coupon-codes

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-fabric-tenant-id
string
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.

Required string length: 24
x-fabric-channel-id
string

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-id
string

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

x-fabric-request-id
string

A unique request ID.

Query Parameters

size
integer
default: 10

The maximum number of records per page.

Required range: 1 < x < 100
startCursor
string

Specifies the record from which the search will start, effectively skipping all records before this point.

Maximum length: 1000
userId
string

Filter coupon codes by user ID

promotionId
string

Filter coupon codes by promotion ID generated using the create promotion endpoint.

couponCode
string

Filter coupon codes generated using the generate coupon codes endpoint.

status
enum<string>

Filter coupon codes by their status

Available options:
ACTIVE,
INACTIVE,
REDEEMED
startFrom
string

Filter coupon codes based on the start date of the coupon, in UTC format. startFrom and StartTo represent date range for the start date of the coupon code. For example, you can find coupon codes where start date is from '2023-03-01T01:14:50.967Z' to '2023-03-10T01:14:50.967Z'

startTo
string

Filter coupon codes based on the start date of the coupon, in UTC format. startFrom and StartTo represent date range for the start date of the coupon code. For example, you can find coupon codes where start date is from '2023-03-01T01:14:50.967Z' to '2023-03-10T01:14:50.967Z'

endFrom
string

Filter coupon codes based on the end date of the coupon, in UTC format. endFrom and endTo represent date range for the end date of the coupon code. For example, you can find coupon codes where end date is from '2023-04-01T01:14:50.967Z' to '2023-04-10T01:14:50.967Z'

endTo
string

Filter coupon codes based on the end date of coupon, in UTC format. endFrom and endTo represent date range for the end date of the coupon code. For example, you can find coupon codes where end date is from '2023-04-01T01:14:50.967Z' to '2023-04-10T01:14:50.967Z'

additionalAttributes
string

Filter coupon codes by additional attributes. <br> This filter needs to be a valid JSON array and name:values pairs to be able to make the search.

promotionAdditionalAttributes
string

Filter coupon codes by supplementary attributes of a promotion.<br> This filter needs to be a valid JSON array and name:values pairs to be able to make the search.

title
string

Filter coupon codes by promotion title

Response

200 - application/json

The paginated response of coupon codes.

query
object

The pagination details.

data
object[]

An array containing coupon details.