Keys and scopes
What each scope allows, and how keys made by team members work.
Scopes
Each endpoint needs one scope, shown at the top of its page in the API reference.
You choose a key's scopes when you create it. GET /ping needs no scope.
| Scope | Allows | Portal permission it needs |
|---|---|---|
catalog:read | Read your products, variants, categories and brands | Catalog |
catalog:write | Create and edit products and variants | Catalog |
inventory:write | Update stock and prices | Catalog |
orders:read | Read your orders (no customer contact details) | Orders |
orders:write | Accept orders and prepare cash-on-delivery invoices | Orders |
orders:cancel | Cancel orders, or single lines, before pickup | Orders |
orders:read_pii | Read customers' names, phone numbers, email addresses and delivery addresses | Orders |
fulfillment:write | Add and correct self-ship tracking | Logistics |
documents:read | Download tax invoices (they show the customer's name and address) | Documents |
labels:read | Download shipping labels and manifests (they show the customer's address) | Logistics |
returns:read | Read returns raised on your orders | Returns |
webhooks:manage | Manage webhook endpoints and read the event list | Orders |
Give each key only the scopes it needs. A script that only updates stock needs inventory:write
and nothing else.
Customer-data scopes
orders:read_pii, documents:read and labels:read reach customer details: the first returns them
on orders, and the other two download documents that print them. Each works on its own: a key with
documents:read can download invoices without orders:read_pii. All three stop working for an order
90 days after it closes. See Customer details.
Keys made by team members
The seller account owner holds every permission, so an owner's key can hold every scope.
A team member's key can only hold scopes that the member's own permissions cover, and this is checked again on every request:
- If the member loses a permission, the key loses the scopes that need it at once.
- If the member is suspended or removed, the key stops working at once.
GET /ping returns the scopes a key can use right now: those chosen when it was made that its
creator still holds.
Managing keys
- Keys are created, listed and revoked only in the seller portal, under Developer. A key cannot create another key, and an API key never works as a portal sign-in.
- The owner sees and can revoke every key. A member sees and can revoke only their own.
- A seller can have up to 10 working keys at once, owner and members together.
- A key can have an expiry date. After it, the key gets
401 UNAUTHORIZED. - Revoking takes effect on the next request.
- If the key is for an ERP or order-management system, choose it under Used by when you create the key: Unicommerce, EasyEcom, Vinculum, Browntape or Increff. For your own systems, leave it at "None / our own system". Keys with the same partner share a partner rate limit (see Errors and limits).
Seller API Terms
Once Bhakti Baazar publishes the Seller API Terms, a new key can be created only after your account
has accepted the current version. Until then, creating a key fails with 403 API_TERMS_NOT_ACCEPTED.
The account owner, or a member with the Legal permission, accepts them in the portal. A new version
of the terms asks again for new keys. Keys made earlier keep working.
When a key is refused
| Status | code | Why |
|---|---|---|
| 401 | UNAUTHORIZED | No key was sent, or the key is not valid, revoked or expired. |
| 403 | FORBIDDEN | The key does not have the scope this endpoint needs, or the member who created it no longer holds the permission for it. |
| 403 | FORBIDDEN | The member who created the key no longer has access to the seller account. |
| 403 | FORBIDDEN | The seller account is not approved yet, or has been removed. The API is available once the account is approved. |
The message says which case it is. See Errors and limits.