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 header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
- promotion_id in path - stringrequiredThe ID of the associated promotion.
Body
object | application/json
codestring
requiredA unique code that can be used to manually apply a discount. Only letters, numbers, white spaces, underscores, and hyphens are allowed.<= 50 charactersmax_usesinteger
The maximum number of times you can use this coupon code. The default value is 0, which represents unlimited uses. The parent promotion'smax_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
object | application/json
dataobject
ACouponCode
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 header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- promotion_id in path - stringrequiredThe ID of the associated promotion.
- code_id in path - stringrequiredThe ID of the coupon code to delete.
example
Response
The deletion was successful or the resource does not exist.
Did you find what you were looking for?