Skip to content

Guides

Authentication

Every call that touches shop data carries a secret key. Each key belongs to 1 shop and holds only the scopes you give it.

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.

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
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.

ScopeAllowsDashboard permissionOperations
shop:readRead the shop profile and planshop.view1
shop:writeUpdate the shop profileshop.manage1
products:readList and read products and their performanceproducts.view4
products:writeCreate, edit, publish, schedule, and delete productsproducts.manage6
collections:readList and read collectionsproducts.view2
collections:writeCreate, edit, and delete collectionsproducts.manage3
orders:readList and read orders with their tax, discounts, and gift cardsorders.view2
orders:writeMark orders fulfilledfulfillment.manage1
returns:readList and read returnsreturns.view2
returns:writeApprove, reject, receive, and refund returnsreturns.manage3
customers:readList and read customers, followers, tags, and notescustomers.view4
customers:writeTag customers and add notescustomers.manage4
income:readRead earnings, refunds, payouts, and statementsincome.view6
income:writeApprove or decline refundsrefunds.manage3
engagement:readRead comments, conversations, saved replies, and notificationsmessages.view6
engagement:writeReply to comments and customers, manage conversations, mark notifications readmessages.manage10
marketing:readRead promotions and affiliatespromote.view2
marketing:writeCreate and manage promotions and affiliatespromote.manage4
discounts:readRead discount codes and gift cardsdiscounts.view4
discounts:writeCreate and pause discount codes, issue and disable gift cardsdiscounts.manage5
email:readRead email campaigns, segments, and the suppression listemail.view4
email:writeWrite and delete draft email campaignsemail.manage3
library:readSearch the dropshipping product libraryproducts.view2
library:writeImport library products into the shopproducts.manage1
analytics:readRead revenue, traffic, and conversion reportsanalytics.view6
team:readRead the team, its roles, and pending invitesteam.view2
sites:readRead the shop site, its domains, theme, navigation, pages, and SEO settingsshop.view2
sites:writePublish the shop site and list it on the marketplaceshop.manage2
seo:readRead the SEO audit and redirectsshop.view2
seo:writeRun the SEO audit and manage redirectsshop.manage3
social:readRead social highlights and connected accountschannels.view1
blog:readList and read blog postsblog.view2
blog:writeWrite, publish, and delete blog postsblog.manage3
webhooks:readList webhook endpointsdevelopers.view1
webhooks:writeAdd, test, and delete webhook endpointsdevelopers.manage3

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.

  • GET/api/v1/catalog/productsSearch the public catalog
  • GET/api/v1/catalog/products/{slug}Get a public product
  • GET/api/v1/catalog/shopsList shops
  • GET/api/v1/catalog/shops/{slug}Get a shop
  • GET/api/v1/catalog/shippingGet shipping options
  • POST/api/v1/checkoutStart a hosted checkout