Errors
The shape of every error response and the stable codes your program can branch on.
Every error answers { "error", "message" }: error is a stable code in English for your program to branch on, and message is a text in Spanish that you can show as is. 401 and 403 responses add docs with the URL of this documentation, for anyone who reaches the API without having read it.
| HTTP | error | When |
|---|---|---|
400 | VALIDATION | A field is missing or has an invalid format. `issues` says which one. |
401 | UNAUTHORIZED | The key is missing, does not exist or was revoked. |
402 | NOT_PREMIUM | The restaurant has no active subscription or trial. |
403 | FORBIDDEN | The key lacks the permission the endpoint requires. |
404 | NOT_FOUND | The restaurant is not in your account, or the product or category does not exist in it. |
409 | CONFLICT | Duplicate category name, identifier already taken, or category that still has products. |
422 | LIMIT | A limit was reached. |
500 | INTERNAL | Something failed on our side. Try again in a moment. |