Skip to navigation

List Coupon Codes

Get codes for a particular promotion.

Note: The default rate limit for this endpoint is 10 concurrent requests.

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 API Accounts and OAuth Scopes.

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

promotion_idstringRequired
The ID of the associated promotion.
store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Query parameters

beforestringOptional
A cursor that can be used for backwards pagination. Will fetch results before the position corresponding to the cursor. Cannot be used with the 'page' query parameter. Cannot be used with the 'after' query parameter.
afterstringOptional
A cursor that can be used for forwards pagination. Will fetch results after the position corresponding to the cursor. Cannot be used with the 'page' query parameter. Cannot be used with the 'before' query parameter.
pageintegerOptional>=1Deprecated
Query parameter that specifies the page number in a paginated list of resources. This field is deprecated and the 'before' and 'after' cursor parameters should be used instead.
limitintegerOptional1-250
Query parameter that limits the number of items displayed per page in a paginated list of resources. When none is specified a default value of 50 is used.
codestringOptional

Filter items by code.

valid_from:minintegerOptional>=1

Return only codes with a custom valid_from on or after this value. The value is a positive integer Unix timestamp.

valid_until:maxintegerOptional>=1

Return only codes with a custom valid_until on or before this value. The value is a positive integer Unix timestamp.

Response

A list of coupon codes.
datalist of objectsOptional
metaobjectOptional

Contains data about paginating the response via cursors. If no pagination details are specified, then both properties will be present. When a ‘before’ or ‘after’ cursor is provided, only the ‘cursor_pagination’ property will be present. When a ‘page’ parameter is provided, only the offset based ‘pagination’ property will be present.