Errors
Every error has the same body:
{ "error": { "code": "ORDER_NUMBER_TAKEN", "message": "Order 100001 already exists in this store", "field": "number" } }code is stable; branch on it. message is for people and may change. field names the input at fault, when there is one.
| Status | When | Example codes |
|---|---|---|
400 |
The request does not match the schema. | INVALID_INPUT |
401 |
No key, or an unknown or revoked one. | UNAUTHENTICATED |
403 |
The key lacks the scope, or the account or module does not allow it. | FORBIDDEN, SUSPENDED, TICKETING_DISABLED |
404 |
The addressed record does not exist, or the key may not use its product. | ORDER_NOT_FOUND, PRODUCT_NOT_FOUND |
409 |
It would clash with an existing record. | EMAIL_TAKEN, ORDER_NUMBER_TAKEN, KEY_TAKEN |
422 |
It breaks a rule, or names a record that does not exist. | INVALID_PERIOD, STORE_NOT_FOUND (with field) |
429 |
Too many requests for this key. | RATE_LIMITED |
500 |
Something went wrong on our side. | INTERNAL |
A *_NOT_FOUND with a field is a bad reference inside your input (422); without one, it is the record in the path (404).