Builder's guide · Appendix B

Error codes you will meet first

CodeHTTPMeaning and what the screen should do
VALIDATION_ERROR400/422One or more fields are wrong; mark each one from details[].field
AMOUNT_INVALID422An amount isn't a two-decimal string
JOURNAL_UNBALANCED422Debits don't equal credits; show both totals
PERIOD_CLOSED422The date falls in a closed period; suggest a date in an open one
CONTROL_ACCOUNT_RESTRICTED422That account is fed by a subledger; use the right document (bank, invoice, bill)
INSUFFICIENT_FIFO_QUANTITY422Not enough stock at that location to issue
DOCUMENT_NOT_DRAFT409The document was already posted; refresh and show its current state
DOCUMENT_NUMBER_ASSIGNED422A number series assigns this number; don't send one
IDEMPOTENCY_KEY_MISSING400A write without a key: a bug in your client
IDEMPOTENCY_KEY_REUSED409Same key, different body: a bug in your key handling
IDEMPOTENCY_KEY_IN_PROGRESS409The first attempt is still running; wait and retry with the same key
OPERATION_NOT_PERMITTED403The writer's role doesn't allow this route
COMPANY_NOT_IN_SCOPE403The writer isn't scoped to that company; an administrator widens the scope
INTERNAL_ERROR500Unexpected; safe to retry with the same idempotency key

Codes are permanent: once published, a code is never renamed or reused. The full registry is section C3 of docs/api-conventions.md.