1. Inicio
  2. Documentos
  3. NS NF3e (English)
  4. NF3-e Events
  5. Event Download

Event Download

Through the event download service, it’s possible to obtain data from an event linked to an NF3-e. The event data can be received in XML or JSON.

URL

Production: POST https://nf3e.ns.eti.br/v1/nf3e/get/event

Input Data
FieldDescriptionData TypeOccurrence
X-AUTH-TOKENUser access tokenString1-1
chNF3eNF3-e access keyInt1-1
tpDownDownload file type: X - XML, J - JSONString1-1
tpAmbNF3-e authorization environment type: 1 - Production, 2 - HomologationInt1-11 - Production, 2- Homologation
tpEventoEvent typeString1-1CANC: Cancellation
Request Example

Download event request

curl -X POST \
-H "Content-Type: application/json" \
-d '{"X-AUTH-TOKEN": "YOUR_TOKEN", "chNF3e": "43170507364617000135580000000003481000033457","tpAmb":"2", "tpDown": "x", "tpEvento": "canc"}'\
https://nf3e.ns.eti.br/v1/nf3e/get/event
Returned Data
FieldDescriptionOccurrenceData TypeParentNotes
statusProcessing status code1-1Int
motivoLiteral description of the processing status1-1String
retEventoObject containing the cancellation processing data at Sefaz0-1ObjectOnly when status = 200
cStatEvent status code at Sefaz1-1IntretEvento
xMotivoLiteral description of the event status at Sefaz1-1StringretEvento
chNF3eNF3-e access key1-1IntretEvento
dhRegEventoDate and time of the event registration at Sefaz1-1DateretEventoSefaz Standard: YYYY-MM-DDTHH:MM:SS+UTC. E.g.: 2016-06-13T15:04:10-03:00. Only when cStat = 135
nProtEvent authorization protocol number by Sefaz1-1IntretEvento
xmlEvent XML0-1StringOnly when tpDown = X. Only when status = 200
jsonEvent XML JSON0-1ObjectOnly when tpDown = J. Only when status = 200
erroObject containing error information in case the download event cannot be carried out successfully0-1ObjectOnly when status is different from 200
cStatError status code1-1Interro
xMotivoLiteral description of the error1-1Stringerro
Response Examples

Successful response

{
    "status": 200,
    "motivo": "Evento localizado com sucesso",
    "retEvento": {
        "cStat": "135",
        "xMotivo": "Evento registrado e vinculado a NF3-e",
        "chNF3e": "11111111111111111111111111111111111111111111",
        "dhRegEvento": "2021-02-22T10:26:48-03:00",
        "nProt": "111111111111111"
    },
    "xml": "<?xml version=\"1.0\"?><procEventoNF3e versao=\"3.00\" xmlns=\"http://www.portalfiscal.inf.br/mdfe\">...</procEventoNF3e>"
}
Return Codes
CodeDescription
200Download event done successfully
-2Invalid access key
-3Invalid event type
-4Invalid download type
-5The event could not be loaded. Verify the "erro" object for more information

Como podemos ajudar?