Authentication
`bzk_` and `bzp_` keys, the Authorization header, buyer sessions, rotating and revoking keys.
Send the key only in Authorization: Bearer <key>. A key in the query string is rejected with API_KEY_IN_QUERY (400).
curl https://api.bazzario.app/v1/admin/products \
-H "Authorization: Bearer bzk_YOUR_KEY"Secret key scopes
A scope is <resource>:read or <resource>:write; write includes read. Resources: products, categories, brands, orders, customers, discounts, inventory, reviews, webhooks. A request without the required scope returns 403 API_KEY_SCOPE_INSUFFICIENT.
GET /v1/admin/store is open to any valid secret key. Payment, delivery, team and billing settings are not available through the API.
Public key and the browser
- A public key is limited to a list of allowed site origins.
Originis matched exactly; otherwise 403API_KEY_ORIGIN_NOT_ALLOWED. - CORS on
/v1/storefrontechoes theOriginwithout cookies. CORS is off on/v1/admin. - Requests without
Origin(server-side) are allowed, but see Rate limits: orders and buyer login must come from the browser.
Buyer session
Authorization carries the key, so the buyer token goes in X-Customer-Token. It is returned by POST /v1/storefront/auth/login and /auth/register, works only with a key of its own store, and /auth/logout invalidates it.
curl https://api.bazzario.app/v1/storefront/auth/me \
-H "Authorization: Bearer bzp_YOUR_KEY" \
-H "X-Customer-Token: <buyer token>"Rotation, revocation, expiry
- Rotation: the new key is issued at once and the old one keeps working for 1 hour (status “Rotating”).
- Revocation is immediate and cannot be undone.
- Expiry: never, 30, 90 or 365 days. The owner is notified 7 days before.
- At most 10 active keys per store (
API_KEY_LIMIT, 422). - After a plan downgrade keys stop working (403
PLAN_FEATURE_LOCKED) and resume when the store is back on Business.
| Code | HTTP | Reason |
|---|---|---|
API_KEY_INVALID | 401 | Missing, wrong or wrong-type key |
API_KEY_REVOKED | 401 | Key revoked |
API_KEY_EXPIRED | 401 | Key expired |
API_KEY_BROWSER_FORBIDDEN | 403 | Secret key sent with an Origin header |