The NF3-e download method is responsible for returning the JSON, XML and the DANF3E (Auxiliary document of the Electric Energy Eletronic Invoice) from providing the access key of an authorized NF3-e.
URL
Production: POST https://nf3e.ns.eti.br/v1/nf3e/get
Input Data
Field | Occurrence | Description |
---|---|---|
X-AUTH-TOKEN | 1-1 | User access token |
chNF3e | 1-1 | NF3-e access key |
tpAmb | 1-1 | Environment type: 1 - Production, 2 - Homologation |
tpDown | 1-1 | Download files type: X - XML, J - JSON, P - PDF, XP - XML and PDF, JP - JSON and PDF |
Request Example
NF3-e download request
curl -X POST \
-H "Content-Type: application/json" \
-d '{"X-AUTH-TOKEN":"YOUR_TOKEN","chNF3e":"44444444444444444444444444444444444444444444","tpAmb":"2","tpDown":"XP"}' \
https://nf3e.ns.eti.br/v1/nf3e/get
Returned Data
Field | Description | Occurrence | Data Type | Parent | Notes |
---|---|---|---|---|---|
status | Processing status codes | 1-1 | Int | ||
motivo | Literal description of the processing status | 1-1 | String | ||
chNF3e | NF3-e access key | 0-1 | Int | Only when tpDown = X or XP. Only when status = 200 | |
xml | Authorized NF3-e distribution xml | 0-1 | String | Only when tpDown = X or XP. Only when status = 200 | |
DANF3E pdf | 0-1 | String | NF3-e PDF Base 64. Only when tpDown = P or JP or XP. Only when status = 200 | ||
erro | Object containing error informations when loading an NF3-e | 0-1 | Only when status is different from 200 | ||
cStat | Error status code | Int | |||
xMotivo | Literal description of the error | String |
Response Example
Successful response
{
"status": 200,
"motivo": "Consulta realizada com sucesso",
"chNF3e": "43191207364617000135660000000000101834241950",
"xml": "<?xml version=\"1.0\" encoding=\"utf-8\"?><nf3eProc versao=\"1.00\" xmlns=\"http://www.portalfiscal.inf.br/nf3e\"><NF3e><infNF3e versao=\"1.00\" Id=\"NF3e43191207364617000135660000000000101834241950\">...</nf3eProc>"
}
Return Codes
Code | Description |
---|---|
200 | Download successfully done |
-2 | Invalid dowload type. Obs.: when the type is different from X, P, XP, or PX (case-insensitive) |
-3 | Invalid access key |
-4 | NF3-e not found with the given access key |