1. Home
  2. Docs
  3. NS ANTT ( English )
  4. InserirLogVendaPassagem
  5. Data sending

Data sending

InserirLogVendaPassagem

The InserirLogVendaPassagem method is responsible for sending the data to ANTT to include the ticket sold in the given period. It must be sent according to the data types defined by ANTT’s XML schemas and send the document for processing in ANTT’s WebService.

The return of this service contains the processing status of this ANTT method by the API and the nsNRec code for checking the processing status.

URL

Production: POST https://antt.ns.eti.br/v1/antt/logvenda

Input Data

The data to be sent in the request body must be in JSON format.

Sending data in JSON format

To send data in JSON, the Content-Type of the request must be defined as application/json.

FieldOccurrenceData TypeParentDescription
X-AUTH-TOKEN1-1StringUser access token
It can also be sent via Header or QueryString in the URL.
chBPe1-1StringBPe Access Key Previously Authorized via NS API BPe
tpAmb1-1StringType of environment for processing InsertLogVendaPassagem method

1 - Production
2 - Test Environment

*Default value: 2
logEmissao1-1O
Object containing the data to be sent to the method
cnpjEmpresa1-1StringlogEmissao
codigoBilheteEmbarque1-1IntlogEmissaoticket identifier code
boarding:

0 = Normal;
1 = Free;
2 = Discount Provided by Law
codigoCategoriaTransporte1-1IntlogEmissaoTransport Category

1 = interstate
2 = international
idPontoOrigemViagem1-1IntlogEmissaoANTT municipality origin code.
Use the table provided by antt to fill in this field. (https://portal.antt.gov.br/monitriip)
idPontoDestinoViagem1-1IntlogEmissaoANTT municipality destination code.
Use the table provided by antt to fill in this field. (https://portal.antt.gov.br/monitriip)
identificacaoLinha1-1StringlogEmissaoLine identification;
prefix:
(Regular Road Transport)
[8], [11] ou [12]
codigoTipoServico1-1IntlogEmissaoType of service offered in transport:

1: A (Bed);

2: B (Bed) - leito;

3: C (Semi-bed);

4: D (Executive);

5: E (basic)
dataViagem1-1StringlogEmissaoTicket travel date.

UTC Standard: YYYYMMDD
horaViagem1-1StringlogEmissaoTicket Travel Time.

UTC Standard: HHMMSS
codigoTipoViagem1-1IntlogEmissaoType of trip:

0 - Does not meet Minimum Regularity/Frequency
1 - Meets Minimum Regularity/Frequency
numeroPoltrona1-1IntlogEmissaoseat number
plataformaEmbarque0-1StringlogEmissaoBoarding platform code or numerical identification
codigoMotivoDesconto1-1IntlogEmissaoReason for discount:

0 - Standard Rate – no discount;
1 - Promotional Rate
2 - Elderly Person (free)
3 - Elderly Person (minimum 50% discount)
4 - Holder of Free Pass Credential
5 - Companion of Holder of Free Pass Credential
6 - Youth (free)
7 - Youth (minimum 50% discount)
8 - Lap Child (up to 6 years old)
9 - Auditor or Labor Agent
percentualDesconto1-1FloatlogEmissaoDiscount percentage.

Formatting: 5.2

Min: 0.00;
Max: 100.00;
aliquotaICMS1-1FloatlogEmissaoPercentage of the ICMS rate.

Formatting: 5.2

Min: 0.00;
Max: 100.00;
tipoDocumentoIdentificacao Passageiro1-1IntlogEmissao1 = RG;
2 = Título de Eleitor;
3 = Passaporte;
4 = CNH 5 = Certidão de Nascimento;
9 = Outro
valorICMS1-1FloatlogEmissaoMin: 0.00;
Max: 99999999.99; NumeroChar();
origemEmissao1-1IntlogEmissao01 = In-person;
02 = Embarked;
03 = Internet;
04 = Self-service terminal (kiosk
sequenciamento1-1IntlogEmissao Código sequencial de ordenação
Min: 0;
Max: 99
idViagem 1-1String logEmissao Trip Identifier Code (Regular Bus Service) Information in the sequence presented and separated by hyphens. Below, the explanation of each item that should be included in the idViagem.
Scheduled Date of the Trip at the Initial Line Point: YYYYMMDD
Scheduled Time of the Trip at the Initial Line Point:HHMMSS
Trip Type Code:
NN 00 = Does not meet the Minimum Regularity; 01 = Meets the Minimum Regularity
Line Direction Code: 0 = Return; 1 = Outbound
Line Prefix SGP/SIGMA: 8, 11, or 12 characters
Example request: YYYYMMDD-HHMMSS-NN-N-PPPPPPPPPPPP
Request example

Request Data in JSON Format

{
    "X-AUTH-TOKEN":"YOUR_TOKEN_HERE",
    "chBPe":"43230407364617000135630060000028941000000019",
    "tpAmb": "2",
    "logEmissao": {        
        "cnpjEmpresa": "07364617000135",
        "idPontoOrigemViagem": "4314915",
        "idPontoDestinoViagem": "4106910",
        "codigoBilheteEmbarque": 1,    
        "codigoCategoriaTransporte": "2",
        "identificacaoLinha": "2",        
        "codigoTipoServico": 1,
        "dataViagem": "20230419",
        "horaViagem": "140000",
        "codigoTipoViagem": 1,
        "numeroPoltrona": "1",
        "plataformaEmbarque": "5",
        "codigoMotivoDesconto": 1,
        "percentualDesconto": 0.0,
        "aliquotaICMS": 17.0,
        "sequenciamento": 0,
        "idViagem": "20240620-174900-01-1-123456789101"
    }
}
Data returned
CampoDescriçãoTipoOcorrênciaObservação
StatusCódigo de status do processamentoN1-1
MotivoDescrição literal do status de processamentoA1-1
nsNRecID do Processamento do método InserirLogVendaPassagemN0-1Somente em status = 200
Response examples

Successful Response

{
	"status": 200,
	"motivo": "Log enviado para a ANTT",
	"nsNRec": "112"
}

Unsuccessful Response

{
	"status": -6,
	"motivo": "Documento ja processado anteriormente e autorizado",
	"nsNRec": "110"
}
Response Codes
CódigoDescrição
200Log submission successfully executed.
-2Request data validation error.
-3Errors in log processing after sending to Core/ANTT
-4Errors in log processing after sending to Core/ANTT
-5Errors in log processing after sending to Core/ANTT
-6Document already processed and authorized. Check the nsNRec informed of the response.

How can we help?