Machine translation, not yet reviewed.
NF-e events JSON — field reference
Endpoint: GET /api/integration/dfe/nfe/inbound/eventos · OpenAPI reference: NF-e Public API.
Reference document — Field-by-field dictionary of the
metadataobject returned by the inbound NF-e events endpoint. The same object, compressed (Gzip+Base64), is the content of thejsonfield whenjson=true.
Endpoint: GET /api/integration/dfe/nfe/inbound/eventos · OpenAPI reference: NF-e Public API.
Conventions used in this document
eventDatePartis the event's date partition (derived fromchNFe), not an instant — it is returned as an ISO datetime string ("2026-01-01T00:00:00"). The other dates (dhEvento,dhRegEvento,createdAt,updatedAt) are returned as epoch milliseconds UTC.issuerTypeis always"INBOUND"in this listing — the same data model also storesOUTBOUNDevents (transmitted by MI itself), but they do not appear here.detEvento(the full signed event detail) is not serialized in this object — obtain it viaxml=true.emailDestandusernamevary by event origin. In DF-e Distribution events (authored by third parties, e.g., cancellation, correction letter) both are alwaysnull— the Distribution does not carry a recipient email nor the user responsible for the transmission, so the key is absent from the actual JSON. In the four recipient manifestations (acknowledgment, confirmation, operation unknown, operation not performed), the event is transmitted by MI itself on behalf of the client:usernameis populated with the user who transmitted it, andemailDestcomes back empty ("", notnull) when SEFAZ does not return it — in that case the key appears in the JSON with an empty string.
1. Fields
| Field | Type | Description |
|---|---|---|
eventDatePart | string (ISO datetime) | Event date partition (derived from chNFe), not an instant. |
id | UUID | Internal identifier of the event record. |
customerId | UUID | Tenant that owns the record. |
companyId | UUID | Company (of the tenant) that is a party to the NF-e for this item. |
chNFe | string (44) | Access key of the NF-e to which the event is linked. |
issuerType | string | "INBOUND" or "OUTBOUND". Always "INBOUND" in this listing. |
eventId | string | Event identifier at SEFAZ. Comes from the Id attribute of infEvento in the XML; if absent, it is derived as "ID" + tpEvento + chNFe + nSeqEvento (2 digits). |
cOrgao | string | IBGE code of the authority that authorized the event. For recipient manifestations it is the National Environment (Ambiente Nacional, "91"). |
tpAmb | short | Environment: 1 = Production; 2 = Staging (Homologação). |
cnpjCpfAutor | string | CNPJ/CPF of the event author (who registered it at SEFAZ). For manifestations, it is the recipient company of your tenant. |
tpEvento | int | SEFAZ event type code (see section 2). |
dhEvento | long (epoch ms) | Event date/time, as provided by the author. |
nSeqEvento | short | Sequence number of the event for that (chNFe, tpEvento). |
cStat | short, nullable | Status code of the event's SEFAZ protocol. |
xMotivo | string, nullable | Reason/message of the SEFAZ protocol. |
xEvento | string, nullable | Textual description of the event in the return protocol. |
cnpjCpfDest | string, nullable | CNPJ/CPF of the recipient, when the event carries this information. |
emailDest | string, nullable | In DF-e Distribution events (third parties) it is always null — the key is absent from the JSON. In recipient manifestations (transmitted by MI itself), it comes as an empty string ("") when SEFAZ does not return the email — in that case the key appears in the JSON. |
dhRegEvento | long (epoch ms), nullable | Date/time the event was registered at SEFAZ (return protocol). |
nProt | long, nullable | SEFAZ protocol number of the event. |
createdAt | long (epoch ms) | When the record was persisted in MI. Ordering/keyset field for pagination. |
updatedAt | long (epoch ms) | Last update of the record. |
username | string, nullable | In DF-e Distribution events (third parties) it is always null — the key is absent from the JSON (the event was not transmitted by MI). In recipient manifestations, it is populated with the user who transmitted the event on behalf of the client. |
2. Event types (tpEvento)
The recipient manifestation events — authored by a company of your tenant about a received invoice:
tpEvento | Event |
|---|---|
210200 | Confirmation of the Operation |
210210 | Acknowledgment of the Operation (Ciência da Operação) |
210220 | Operation Unknown (Desconhecimento da Operação) |
210240 | Operation Not Performed |
In addition to these, events received via DF-e Distribution authored by third parties appear (e.g., cancellation 110111, correction letter 110110, etc.) when the tenant is a counterparty. There is no closed catalog in the backend — the parser accepts any tpEvento that DF-e Distribution delivers; the list of valid types is defined by SEFAZ, not by MI. The endpoint does not filter by tpEvento.
3. Multiplicity per company
The same SEFAZ event may appear more than once when several companies of the tenant are parties to the affected NF-e — each company receives its own copy of the event, with a distinct companyId and the same chNFe/eventId.
4. Example
Example of a recipient manifestation (Acknowledgment of the Operation, tpEvento 210210) — which is why username is populated and emailDest comes as an empty string. In a DF-e Distribution event (e.g., a third-party cancellation), both keys would be absent from the JSON.
{
"eventDatePart": "2026-01-01T00:00:00",
"id": "0198c0de-0000-7000-8000-000000000003",
"customerId": "0198c0de-0000-7000-8000-000000000001",
"companyId": "0198c0de-0000-7000-8000-000000000002",
"chNFe": "35260111111111111111550010000000011000000015",
"issuerType": "INBOUND",
"eventId": "ID2102103526011111111111111155001000000001100000001501",
"cOrgao": "91",
"tpAmb": 2,
"cnpjCpfAutor": "11111111111111",
"tpEvento": 210210,
"dhEvento": 1768469400000,
"nSeqEvento": 1,
"cStat": 135,
"xMotivo": "Evento registrado e vinculado a NF-e",
"xEvento": "Ciencia da Operacao",
"cnpjCpfDest": "22222222222222",
"emailDest": "",
"dhRegEvento": 1768471200000,
"nProt": 135260000000002,
"createdAt": 1768478400000,
"updatedAt": 1768478700000,
"username": "mde-service"
}