BigCommerce
Management API
Coupon Codes Single

Promotions API

Create A Coupon Code

POST /promotions/{promotion_id}/codes

Request

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
    required

Parameters

  • store_hash in path - string
  • Content-Type in header with default of application/json - string
    required

    The MIME type of the request body.

  • promotion_id in path - string
    required

    The ID of the associated promotion.

Body

object | application/json
  • code
    string
    required

    A unique code that can be used to manually apply a discount. Only letters, numbers, white spaces, underscores, and hyphens are allowed.

    <= 50 characters
  • max_uses
    integer

    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's max_uses field.

    Example: 10

  • max_uses_per_customer
    integer

    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
  • data
    object

    A CouponCode object encapsulates attributes of a coupon code.

  • meta
    object

    Empty meta object, which may be used at a later time.

example-1

Delete A Coupon Code

DELETE /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
    required

Parameters

  • store_hash in path - string
  • promotion_id in path - string
    required

    The ID of the associated promotion.

  • code_id in path - string
    required

    The 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?