Skip to navigation

List Coupons

Returns a list of Coupons. Default sorting is by coupon/discount id, from lowest to highest. You can pass in optional filter parameters. We recommended using ?min_id=x&limit=y to paginate through a large set of data because it offers better performance.

Usage Notes

Available types for type and exclude_type filters:

Type
per_item_discount
percentage_discount
per_total_discount
shipping_discount
free_shipping
promotion

Coupons with type=promotion will not populate usable data for the following fields but instead be set to the following default values:

...
amount : 0.0000
min_purchase: 0.0000
applies_to
restricted_to: []
shipping_methods : null
...

Authentication

X-Auth-Tokenstring

OAuth scopes

UI NamePermissionParameter
Marketingmodifystore_v2_marketing
Marketingread-onlystore_v2_marketing_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

Path parameters

store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Query parameters

idstringOptional

Optional filter param. /api/v2/coupons?id={value}

codestringOptional

Optional filter param /api/v2/coupons?code={value}

namestringOptional

Optional filter param /api/v2/coupons?name={value}

typeenumOptional
The type of discount.
min_idintegerOptional

Optional filter param /api/v2/coupons?min_id={value}

max_idintegerOptional

Optional filter param/api/v2/coupons?max_id={value}

pagedoubleOptional

Number of pages /api/v2/coupons?page={number}

limitdoubleOptional

Count per page /api/v2/coupons?limit={count}

exclude_typeenumOptional
Exclude a type of coupon.

Response

OK
amountstring

The discount to apply to an order, as either an amount or a percentage. This field’s usage is determined by the coupon type. For example, a type of + percentage_discount would determine a percentage here.

applies_toobject
If it is not included in the PUT request, its existing value on the coupon will be cleared. Also required to be set on the POST request
codestringformat: "[a-zA-Z0-9_\ -]"<=50 characters
The coupon code that customers will use to receive their discounts. Value must be unique. Only letters, numbers, white space, underscores, and hyphens are allowed.
idinteger

The coupon’s ID. This is a read-only field; do not set or modify its value in a POST or PUT request.

namestring<=100 characters
The name of the coupon. The value must be unique.
typeenum
date_createdstringOptional
Date Created
enabledbooleanOptional

If the coupon is enabled, this field’s value is true; otherwise, false.

expiresstringOptional

Specifies when a coupon expires. Coupons need not have an expiry date – you can also control expiry via + max_uses or max_uses_per_customer. If you do use this date field, the value must be in RFC 2822 format.

max_usesintegerOptional
Maximum number of times this coupon can be used.
max_uses_per_customerintegerOptional
Maximum number of times each customer can use this coupon.
min_purchasestringOptional
Specifies a minimum value that an order must have before the coupon can be applied to it.
num_usesintegerOptional

Number of times this coupon has been used. This is a read-only field; do not set or modify its value in a POST or PUT request.

restricted_toobjectOptional
shipping_methodslist of stringsOptional

This is a list of shipping-method names. A shipping method must be enabled on the store to use it with a coupon. To check which shipping methods are enabled, please use the List Shipping Methods endpoint.