1. Inicio
  2. Documentos
  3. NS BPe (English)
  4. BPe Issue Process
  5. Download ( Step 3/3 )

Download ( Step 3/3 )

The BP-e download method is responsible for returning JSON, XML and DABPE ( Electronic Ticket Ticket Auxiliary Document ) from providing the access key of a BP-e authorized by NS BP-e API.


Production: POST https://bpe.ns.eti.br/v1/bpe/get

Input Data
X-AUTH-TOKEN1-1Software House access token
chBPe1-1BP-e access key
tpDown1-1Download files type: X - XML,
​​J - JSON, P - PDF, XP - XML ​​and PDF, JP - JSON and PDF
tpAmb1-1Type of Environment: 1 - Production,
2 - Homologation ( test enviroment
Request Examples

Download Request

curl -X POST \
-H "Content-Type: application/json" \
-d '{"
     }' \
Returned Data
FieldDescriptionOccurrenceData TypeParentNotes
statusProcessing status code1-1Int
motivoLiteral description of processing status1-1String
chBPeBP-e access key0-1Int
xmlAuthorized BP-e distribution XML0-1StringOnly when Download type = X or XP,
Only with status = 200
nfeProcJSON object with authorized BP-e distribution data0-1StringOnly when Download type = J or JP. Only with status = 200
pdfBPe PDF0-1StringBase64 of BPE PDF. Only when download type = P, JP or XP. Only with status = 200
erroObjeto contendo informações de erro ao carregar o CT-e0-1Objectonly with status different than 200
cStatError status code1-1Stringerro
xMotivoLiteral description of the error1-1Stringerro
Response Examples

Successful Response

    "status": 200,
    "motivo": "Consulta realizada com sucesso",
    "chBPe": "43180107364617000135630000000000101000000085",
    "xml": "<?xml version=\"1.0\" encoding=\"utf-8\"?><bpeProc versao=\"1.00\" xmlns=\"http://www.portalfiscal.inf.br/bpe\"><BPe>...</bpeProc>",
    "pdf: "JVBERi0xLjQKJeLjz..."}
Returned Codes
200Download successfully done
-2Invalid download type Note: When the type is different X, P, XP or PX (case-insensitive).
-3Invalid access key
-4BP-e not found with the given access key

Como podemos ajudar?