The download method of the Ticket Sales Log is responsible for returning the JSON or XML of the InserirLogVendaPassagem method processing in ANTT from the supply of the key generated in the processing of the mentioned method.
URL
Production: POST https://antt.ns.eti.br/v1/antt/logvenda/download
Input Data
Field | Occurrence | Description |
---|---|---|
X-AUTH-TOKEN | 1-1 | User access token |
chave | 1-1 | Access key of the processing generated in the ANTT previously |
tpDown | 1-1 | Download type: X - XML; J - JSON; |
tpAmb | 1-1 | Type of Environment: 1 - Production; 2 - Test Environment |
Request Examples
Download Request Example
{
"X-AUTH-TOKEN": "YOUR_TOKEN_HERE",
"chave":"43210806598988743000126630060000023521000000012",
"tpAmb": "2",
"tpDown":"X"
}
Response Data
Field | Description | Occurrence | Data Type | Parent | Note |
---|---|---|---|---|---|
status | Processing Status Code | 1-1 | Int | ||
motivo | Literal description of processing status | 1-1 | String | ||
chave | Access key of the processing generated in the ANTT previously | 0-1 | Int | ||
xml | Processing distribution XML | 0-1 | String | Only when status = 200 and tpDown = x | |
json | json object containing the distribution data of the processing performed in ANTT | 0-1 | Object | Only when status = 200 and tpDown = j | |
erro | Object containing error information | 0-1 | Object | Only with status other than 200 | |
cStat | Error Status Code | 1-1 | Int | erro | |
xMotivo | Literal description of the error | 1-1 | String | erro |
Response Examples
Successful Response
{
"status": 200,
"motivo": "Consulta realizada com sucesso",
"chave": "2021080856488900012500000002536000000016",
"xml": "..."
}
Returned Codes
Código | Descrição |
---|---|
200 | Log submission successfully executed. |
-2 | Request data validation error. |
-3 | Errors in log processing after sending to Core/ANTT |
-4 | Errors in log processing after sending to Core/ANTT |
-5 | Errors in log processing after sending to Core/ANTT |
-6 | Document already processed and authorized. Check the nsNRec informed of the response. |