Received documents & filing
Received Documents & DistDFe
9 endpoints
Recipient Manifestation
Recipient Manifestation allows the NF-e recipient to formally position themselves regarding an invoice issued against their CNPJ. There are 4 event types defined by the tax authority, each with its own legal meaning.
Event Types
| Code | Name | Meaning | Justification |
|---|---|---|---|
| 210210 | Operation Awareness | The recipient acknowledges the NF-e exists but has neither confirmed nor rejected it yet. Usually the first event, and a requirement to download the full XML via DistDFe. | Not required |
| 210200 | Operation Confirmation | The recipient confirms the operation took place and the goods/services were received. Final event, proves receipt. | Not required |
| 210220 | Operation Unawareness | The recipient declares they do NOT recognize the operation (suspected fraud, misuse of CNPJ, etc.). | Required (15-255 chars) |
| 210240 | Operation Not Performed | The recipient acknowledges the operation but declares it did NOT take place (return, refusal of delivery, etc.). | Required (15-255 chars) |
Sequence rule: After Awareness (210210) is sent, the recipient may send Confirmation (210200) OR Unawareness (210220) OR Not Performed (210240). Confirmation/Unawareness/Not Performed are final states — they cannot be overwritten.
Attention: The CNPJ sent in the
cnpj field must be a company registered under the token; otherwise the endpoint returns empresa com CNPJ ... não encontrada para este token. The CNPJ must also be the recipient of the NF-e (the one manifesting); otherwise the tax authority rejects the event. Recipient manifestation always runs in the production environment.
Return cStat Codes
| cStat | Meaning |
|---|---|
| 135 | Event successfully registered |
| 573 | Event duplicity — already registered (treated as success) |
| 236 | Access key with invalid check digit |
| 491 | Invalid event type (tpEvento) |
| 594 | Event sequence number greater than allowed. This endpoint always uses sequence 1 and does not resend an event that is already registered, so this code does not occur under normal conditions |
| 596 | Event submitted after the deadline |
| 656 | Improper consumption (rate limit) |
DistDFe Capture — Received NFes
Allows querying and downloading NFes and events in which the company CNPJ is the recipient, via the NFeDistribuicaoDFe service from the tax authority (National Environment). Capture is incremental by NSU (Unique Sequential Number) — each call only downloads what has not been captured yet.
Returned Document Types
| doc_type | What it is | Content |
|---|---|---|
| resNFe | NFe summary | Basic metadata (key, value, issuer, status). Comes BEFORE the Awareness event is sent — does not contain products/taxes |
| procNFe | Full authorized NFe | Complete NF-e XML (with products, taxes, transport, etc.). Only available AFTER the recipient sends Awareness (210210) for the key |
| resEvento | Event summary | Event metadata (key, type, sequence, reason) |
| procEvento | Full event | Complete event XML (CC-e, cancellation, manifestations from other recipients on the company's invoices) |
Recommended flow:
- Call
/received/sync— downloads all new documents - List with
/received/listfiltering bydoc_type: "resNFe"to see invoices without Awareness - For each key of interest, call
/invoice/manifestwithtipo_evento: 210210 - Call
/received/syncagain — now tax authority returns theprocNFe(full XML) of the manifested keys - Use
/received/get_xmlto fetch the XML URL and process
tax authority rate limit: tax authority allows at most 1 DistDFe call per hour per CNPJ. Exceeding this returns
cStat: 656 (Improper Consumption). Synchronization always runs in the production environment.
DistDFe Return cStat Codes
| cStat | Meaning |
|---|---|
| 137 | No documents found (normal end of loop) |
| 138 | Documents found — loop continues |
| 656 | Improper consumption — wait 1h and retry |
| 252 | Environment differs from informed (production vs homologation) |
| 280 | Invalid transmitter certificate (for example, expired) |
- POSTSend recipient manifestation event
/api/invoice/manifest - POSTList manifestations
/api/invoice/manifest/list - POSTGet manifestation XML
/api/invoice/manifest/get_xml - POSTSync received documents
/api/invoice/received/sync - POSTList received documents
/api/invoice/received/list - POSTGet received document XML
/api/invoice/received/get_xml - POSTGet products from received NF-e
/api/invoice/received/get_prod - POSTCheck received invoiceCompares the received invoice with the purchase order and with what the engine expects (…
/api/invoice/received/check - POSTGet sync status
/api/invoice/received/get_sync_status