Generate Multiple Coupon Codes
Generate a batch of coupon codes for a particular bulk coupon promotion.
Note:
- batch_size (number of codes generated per request) is limited to 250. If batch_size is not an integer or larger than 250, it will return a 422 error code.
- The default rate limit for this endpoint is 10 concurrent requests.
Authentication
OAuth scopes
Authentication header
Further reading
For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.
For more about BigCommerce OAuth scopes, see API Accounts and OAuth Scopes.
For a list of API status codes, see API Status Codes.
Path parameters
Headers
The MIME type of the response body.
Request
An optional single character (_ or -) that will be placed between the prefix and the randomly generated code, and again between the randomly generated code and the suffix. It will only be applied if a valid prefix or suffix is present.
An optional array of single length string elements to exclude from the randomly generated part. Only capital letters and numbers are allowed. The default value is an empty array [].
The length of the random string to be generated for each coupon code. The value must be between 6 and 16. The default length is 16. The total length of each generated coupon code is calculated as : code_length + length of prefix with delimiter + length of suffix with delimiter. The maximum total length of a coupon code is 50.
Optional custom schedule applied to every code generated in the batch.
Omitted or null means the codes inherit the promotion’s schedule.