Skip to main content
Every /tryon/v1/* endpoint returns errors in the same JSON shape. Branch on code; it’s the stable contract. Treat message as human-readable text that may be polished between releases.
Error shape
For validation failures (Zod rejections of the request body) the response also includes a details array with one entry per offending field:
Validation shape
The HTTP status in the response always matches the status field. You can read either; both are part of the contract.

Codes

Codes are grouped by what triggered them. Branching on the code is enough; the same code always means the same thing across endpoints.

Auth

Authorization

Request validation (400)

Unprocessable product

Payload size

Billing

Rate limiting

Not found

Conflicts

Server

Handling errors in code

Switch on code and let the message bubble up to your logs/UI for debugging. Don’t parse message; it’s polished text, not a stable identifier.

Retry guidance