Guides
Authentication
API keys
Create keys in your dashboard under Developers. A key looks like 3c_live_ followed by 43 random characters. It acts as your shop: every result is limited to that shop's products, orders, and customers.
The Authorization header
Send the key as a bearer token on every request. A missing key on a protected endpoint answers 401 unauthorized, and an unknown, revoked, or expired one answers 401 invalid_key.
curl https://3commerce.com/api/v1/shop \
-H "Authorization: Bearer 3c_live_…"Scopes
A key can only call operations its scopes allow. A :write scope also grants the matching :read. Calling outside them answers 403 insufficient_scope.
| Scope | Allows | Dashboard permission | Operations |
|---|---|---|---|
shop:read | Read the shop profile and plan | shop.view | 1 |
shop:write | Update the shop profile | shop.manage | 1 |
products:read | List and read products and their performance | products.view | 4 |
products:write | Create, edit, publish, schedule, and delete products | products.manage | 6 |
collections:read | List and read collections | products.view | 2 |
collections:write | Create, edit, and delete collections | products.manage | 3 |
orders:read | List and read orders with their tax, discounts, and gift cards | orders.view | 2 |
orders:write | Mark orders fulfilled | fulfillment.manage | 1 |
returns:read | List and read returns | returns.view | 2 |
returns:write | Approve, reject, receive, and refund returns | returns.manage | 3 |
customers:read | List and read customers, followers, tags, and notes | customers.view | 4 |
customers:write | Tag customers and add notes | customers.manage | 4 |
income:read | Read earnings, refunds, payouts, and statements | income.view | 6 |
income:write | Approve or decline refunds | refunds.manage | 3 |
engagement:read | Read comments, conversations, saved replies, and notifications | messages.view | 6 |
engagement:write | Reply to comments and customers, manage conversations, mark notifications read | messages.manage | 10 |
marketing:read | Read promotions and affiliates | promote.view | 2 |
marketing:write | Create and manage promotions and affiliates | promote.manage | 4 |
discounts:read | Read discount codes and gift cards | discounts.view | 4 |
discounts:write | Create and pause discount codes, issue and disable gift cards | discounts.manage | 5 |
email:read | Read email campaigns, segments, and the suppression list | email.view | 4 |
email:write | Write and delete draft email campaigns | email.manage | 3 |
library:read | Search the dropshipping product library | products.view | 2 |
library:write | Import library products into the shop | products.manage | 1 |
analytics:read | Read revenue, traffic, and conversion reports | analytics.view | 6 |
team:read | Read the team, its roles, and pending invites | team.view | 2 |
sites:read | Read the shop site, its domains, theme, navigation, pages, and SEO settings | shop.view | 2 |
sites:write | Publish the shop site and list it on the marketplace | shop.manage | 2 |
seo:read | Read the SEO audit and redirects | shop.view | 2 |
seo:write | Run the SEO audit and manage redirects | shop.manage | 3 |
social:read | Read social highlights and connected accounts | channels.view | 1 |
blog:read | List and read blog posts | blog.view | 2 |
blog:write | Write, publish, and delete blog posts | blog.manage | 3 |
webhooks:read | List webhook endpoints | developers.view | 1 |
webhooks:write | Add, test, and delete webhook endpoints | developers.manage | 3 |
Scopes and team roles
A key belongs to the shop, not to the person who made it. Only members whose role holds developers.manage, the owner and admins, can create or revoke keys, and only with the scopes their role holds: each scope stands for the dashboard permission in the table above. After that the key's scopes are the authority. A call never checks a role, and a key keeps working when the member who made it leaves, so revoke it then. Changes made with a key show in the audit log as api-key: and the start of its id.
Rotating and revoking
To rotate a key, create a new one with the same scopes, deploy it, then revoke the old one in the dashboard. Revoking takes effect on the next request. Keys can also expire on their own after 30, 90, or 365 days.
Public endpoints
Catalog reads serve what any shopper can already see, so they need no key. Use them for custom storefronts and product feeds. See the Catalog reference.
/api/v1/catalog/productsSearch the public catalog/api/v1/catalog/products/{slug}Get a public product/api/v1/catalog/shopsList shops/api/v1/catalog/shops/{slug}Get a shop/api/v1/catalog/shippingGet shipping options/api/v1/checkoutStart a hosted checkout