Public API
Errors
Every error uses the same JSON shape.
Error shape
json
{ "error": { "code": "product_unavailable", "message": "Product unavailable: Ribs BBQ" } }Common codes
Show message to users for 4xx. For 5xx, show something generic and retry.
| Status | Code | Meaning |
|---|---|---|
| 401 | missing_api_key | No key sent |
| 401 | invalid_api_key | Unknown or revoked key |
| 403 | insufficient_scope | Publishable key on a secret-only endpoint |
| 403 | origin_not_allowed | Domain not registered for this publishable key |
| 400 | product_not_found | Unknown productId |
| 409 | product_unavailable | Item switched off or soft 86'd at the requested location |
| 400 | invalid_location | locationId belongs to another restaurant |
| 400 | missing_location | locationId required when restaurant has multiple locations |
| 429 | rate_limit_exceeded | Slow down; see Retry-After |
| 500 | internal_error | Our fault — retry with the same idempotency key |