Reference
Error codes
Consolidated error code reference of the TF Fiscal Open API, grouped by layer and domain, with HTTP status, scenario and recommended handling.
Error shapes
Errors come in three shapes depending on which layer produced them, see General conventions:
| Layer | HTTP | Shape | Code field |
|---|---|---|---|
| Platform gateway (authentication, subscription, rate limit, body size, file download links) | 401 / 403 / 404 / 413 / 429 / 503 | Platform envelope {success, errorType, code, message} | code (integer) |
| Companies, NF-e, CT-e, DC-e, webhook registration | 400 / 404 | Array [{codigo, mensagem}], one entry per problem | codigo (string) |
| NF-e verification and identity lookup | 400 / 422 / 428 / 451 / 500 / 503 | Bare object {code, message} | code (integer) |
Messages are localized by the Language / Accept-Language headers (default Portuguese). Branch on codes, never on message text. In the array shape GW001, CER0005, NFe0001, CTe0001, DCe0001, DCe0000x and NFSe0001 keep their alphanumeric values; all other codigo values are the platform error code as a numeric string.
Code ranges by domain:
| Range | Domain |
|---|---|
| 10001xxx | Request validation and platform faults |
| 10003xxx | Company and certificate |
| 10004xxx | NF-e issuance, cancellation and correction letter |
| 10005xxx | Tax engine |
| 10009xxx | Open platform (authentication, subscription, rate limit, webhooks, download links) |
| 10013xxx | File download |
| 10015xxx | NF-e verification |
| 10016xxx | Identity lookup (CNPJ / CPF) |
| 10017xxx | CT-e |
| 10018xxx | NFS-e |
| 10019xxx | DC-e |
Gateway: authentication and authorization
Platform envelope shape, produced before the request reaches the API. 401 and 403 are configuration errors; retrying without a fix is pointless and may trip rate limits. See Authentication for the signing scheme.
| HTTP | code | Meaning | Action |
|---|---|---|---|
| 401 | 10009000 | Missing signature headers (token / sign / timestamp) | Send all three headers on every request |
| 401 | 10009001 | Timestamp invalid or clock skew beyond ±300 s | Sync your clock (NTP); regenerate the timestamp per request, never reuse |
| 401 | 10009002 | Invalid token | Check the app_secret; if rotated, update your configuration |
| 401 | 10009003 | Signature mismatch | Re-derive the signature; see the checklist in Authentication |
| 403 | 10009004 | Application disabled | Contact the platform |
| 403 | 10009015 | Application not effective (pending approval or rejected) | Wait for approval / contact the platform |
| 403 | 10009014 | Integrator account disabled | Contact the platform |
| 403 | 10009005 | API not subscribed | Request subscription for the endpoint being called |
| 429 | 10009006 | Rate limit exceeded | Back off and retry (start at 1 s, double up to 30 s, add jitter); limits apply per application and per endpoint group |
| 413 | 10009027 | Request body exceeds the gateway size limit | Send smaller bodies; for NF-e verification send a single NF-e of at most 1 MB |
Download links (linkDanfe, linkDownloadXml, linkDacce, nfeLinkXml, cteLinkDacte, dceLinkDace and the like) are plain GET requests without signature headers; their failures are HTTP statuses with the platform envelope, see File download:
| HTTP | code | Meaning | Action |
|---|---|---|---|
| 401 | 10009035 | Download link invalid (path altered, token reused or signature mismatch) | Use the link exactly as returned by the query API |
| 401 | 10009036 | Download link expired | Query the document again for a fresh link |
| 503 | 10009037 | File not ready yet | Retry the same link after Retry-After |
| 404 | 10013011 | Downloaded file not found | Check where the link came from |
| 429 | 10013016 | Too many downloads from one IP through callback links | Retry after Retry-After |
Request validation and platform faults
| code | HTTP | Shape | Scenario | Action |
|---|---|---|---|---|
| 10001001 | 400 | Array | Request field validation failed, one entry per field; also registration / update contract errors of the emissaoDCe section (both configuration blocks missing, update changing cnpj / municipality, lowering the series cursor, switching series) | Fix per mensagem |
| 10001000 | 500 | Bare | Platform-side fault on a verification or identity call | Retry with backoff; if persistent, contact the platform with the failing timestamp and path |
Companies and certificates
Array shape. See Companies.
| codigo | HTTP | Scenario | Action |
|---|---|---|---|
GW001 | 400 | Registration: city / state cannot be resolved to an IBGE code; issuance: recipient IBGE municipality code does not exist or is inconsistent with uf | Check the UF and city name / IBGE code |
CER0005 | 400 | Certificate password mismatch | Check the password |
| 10003000 | 404 | empresaId does not exist or does not belong to this application | Check the empresaId |
| 10003002 | 400 | CNPJ already registered | The company exists; use the original empresaId |
| 10003006 | 400 | Registration data missing the IE | Provide inscricaoEstadual |
| 10003010 | 400 | Certificate CNPJ does not match the company | Use the correct certificate |
| 10003011 | 400 | Certificate expired | Use a valid certificate |
| 10003012 | 400 | Certificate identical to the currently active one | Nothing to upload |
| 10009033 | 400 | Invalid webhook registration (id mismatch / non-JSON contentType) | Fix as described, see Register webhook |
NF-e
Array shape. Business errors are HTTP 400; an unknown document is HTTP 404 with codigo NFe0001. SEFAZ rejections during issuance are not HTTP errors: they surface as query status Negada and the invoice.rejected webhook. See NF-e.
| codigo | HTTP | Scenario | Action |
|---|---|---|---|
NFe0001 | 404 | The nfeId for query / cancellation / correction letter does not exist | Check the id sent at issuance and the empresaId |
| 10004002 | 400 | Too many pending issuance tasks for the CNPJ | Retry later |
| 10004004 | 400 | Company not issuable (not yet approved or certificate not ready) | Wait for approval / link the certificate |
| 10004012 | 400 | Cancellation / correction letter: invoice not in authorized status | Query to confirm the status |
| 10004013 | 400 | Cancellation: outside the 24-hour window | Issue a return invoice instead |
| 10004014 | 400 | Cancellation: refused by SEFAZ (status code and reason attached) | Act on the SEFAZ reason |
| 10004015 | 400 | Correction letter: 20 letters already registered on the invoice | No further letters; cancel + reissue or return invoice |
| 10004016 | 400 | Correction letter refused by SEFAZ (status code and reason attached) | Act on the SEFAZ reason |
| 10004017 | 400 | Correction letter: fewer than 15 characters after sanitising | Rewrite in Portuguese / ASCII |
| 10004019 | 400 | Correction letter: outside the 720-hour window after authorization | Cancel + reissue or return invoice only |
| 10004021 to 10004026 | 400 | Return invoice references: missing reference / reference on a non-return invoice / original not found or not this company / original not authorized / original item not found / quantity above the original line | See the return invoice rules in Issue NF-e |
| 10004030 | 400 | ambienteEmissao does not match the company's current environment | Submit under the company environment or ask operations to switch it, see Environments |
| 10004031 | 400 | Value not supported (presencaConsumidor / multiple payments / unknown payment type / tipoPessoa inconsistent with the document / CPF buyer carrying inscricaoEstadual) | Adjust to the supported range in Issue NF-e |
| 10004034 | 400 | CNPJ buyer without cliente.inscricaoEstadual | Send the buyer's state registration (ICMS taxpayer) |
| 10004043 | 400 | Contract field missing (base reduction / ST margin and rate / deferral / unit tax amount / IPI code / pCredSN absent from both request and profile); mensagem names the field path | Fill the field per the tax code matrix in Issue NF-e |
| 10004044 | 400 | Field not applicable to the tax code (substituicaoTributaria on a non-ST code, percentualCreditoSimples on a non-credit code) | Remove the group |
| 10004045 | 400 | The CNPJ buyer's cliente.inscricaoEstadual fails the check-digit rule of the buyer's state (SEFAZ would reject with 209 after numbering) | Check the buyer's IE and state |
| 10004046 | 400 | Tax code does not match the company regime (CRT 1/4 needs a 3-digit CSOSN, CRT 2/3 a 2-digit CST) | Use the code family of the company's regime |
| 10004047 | 400 | A non-taxpayer buyer with a taxpayer-only code (10/30/70, 101/201/202/203) or with pCredSN | Use 102 / 500 or 900 without credit |
| 10005000 | 400 | Rejected by the tax engine (regime / tax code mismatch, ST code for a non-taxpayer buyer, rate out of range) | See the tax parameter rules in Issue NF-e |
NFC-e
Array shape. Business errors are HTTP 400; an unknown document or company is HTTP 404. SEFAZ rejections are not HTTP errors: they surface as query status Negada and the nfce.rejected webhook. See NFC-e.
| codigo | HTTP | Scenario | Action |
|---|---|---|---|
| 10022006 | 404 | nfceId does not exist | Check the id and the empresaId |
| 10003000 | 404 | empresaId does not exist | Check the empresaId |
| 10022001 | 400 | NFC-e not enabled for the company current environment | Send that environment in emissaoNFeConsumidor on registration or update |
| 10022002 | 400 | The company cannot issue (not approved or certificate unavailable) | Wait for approval or upload the certificate |
| 10022003 | 400 | ambienteEmissao differs from the company current environment | Submit in the company environment |
| 10022004 | 400 | Violates an NFC-e rule; mensagem names it | Fix it, or issue an NF-e |
| 10022007 | 400 | Cancellation deadline passed (30 minutes for cancellation, 168 hours for substitution) | Follow the state rule and issue a reversing NF-e |
| 10022008 | 400 | The status does not allow it (not authorized, cancellation in progress) | Query to confirm the status |
| 10022009 | 400 | The state requires QR code v2 and the company has no usable CSC | QR code v2 is switched on by the platform and the CSC only takes effect in production; contact the platform |
| 10001001 | 400 | Request field validation failed | Fix as per mensagem |
| 10005000 | 400 | The tax engine rejected the request | Fix as per mensagem |
Common 10022004 reasons: presence not allowed; delivery or pickup place out of state, or the buyer is a taxpayer; amount above the cap; identification missing; delivery without carrier or address, or carrier or freight on a non-delivery sale; delivery not allowed in the state; CFOP or tax code outside the NFC-e list; underpayment, wrong change or SemPagamento, or a card terminal or description on a payment type that does not accept it; fields NFC-e does not accept (all listed at once); unknown value names.
Common SEFAZ rejections (echoed as is in motivoStatus): 704 issue time more than 5 minutes before SEFAZ received it; 717 presence not allowed; 725 CFOP not allowed; 750 identification threshold reached without identifying the consumer; 780 above the state cap; 785 / 786 / 787 / 788 delivery not allowed in the state, delivery without carrier, without consumer, without address; 462 / 463 / 464 CSC not registered, revoked, QR code check mismatch; 865 payments below the invoice total.
CT-e
Array shape. Business errors are HTTP 400; a missing document / task is HTTP 404 with codigo CTe0001. SEFAZ rejections during issuance surface as query status Negada and the cte.rejected webhook. See CT-e.
| codigo | HTTP | Scenario | Action |
|---|---|---|---|
CTe0001 | 404 | cteId not found or not owned by the company | Check id and empresaId |
| 10003000 | 404 | empresaId not found | Check empresaId |
| 10017004 | 400 | Company cannot issue (not approved / certificate not ready) | Wait for approval / link the certificate |
| 10017005 / 10017006 | 400 | Concurrent duplicate request / too many pending tasks for the CNPJ | Retry later |
| 10017007 | 400 | Number series unresolved (none configured, or several enabled without a choice) | Configure a model 57 series |
| 10017010 | 400 | ambienteEmissao differs from the company's environment | Submit for the company's environment |
| 10017011 | 400 | Municipality IBGE code not found | Check codigoIbge |
| 10017012 / 10017013 | 400 | Party missing / taker inconsistent with the IE indicator | Add the party or change indicadorIeTomador |
| 10017014 | 400 | Invalid document references (missing, bad check digit, mixed groups, previous documents inconsistent with the service type) | Adjust the references |
| 10017015 | 400 | Document type inconsistent with references (complementary / substitute) | Send ctesComplementados / cteSubstituido per tipo |
| 10017016 | 400 | Components do not sum to the total, or aReceber above the total | Fix the amounts |
| 10017017 / 10017018 / 10017019 | 400 | Invalid RNTRC / unsupported modal / invalid enum or format (mensagem names the field) | Fix per mensagem |
| 10017020 to 10017025 | 400 | Tax parameter missing / not allowed / regime mismatch / icmsUfFim required / rate table row missing / unsupported CST | See the tax parameters in CT-e |
| 10017030 | 400 | Same id with a different message | Use a new id or resend the original message |
| 10017031 | 400 | Production: an active / authorized document already exists for the id | Query the original |
| 10017040 to 10017045 | 400 | Status does not allow the event / cancellation window exceeded / invalid event text / SEFAZ rejected the event / correction sequence limit / referenced event not found | See the cancellation and event rules in CT-e |
| 10017048 / 10017049 | 400 | Cancellation blocked by a registered correction letter / correction letter outside the 720-hour window | See the cancellation and event rules in CT-e |
| 10001001 | 400 | Request field validation failed (one entry per field) | Fix per mensagem |
DC-e
Array shape. Business errors are HTTP 400; a missing document / task is HTTP 404 with codigo DCe0001. Cases with a documented example code keep that code; every other codigo is the platform's numeric error code. SEFAZ rejections during issuance surface as query status Negada and the dce.rejected webhook; SEFAZ rejections of the cancellation surface as dce.cancel_rejected. See DC-e.
| codigo | HTTP | Scenario | Action |
|---|---|---|---|
DCe0001 | 404 | dceId not found, not owned by the company, or cancellation requested before the document was materialized | Check id and empresaId; cancel Pendente documents only after authorization |
| 10003000 | 404 | empresaId not found | Check empresaId |
DCe00004 | 400 | Company not configured for DC-e (missing tipoEmitente / model 99 series / Marketplace site), or ambiente differs from the company's current environment | Send emissaoDCe at registration or through an update with id; submit for the company's current environment and ask operations for the production switch |
DCe00005 | 400 | Marketplace / Carrier company without remetente | Add the sender |
DCe00006 | 400 | remetente.endereco missing | Add the sender address |
DCe00007 | 400 | Brazilian sender without cpfCnpj | Add the sender document |
DCe00008 | 400 | Company cannot issue (not approved / certificate not ready) | Wait for approval / link the certificate |
DCe00009 | 400 | Brazilian recipient without cpfCnpj | Add the recipient document |
GW001 | 400 | Municipality IBGE code not found or inconsistent with uf | Check cidade / uf |
| 10019005 / 10019006 | 400 | Concurrent duplicate request / too many pending tasks for the CNPJ | Retry later |
| 10019007 | 400 | Number series unresolved (several enabled series) | Ask operations to consolidate the series |
| 10019013 | 400 | Issuer type Carrier not supported for issuance yet | Use a Marketplace / OwnIssuer company |
| 10019018 | 400 | Invalid item (NCM length, quantity ≤ 0, negative unit price) | Fix per mensagem |
| 10019019 | 400 | Invalid enum or format (mensagem names the field: tipoPessoa, modalidade, dataEmissao, documents, phone, e-mail, own-issuer remetente differing from the company) | Fix per mensagem |
| 10019020 | 400 | Invalid carrier CNPJ | Fix cnpjTransportadora |
| 10019021 | 400 | Additional information too long | Shorten the text |
| 10019022 | 400 | Invalid autorizacaoDownloadXml count or document; contains the issuer's own CNPJ; duplicate document | Fix the list |
| 10019030 | 400 | Same id with a different message | Use a new id or resend the original message |
| 10019031 | 400 | Production: an active / authorized document already exists for the id | Query the original |
| 10019040 to 10019043 | 400 | Status does not allow cancellation / 24-hour window exceeded / cancellation already accepted / invalid reason | See the cancellation rules in DC-e |
| 10019048 | 400 | dataEmissao outside the allowed window (more than 5 minutes ahead or more than 30 days back; mensagem carries the current limits) | Use the current time or omit dataEmissao |
| 10001001 | 400 | Request field validation failed (one entry per field); registration / update contract errors of emissaoDCe | Fix per mensagem |
NFS-e
Array shape [{codigo, mensagem}]; business errors are HTTP 400 and a missing document is HTTP 404 with codigo NFSe0001. Issuance is asynchronous: a refusal at acceptance is a synchronous HTTP error, while a refusal by the authority shows up as a Negada query result plus the nfse.rejected webhook. See NFS-e.
| codigo | HTTP | Scenario | What to do |
|---|---|---|---|
| 10018001 | 400 | Parameter validation refused at acceptance; mensagem states the reason (IBS/CBS gate not in force, a São Paulo issuer sending ibsCbs, a code or structural constraint not met) | Fix as mensagem says |
NFSe0001 | 404 | Document not found: nfseId does not belong to this issuer, or the inbound key is not among its received invoices | Check nfseId / chaveAcesso against empresaId |
| 10018004 | 400 | Issuer not eligible (disabled / certificate unusable) | Check issuer status and certificate |
| 10018005 | 400 | Issuer has no NFS-e profile; mensagem names the missing item | Send emissaoNFSe at registration or update with id |
| 10018010 | 400 | The municipality's NFS-e standard is not supported yet | That municipality cannot issue yet, contact the platform |
| 10018012 | 400 | Service code is not in the official LC 116 list | Check codigoTributacaoNacional |
| 10018013 | 400 | Recipient document is invalid | Check the CPF / CNPJ / NIF |
| 10018014 | 400 | Service export is missing the destination country | Add servico.paisPrestacao |
| 10018015 | 400 | The replaced document cannot be replaced | Check the status of the replaced document |
| 10018020 | 400 | ISS rate could not be resolved (no inline value or municipal parameter) | Send servico.iss.aliquota or the right servico.codigoTributacaoMunicipal |
| 10018022 | 400 | A Simples issuer must not send the ISS rate directly | Remove aliquota |
| 10018023 | 400 | Federal withholding cannot be determined yet; provide the following or send the withheld amounts: %s. %s lists at once the paths of every missing field: servico.retencoes.categoriaFederal, cliente.orgaoPublico, cliente.optanteSimplesNacional, servico.retencoes.modoContratacao, servico.retencoes.anexoSimples, servico.retencoes.inss/irrf/csll/pis/cofins | Provide the listed fields and resend, or send the withheld amounts in servico.retencoes, zero when there is none; when the list names servico.retencoes.inss/irrf/csll/pis/cofins, only sending the amounts works, as happens when the service classification needs manual review or this company files as the recipient or the intermediary |
| 10018030 / 10018031 | 400 | The same request is already being processed / that order already has an invoice or the same id carries different content | Retry later; use another order number or check the content |
| 10018040 | 400 | A cancellation review is already in progress | Wait for the municipal verdict |
| 10018041 | 400 | The document has already been replaced | No further operation is allowed |
| 10018042 | 400 | The current status does not allow this event (cancellation; manifestation: cancelled / replaced / already manifested / this issuer is neither recipient nor intermediary) | Check the document status; each party manifests once per invoice |
| 10018063 | 400 | The DPS message does not comply with the official XSD; details carry line, column, error key and element name | Usually text outside Latin-1, an incomplete address, or a value outside the official code table |
| 10018064 | 400 | The NFS-e event message does not comply with the official XSD | Check motivo length (15-255), the codigoMotivo value and the character set |
| 10018065 | 400 | The NFS-e tax reference data this invoice needs has not been imported; send the fields after the arrow in the request, or import the reference data first: %s. %s lists each item with an arrow to the request field that replaces it: retencao-federal -> servico.retencoes.inss/irrf/csll/pis/cofins, pis-cofins -> servico.pisCofins.aliquotaPis/aliquotaCofins, iss-local-incidencia -> servico.iss.municipioIncidencia.codigoIbge; it only appears when an item the request left out must be looked up by the platform, and always at acceptance | Send the fields after the arrow in the request, or ask the platform to confirm the reference data is imported; iss-local-incidencia appears when the place of supply is in another municipality, and sending servico.iss.municipioIncidencia is enough |
NF-e verification
Bare shape {code, message}, HTTP 400. The request never enters validation. See NF-e verification.
| code | Endpoint | Meaning | Action |
|---|---|---|---|
| 10015000 | XML verification | Empty request body | Send the XML in the body |
| 10015001 | XML verification | Body exceeds 1 MB | An authentic single NF-e never exceeds this; check that you are not wrapping or double-encoding |
| 10015002 | XML verification | DTD detected (<!DOCTYPE) | Strip DTDs |
| 10015003 | XML verification | Encoding is not UTF-8 | Convert to UTF-8 before submitting |
| 10015005 | XML verification | Retired, no longer returned (formerly: chave already submitted for verification by another integrator) | No action needed: each integrator can verify the same invoice independently |
| 10015104 | Chave lookup | Malformed chave (length / characters / check digit) | Validate locally first: 44 digits; the last digit is a mod-11 check digit |
| 10015004 | Chave lookup | Invoice not found in any source | The chave is unknown to the platform and the official data source; verify it with its issuer |
Tier-1 validation errors
Returned with HTTP 200 inside validation.errors[] of the XML verification response. These are not transport errors: the request succeeded, the document failed. All are blocking (terminal REJECTED) except PROTOCOL_MISSING, which is a warning.
errors[].code | Numeric | Meaning |
|---|---|---|
XML_MALFORMED | 10015100 | XML syntax invalid |
XSD_INVALID | 10015101 | Does not conform to the NF-e 4.00 XSD layout |
SIGNATURE_INVALID | 10015102 | Digital signature verification failed (content tampered, or certificate expired at signing time) |
SIGNATURE_CERT_MISMATCH | 10015103 | Signing certificate CNPJ does not match the issuer |
ACCESS_KEY_INVALID | 10015104 | chave structure / check digit invalid |
ACCESS_KEY_MISMATCH | 10015105 | chave segments do not match the document fields |
PROTOCOL_MISMATCH | 10015106 | Protocol block inconsistent with the document |
PROTOCOL_MISSING | 10015107 | No protocol node (warning, non-blocking) |
XML_VERSION_UNSUPPORTED | 10015108 | Layout version is not 4.00 |
Tier-2 outcomes
Not HTTP errors: they arrive through the invoice.verify.completed webhook.
validationStatus | Terminal | Action |
|---|---|---|
VALIDATED | Yes | Safe to proceed (release goods, settle) |
REJECTED | Yes | Do not proceed; reason explains the SEFAZ verdict (cancelled / denied / voided / not found / protocol mismatch) |
VALIDATION_ERROR | Yes, retryable | Platform-side verification failure, not an invoice judgment; like any verdict it is reused for 24 hours, so resubmit later with header forceRevalidate: true |
Identity lookup
Bare shape {code, message}. Format and check-digit errors are rejected locally and never reach the upstream source; they consume no quota and are not billed. See Identity lookup.
| code | HTTP | Responsible party | Meaning | Action |
|---|---|---|---|---|
| 10016000 | 400 | Caller | Invalid CPF format (11 digits required) | Check for stray formatting characters or wrong length |
| 10016001 | 400 | Caller | Invalid CPF check digits | Validate locally with the mod-11 algorithm first |
| 10016002 | 400 | Caller | Invalid date of birth (valid DDMMYYYY required) | Note the day-month-year order, and that the date must actually exist |
| 10016003 | 400 | Caller | CPF not found | The CPF does not exist, or the CPF and date of birth do not match (deliberately indistinguishable) |
| 10016004 | 451 | Third party (lawful upstream block) | LGPD: menor de 16 anos (Lei Felca), holder is under 16 | Data lawfully withheld; do not retry |
| 10016005 | 422 | Third party (lawful upstream block) | LGPD: menor de idade, holder is 16 to 17 | Data lawfully withheld; do not retry |
| 10016006 | 428 | Third party (lawful upstream block) | LGPD: idade nao verificavel - informe a data de nascimento para completar a verificacao, age cannot be verified | The platform already re-verified once with the date of birth; do not retry |
| 10016010 | 400 | Caller | Invalid CNPJ format (14 digits required) | Check for stray formatting characters |
| 10016011 | 400 | Caller | Invalid CNPJ check digits | Validate locally with the mod-11 algorithm first |
| 10016012 | 400 | Caller | CNPJ not found | No such CNPJ in the official registry |
| 10016020 | 503 | Third party (upstream unavailable) | Upstream data source is temporarily unavailable | Retry with exponential backoff (start at 1 s, double up to 30 s, add jitter); contact the platform if it persists |
Handling guidance
- 401 / 403: configuration errors; fix the credential, subscription or clock. Do not retry as-is.
- 400 / 404: the request or the business rule; fix per the code. A few codes are transient and can be retried later: 10004002, 10017005 / 10017006, 10019005 / 10019006.
- 422 / 428 / 451: statutory blocks on identity lookups; retrying is pointless.
- 429: back off with exponential delay and jitter (start at 1 s, double up to 30 s).
- 503: retry the same request or link after
Retry-After(10009037, 10016020). - 5xx: retry with backoff; if persistent, contact the platform with the failing
timestampand path. - Envelope
errorType:1API error,2SEFAZ rejection,3system fault (retryable),4field validation failure (fix the request). - Never retry a rejected document blindly:
NegadaandREJECTEDare terminal verdicts; act on the SEFAZ reason first.
