Skip to content

Error codes

Every failed request returns one entry per problem in errors:

{
"errors": [
{
"code": "inclusion",
"field": "material",
"message": "material must be one of cotton, wool, …"
}
]
}

Branch on code; message may change.

Each status comes with one of these codes:

Status code Meaning What to do
400 invalid The body is not valid JSON. Fix the JSON.
401 unauthorized Token missing, unknown, expired or revoked. Check it with GET /me. Do not retry.
404 not_found Not found, or another merchant’s. Check the id.
422 blank, inclusion, invalid, taken, … Validation failed; nothing was written. field names the culprit. Fix the payload.
5xx Our side. Retry with backoff.

The list of codes is open: treat one you do not know as a payload to fix, not a request to retry.

Product problems in an import arrive later, in the import’s errors, and image problems on each image’s error.