On this page
DocsAPI reference
Errors
We use normal HTTP status codes, and every error has the same shape with a stable
code you can branch on.The error object#
| Field | What it is |
|---|---|
type | The broad kind of error. |
code | A stable, specific code (table below). Branch on this. |
message | A plain-English explanation. Fine to log; may change wording. |
param | The field at fault, when there is one, e.g. shipping.address.postal_code. |
request_id | Also in the Request-Id header. Send it to us when asking for help. |
400 Bad Request
{ "error": { "type": "invalid_request_error", "code": "parameter_missing", "message": "items[0].artwork.url is required.", "param": "items[0].artwork.url", "request_id": "req_Xb4Nq8Lm2Rt7Vw" }}Error codes#
| HTTP | type | code | When |
|---|---|---|---|
| 400 | invalid_request_error | parameter_missing | A required field is missing. param names it, e.g. items[0].artwork.url. |
| 400 | invalid_request_error | parameter_invalid | Wrong type or value: an unknown sku, a bad state or ZIP. param names it. |
| 400 | invalid_request_error | invalid_json | The body is not valid JSON. |
| 401 | authentication_error | invalid_api_key | The key is missing, unknown or revoked. |
| 402 | invalid_request_error | payment_method_required | POST /v1/charges (live) with no card on file. |
| 403 | permission_error | live_access_required | A live key on an account that isn’t approved. |
| 403 | permission_error | sandbox_only | /simulate called with a live key. |
| 404 | not_found_error | resource_missing | No such object in this account and environment, or an unknown URL. |
| 409 | invalid_request_error | order_not_cancelable | The order is already in production or later. |
| 409 | idempotency_error | idempotency_key_reused | The same Idempotency-Key was used with a different request. |
| 422 | invalid_request_error | artwork_url_invalid | The artwork URL isn’t https:// (or a test-artwork URL on a live key). |
| 500 | api_error | internal_error | Something went wrong on our side. Retry with the same Idempotency-Key. |
Artwork problems found after the order is created don’t return an error — the order becomes rejected with a status_reason instead. See reason codes.
Handling errors#
- 4xx: fix the request. Retrying the same request gives the same answer.
- 5xx and network errors: retry with backoff, using the same
Idempotency-Key, so you never create an order twice. - 409 idempotency_key_reused: you reused a key for a different order. Use a new key per order (your own order id works well).
- Show
messageto your team, not raw to end customers.
Stuck? Email developers@jigsawpress.com with the request_id, or call (609) 831-2826.