For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
        • Abandoned Carts
        • Carts
        • Channels
        • Checkouts
        • Currencies
        • Customer Segmentation
        • Geography
        • Infrastructure Hosting
        • Inventory
        • Orders
        • Order Operations
        • Pickup
        • Pickup Methods
        • Pickup Options
        • Pricing
        • Price Lists
        • Promotions
              • GETList Coupon Codes
              • DELDelete Multiple Coupon Codes
              • POSTGenerate Multiple Coupon Codes
        • Promotion Settings
        • Redirects
        • Scripts
        • Settings
        • Shipping
        • Sites
        • Subscribers
        • System Logs
        • Tax
        • Wishlists
      • Payments
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTAdminManagementPromotionsCoupon Codes Bulk

List Coupon Codes

GET
https://api.bigcommerce.com/stores/:store_hash/v3/promotions/:promotion_id/codes
GET
/stores/:store_hash/v3/promotions/:promotion_id/codes
$curl -G https://api.bigcommerce.com/stores/store_hash/v3/promotions/promotion_id/codes \
> -H "Accept: application/json" \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d code=TEST_COUPON
200example-1
1{
2 "data": [
3 {
4 "id": 1024,
5 "code": "SUMMER_SALE_2024",
6 "current_uses": 3,
7 "created": "2024-05-01T10:15:30+00:00",
8 "max_uses": 100,
9 "max_uses_per_customer": 2
10 }
11 ],
12 "meta": {
13 "pagination": {
14 "total": 1,
15 "count": 1,
16 "per_page": 50,
17 "current_page": 1,
18 "total_pages": 1,
19 "links": {
20 "current": "?page=1&limit=50"
21 }
22 },
23 "cursor_pagination": {
24 "count": 1,
25 "per_page": 50,
26 "links": {
27 "next": "?limit=50&after=eyJpZCI6IjEwMjQifQ=="
28 },
29 "start_cursor": "eyJpZCI6IjEwMjQifQ==",
30 "end_cursor": "eyJpZCI6IjEwMjQifQ=="
31 }
32 }
33}

Get codes for a particular promotion.

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

Was this page helpful?
Previous

Promotions API

Next

Delete Multiple Coupon Codes

Built with

Authentication

X-Auth-Tokenstring
### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Marketing | modify | `store_v2_marketing` | | Marketing | read-only | `store_v2_marketing_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts). For more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-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](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) 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.

Response

datalist of objects
metaobject

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.

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.

The MIME type of the response body.