Bearer token with
marketing:write scopeThe promotion ID
Single code creation
The code string (auto-generated if not provided, always uppercased)
Initial status:
active, inactive, expiredMaximum number of times this code can be used
Maximum uses per customer
ISO 8601 datetime when code becomes valid
ISO 8601 datetime when code expires
Custom metadata
Bulk code creation
Setbulk: true to generate multiple codes at once.
Set to
true for bulk creationNumber of codes to generate (max 1000)
Prefix for generated codes (max 10 characters)
Initial status for all codes
Maximum uses per code
Maximum uses per customer per code
Validity start for all codes
Validity end for all codes
Response
Returns the created code(s).Request (Single)
Response (Single)
Request (Bulk)
Response (Bulk)
Errors
| Status | Error | Description |
|---|---|---|
| 404 | Promotion not found | No promotion exists with the given ID |
| 409 | Code already exists | A code with this string already exists |