Always check which version supports your specific endpoint.
Never embed credentials in client-side code. Use environment variables.
Monitor headers: X-Rate-Limit-Requests-Left, X-Rate-Limit-Time-Reset-Ms
Implement exponential backoff with jitter for retries.
Always include channel_id when working with multi-storefront stores.
- Build a new integration (REST API, webhooks, data sync)
- Create a headless storefront (GraphQL Storefront, Next.js/Catalyst)
- Develop a BigCommerce app (single-click app, marketplace)
- Work with specific API (Catalog, Orders, Customers, Payments)
- Debug an API issue (errors, authentication, rate limits)
- Set up webhooks and event handling
- Something else
Wait for response before proceeding.
After reading the workflow, follow it exactly.
# 1. Check response status
# 200/201 = Success
# 4xx = Client error (check request)
# 5xx = Server error (retry with backoff)
# 2. Verify rate limit headers
X-Rate-Limit-Requests-Left: [remaining]
X-Rate-Limit-Time-Reset-Ms: [reset time]
# 3. For mutations, verify the change
GET the resource to confirm state
Report to user:
- "API call: [status]"
- "Rate limit remaining: [X]"
- "Data verified: [confirmation]"
Authentication & Security:
- references/authentication.md - OAuth, tokens, scopes, credentials
- references/security-best-practices.md - API keys, PCI compliance, headers
Core APIs:
- references/catalog-api.md - Products, categories, brands, variants
- references/orders-api.md - Orders, shipments, transactions, fulfillment
- references/customers-api.md - Customers, addresses, groups, segments
- references/payments-api.md - Payment processing, gateways, checkout
Storefront & Content:
- references/graphql-storefront.md - GraphQL queries, carts, checkout
- references/widgets-scripts.md - Widgets API, Scripts API, content injection
- references/stencil-themes.md - Theme development, Handlebars, CLI
Platform Features:
- references/webhooks.md - Events, subscriptions, retry logic
- references/multi-storefront.md - MSF, channels, site routing
- references/headless-commerce.md - Next.js Commerce, Catalyst, React
Development:
- references/app-development.md - Single-click apps, Developer Portal
- references/rate-limits-pagination.md - Throttling, cursor pagination, batching
- references/error-handling.md - Status codes, troubleshooting, debugging
Base URLs:
- REST API:
https://api.bigcommerce.com/stores/{store_hash}/v3/
- Payments:
https://payments.bigcommerce.com/stores/{store_hash}/payments
- GraphQL Storefront:
https://{store_domain}/graphql
- OAuth Token:
https://login.bigcommerce.com/oauth2/token
Essential Headers:
X-Auth-Token: {access_token}
Content-Type: application/json
Accept: application/json
GraphQL Storefront Auth:
Authorization: Bearer {storefront_token}
1---
2name: bigcommerce-api
3description: BigCommerce API expert for building integrations, apps, headless storefronts, and automations. Full lifecycle - REST APIs, GraphQL Storefront, webhooks, authentication, app development, and multi-storefront. Use when working with BigCommerce platform APIs.
4metadata:
5 source: https://skillmd.com/skills/aibot88/bigcommerce-api
6---
7
8<essential_principles>
9
10<principle name="api-versioning">
11BigCommerce maintains V2 and V3 APIs concurrently. V3 is preferred for most operations:
12- **Catalog, Customers, Carts**: Use V3 (better pagination, metafields support)
13- **Orders**: V2 for CRUD operations, V3 for transactions/refunds
14- **Customer Groups**: Still V2 only (V3 migration planned)
15
16Always check which version supports your specific endpoint.
17</principle>
18
19<principle name="authentication-model">
20BigCommerce uses OAuth exclusively for V3 APIs:
21- **X-Auth-Token header**: REST APIs and GraphQL Admin
22- **Bearer token**: GraphQL Storefront API
23- **Store-level credentials**: Single store integrations
24- **App-level credentials**: Marketplace apps (OAuth flow)
25- **Account-level credentials**: Multi-store management
26
27Never embed credentials in client-side code. Use environment variables.
28</principle>
29
30<principle name="rate-limits">
31Respect rate limits to avoid blocking:
32- **Standard REST API**: 20,000 requests/hour
33- **Payments API**: 50 requests/4 seconds
34- **B2B Edition**: 150 requests/minute
35- **GraphQL**: Query complexity limits apply
36
37Monitor headers: `X-Rate-Limit-Requests-Left`, `X-Rate-Limit-Time-Reset-Ms`
38Implement exponential backoff with jitter for retries.
39</principle>
40
41<principle name="channel-awareness">
42All storefronts and sales channels have a `channel_id`:
43- Default storefront channel_id is always `1`
44- MSF stores have multiple channels
45- Products must be explicitly assigned to channels
46- Orders, carts, and checkouts should specify channel_id
47
48Always include channel_id when working with multi-storefront stores.
49</principle>
50
51</essential_principles>
52
53<intake>
54What would you like to do with BigCommerce APIs?
55
561. Build a new integration (REST API, webhooks, data sync)
572. Create a headless storefront (GraphQL Storefront, Next.js/Catalyst)
583. Develop a BigCommerce app (single-click app, marketplace)
594. Work with specific API (Catalog, Orders, Customers, Payments)
605. Debug an API issue (errors, authentication, rate limits)
616. Set up webhooks and event handling
627. Something else
63
64**Wait for response before proceeding.**
65</intake>
66
67<routing>
68| Response | Workflow |
69|----------|----------|
70| 1, "integration", "sync", "connect" | `workflows/build-integration.md` |
71| 2, "headless", "storefront", "next.js", "catalyst", "graphql" | `workflows/build-headless-storefront.md` |
72| 3, "app", "marketplace", "single-click" | `workflows/build-app.md` |
73| 4, "catalog", "orders", "customers", "payments", "specific" | `workflows/work-with-api.md` |
74| 5, "debug", "error", "fix", "troubleshoot", "401", "422" | `workflows/debug-api-issue.md` |
75| 6, "webhook", "webhooks", "events", "subscribe" | `workflows/setup-webhooks.md` |
76| 7, other | Clarify intent, then route to appropriate workflow |
77
78**After reading the workflow, follow it exactly.**
79</routing>
80
81<verification_loop>
82After every API operation:
83
84```bash
85# 1. Check response status
86# 200/201 = Success
87# 4xx = Client error (check request)
88# 5xx = Server error (retry with backoff)
89
90# 2. Verify rate limit headers
91X-Rate-Limit-Requests-Left: [remaining]
92X-Rate-Limit-Time-Reset-Ms: [reset time]
93
94# 3. For mutations, verify the change
95GET the resource to confirm state
96```
97
98Report to user:
99- "API call: [status]"
100- "Rate limit remaining: [X]"
101- "Data verified: [confirmation]"
102</verification_loop>
103
104<reference_index>
105
106**Authentication & Security:**
107- references/authentication.md - OAuth, tokens, scopes, credentials
108- references/security-best-practices.md - API keys, PCI compliance, headers
109
110**Core APIs:**
111- references/catalog-api.md - Products, categories, brands, variants
112- references/orders-api.md - Orders, shipments, transactions, fulfillment
113- references/customers-api.md - Customers, addresses, groups, segments
114- references/payments-api.md - Payment processing, gateways, checkout
115
116**Storefront & Content:**
117- references/graphql-storefront.md - GraphQL queries, carts, checkout
118- references/widgets-scripts.md - Widgets API, Scripts API, content injection
119- references/stencil-themes.md - Theme development, Handlebars, CLI
120
121**Platform Features:**
122- references/webhooks.md - Events, subscriptions, retry logic
123- references/multi-storefront.md - MSF, channels, site routing
124- references/headless-commerce.md - Next.js Commerce, Catalyst, React
125
126**Development:**
127- references/app-development.md - Single-click apps, Developer Portal
128- references/rate-limits-pagination.md - Throttling, cursor pagination, batching
129- references/error-handling.md - Status codes, troubleshooting, debugging
130
131</reference_index>
132
133<workflows_index>
134| Workflow | Purpose |
135|----------|---------|
136| build-integration.md | Create data sync, connect external systems |
137| build-headless-storefront.md | Next.js/Catalyst headless frontend |
138| build-app.md | Single-click marketplace app |
139| work-with-api.md | Use specific BigCommerce API |
140| debug-api-issue.md | Fix errors and authentication problems |
141| setup-webhooks.md | Configure webhook subscriptions |
142</workflows_index>
143
144<quick_reference>
145
146**Base URLs:**
147- REST API: `https://api.bigcommerce.com/stores/{store_hash}/v3/`
148- Payments: `https://payments.bigcommerce.com/stores/{store_hash}/payments`
149- GraphQL Storefront: `https://{store_domain}/graphql`
150- OAuth Token: `https://login.bigcommerce.com/oauth2/token`
151
152**Essential Headers:**
153```
154X-Auth-Token: {access_token}
155Content-Type: application/json
156Accept: application/json
157```
158
159**GraphQL Storefront Auth:**
160```
161Authorization: Bearer {storefront_token}
162```
163
164</quick_reference>