Skip to content

Errors

A v2 error answers an HTTP status and a google.rpc.Status body. The body’s code is a gRPC status code, not the HTTP status, and message says what went wrong. Branch on the HTTP status, and log message for anything you don’t handle automatically. v1 errors use different bodies and a few different status meanings; see the aside at the end.

{
"code": 7,
"message": "missing required scope \"inventory:self\"",
"details": []
}
  • code is an integer gRPC code. The table below maps each one to its HTTP status.
  • message is a human-readable string. Don’t match on its exact wording.
  • details is an array of typed objects, each carrying an @type. It is often empty.
HTTP code When
400 3 An argument failed validation, such as a malformed timestamp or a cursor the route can’t read.
401 16 The request carried no token.
403 7 The token is valid but lacks the scope the service needs, is not bound to an integration, or its integration is inactive.
404 5 The thing addressed, or the route itself, does not exist.
429 8 Resource exhausted, such as a rate limit. See Throttle limits.
500 13 An unhandled error on our side. Code 2 (unknown) also answers 500.
503 14 A service the call depends on is unavailable. Transient.

Scope failures are the common 403. The scoped services name the missing scope in message, as in the example above. See Scopes. Nothing else in the error body tells the three causes apart, so the two rarer ones are the place to read message:

  • No integration. The token resolves but isn’t bound to any integration, and message says so.
  • Inactive integration. The integration was switched off in Zentail. message says the integration is inactive. For a signal you can match on, call the status route of the API that refused you: GET /v2/inventory/status or GET /v2/shipping/status. Both still answer, and their integration_active check fails.

Only the inventory and shipping routes answer an inactive integration with this 403. They refuse it here:

Your code can’t clear this 403, and retrying won’t help. Stop making the refused calls with that token, and ask the seller to contact Zentail support at [email protected]. Support can reactivate the integration. The same token then works again, with no new authorization needed. Keep polling the status route, and resume the refused calls once its integration_active check passes.

  • Retry with backoff: 429 and 503. Both are transient.
  • Do not retry unchanged: 400, 401, 403 and 404. The request or the credential has to change first. The one exception is the inactive-integration 403: the same token works again once support reactivates the integration, so resume when the status route’s integration_active check passes.
  • Retry once, then escalate: 500. If it repeats, send us the time, the route and the message.

API changelog · Built f1d143e6