Coupon Codes (Single)
Create A Coupon Code
POST https://api.bigcommerce.com/stores/{store_hash}/v3/promotions/{promotion_id}/codesRequest
Create a new code for the promotion.
Note: The default rate limit for this endpoint is 40 concurrent requests.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
codestring
required<= 50 charactersA unique code that can be used to manually apply a discount. Only letters, numbers, white spaces, underscores, and hyphens are allowed.
max_usesinteger
The maximum number of times you can use this coupon code. The default value is 0, which represents unlimited uses. The parent promotion's
max_uses
field overrides the coupon code'smax_uses
field.Example: 10max_uses_per_customerinteger
The maximum number of times a specific customer can use this coupon code. The default value is 0, which represents unlimited uses.
Example: 5
example
Response
Body
dataobject
A
CouponCode
object encapsulates attributes of a coupon code.
example-1
Delete A Coupon Code
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/promotions/{promotion_id}/codes/{code_id}Request
Deletes a coupon code.
Note: The default rate limit for this endpoint is 40 concurrent requests.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
The deletion was successful or the resource does not exist.