Coupon

Generate coupon codes

Enables you to generate coupon codes based on given parameters

post/api-offers/coupon/generate-codes

Request

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.

Request body

prefixstring required

Prefix string to generate the coupon

startnumber required

Initial number to begin generating the coupon codes

countnumber required

Number of coupon codes to be generated

Example request

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

Response

OK

codesstring[]

List of generated coupon codes

Example response

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

Changes

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