1. Getting started
  2. Errors
StatusMeaningWhat to do
400Invalid body: missing required field, wrong format, or field not allowed.Fix the payload. In PATCH /enterprise/organizations/{id}, don’t send CNPJCPF or extra fields.
401Credential missing, invalid, or expired.Check the header (x-api-key or x-enterprise-key). Generate a new key if the current one has expired.
402Issuing blocked by the account’s plan or balance.Contact Treeunfe’s sales team.
403No permission. Includes Organization is inactive.Check the key’s scopes and whether the organization is active.
404Resource not found.Check the ID and whether it belongs to the key’s organization.
422Invoice or event rejected during validation or by SEFAZ.Read the reason in the response, fix it, and send it again.
503SEFAZ unavailable.Try again later, with increasing intervals between attempts.

On 503, don’t generate an invoice with a new number. Resend the same invoice, with the same nNF and the same serie, so you don’t leave gaps in the numbering.