v1
latestOpenAPI 3.0.12026-08-062532117.6 KBCreate a promotional code
Creates a promotional code against an existing coupon. couponId is always required — the coupon supplies the discount.
There are two ways to create a code:
- Give it yourself. Send code with the exact string you want. It must be unique within the program.
- Have it generated. Set isAutoGenerated to true and send codeStructure describing which pieces to combine — the affiliate's first name, last name, email prefix, the discount value, the coupon name, and/or random characters. An affiliate is required in this mode, and you can shape the result further with prefix, randomCharsLength and randomCharsCase.
Assign the code to an affiliate with affiliateId or affiliateEmail so their redemptions are tracked. Assigned codes are also connected to that affiliate's links automatically in the background.
Fires the promotional_code.created webhook.
post/promotional-codes
Request body
Example request
{
"code": "JANE20"
}Response
The created promotional code, with its parent coupon and assigned affiliate.