Skip to content
QaydTech Beta launch

Getting started

Errors

One shape for every error, with stable codes.

Every error has the same shape: a stable code, a message explaining why, and the faulty fields when there are any.

{
  "error": {
    "code": "validation",
    "message": "Some of the data sent is not valid.",
    "fields": { "lines.0.quantity": ["…"] }
  }
}
401 unauthenticated
The key is missing, wrong, revoked or expired.
403 plan / scope / forbidden
The plan does not include the API, or the key lacks the permission.
404 not_found
Not found.
409 idempotency_conflict
The Idempotency-Key was used for a different request.
422 validation
Invalid data; details in fields.
422 <reason>
An accounting rule prevents the action, such as customer_stopped or credit_exceeds.
429 rate_limited / monthly_limit
The per-minute or the plan’s monthly limit was exceeded.
403 test_key
A test key never issues documents: it reads and creates drafts only. Use a live key to issue.
422 policy
The business’s sales policy refuses to issue this document.
403 plan_module
The business’s plan does not include the system this section belongs to.
409 idempotency_busy
A request with the same Idempotency-Key is still running. Try again in a moment.
422 books
The books refuse this.