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#

FieldWhat it is
typeThe broad kind of error.
codeA stable, specific code (table below). Branch on this.
messageA plain-English explanation. Fine to log; may change wording.
paramThe field at fault, when there is one, e.g. shipping.address.postal_code.
request_idAlso 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#

HTTPtypecodeWhen
400invalid_request_errorparameter_missingA required field is missing. param names it, e.g. items[0].artwork.url.
400invalid_request_errorparameter_invalidWrong type or value: an unknown sku, a bad state or ZIP. param names it.
400invalid_request_errorinvalid_jsonThe body is not valid JSON.
401authentication_errorinvalid_api_keyThe key is missing, unknown or revoked.
402invalid_request_errorpayment_method_requiredPOST /v1/charges (live) with no card on file.
403permission_errorlive_access_requiredA live key on an account that isn’t approved.
403permission_errorsandbox_only/simulate called with a live key.
404not_found_errorresource_missingNo such object in this account and environment, or an unknown URL.
409invalid_request_errororder_not_cancelableThe order is already in production or later.
409idempotency_erroridempotency_key_reusedThe same Idempotency-Key was used with a different request.
422invalid_request_errorartwork_url_invalidThe artwork URL isn’t https:// (or a test-artwork URL on a live key).
500api_errorinternal_errorSomething 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 message to your team, not raw to end customers.

Stuck? Email developers@jigsawpress.com with the request_id, or call (609) 831-2826.