Base URL & store identification
Envelope
Every JSON response uses the same envelope:Errors
On errorserror_code carries a stable machine-readable code and data is usually null.
The frontend should switch on error_code, not display error (English, for debugging
only).
- Some refusals put the details needed to explain them in
data: for examplecheckout.min_order_not_metcarriesmin_order_total,subtotal, andcurrency. - Validation (422):
error_codeisvalidation.failedand the response also hasdetail, the list of invalid fields (the field is the last element ofloc). - Rate limit (429): the response is
{"detail": "..."}, without the envelope.
Pagination
Lists acceptpage and page_size and return meta:
Internationalization
Many content endpoints accept?lang=it|en|sq (or the Accept-Language header) and
return fields already resolved in the requested language, falling back to the store’s
default language.
Images
Image paths are relative (/uploads/products/xyz.webp): prepend the store’s origin
→ https://<domain>/uploads/.... In production they are served via a CDN/signed
redirect, so use the URL exactly as returned.
Multi-tenancy in brief
Each store is an isolated tenant. The publishable key and domain determine the tenant for storefront calls; the staff token’stenant_id claim determines it for the
Admin API. There is no way, with one store’s credentials, to see another store’s data.