Generate coupon codes

Enables you to generate coupon codes based on given parameters

SecurityAuthorizationToken
Request
header Parameters
required
object

Valid JSON object that must contain account, stage, date, and channel attributes. eg - {"stage":"prod","account":"5f328bf0b","date":"2020-12-12T08:00:00.000Z","channel":12}

Authorization
required
string

Authorization token or access token for the user, provided by fabric. It can be obtained after logging into fabric's copilot account.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
Request Body schema: application/json
prefix
required
string [ 2 .. 12 ] characters

Prefix string to generate the coupon

start
required
number >= 1

Initial number to begin generating the coupon codes

count
required
number >= 1

Number of coupon codes to be generated

Responses
200

OK

400

Bad Request

500

Internal Server Error

post/api-offers/coupon/generate-codes
Request samples
application/json
{
  • "prefix": "SUMMER",
  • "start": 1,
  • "count": 3
}
Response samples
application/json
{
  • "codes": [
    ]
}