Coupons

Generate coupon codes

Generate coupon codes based on the given parameter.

post/coupons/actions/generate-codes

Request

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.

Request body

prefixstring required

The prefix to be added while generating coupon codes.

startinteger required

The initial number to begin generating the coupon codes.

countinteger required

The number of coupon codes to be generated.

Example request

{
  "prefix": "SUMMER",
  "start": 1,
  "count": 3
}

Response

OK

datastring[]

An array containing generated coupon codes.

Example response

{
  "data": [
    "SUMMER1",
    "SUMMER2",
    "SUMMER3"
  ]
}

Changes

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