1. Inicio
  2. Documentos
  3. NS ANTT ( English )
  4. InserirLogCancelarPassage...
  5. Sending Data – Cancellation

Sending Data – Cancellation

InserirLogCancelarPassagem

Through the cancellation service, it is possible to insert boarding tickets canceled in a certain period.

URL

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

Input Data
CodeDescription
OccurrenceHas return data?
200OkYes
400Bad RequestWhen the request is being performed with wrongly assembled dataNo
401Not authorizedWhen the consumer application tries to access some unauthorized resourceNo
403Access deniedWhen the access token entered is invalidNo
404Not foundWhen the method URL is invalid or the requested information is not foundYes ( but it may not contain if the error is a non-existent URL error )
501API internal errorWhen an unanticipated internal error occursYes
Request Example
InserirLogCancelarPassagem Request Example
{
    "X-AUTH-TOKEN": "YOUR_TOKEN_AQUI",
    "chPassagem": "2021080869855400016500000002352000000015",
    "tpAmb": 2,
    "codigoMotivoCancelamento": 1,
    "dataHoraCancelamento": "2021-08-24T11:14:00"   
}
Response Data
FieldDescriptionData TypeParentNote
statusProcessing Status CodeInt
motivoLiteral description of processing statusString
retEventoObject containing Sefaz cancellation processing dataObjectOnly in Status = 200
cStatProcessing status codeIntretEvento
chaveMethod processing access keyString or IntretEventoOnly in cStat = 135
idTransacaoTransaction ID of the InsertLogVendaPassagem methodStringretEventoOnly in cStat = 135
log_docObjeto contendo os dados que foram processados no método InserirLogVendaPassagemObjectretEventoOnly in cStat = 135
idLogLog Identified Code processed at ANTTIntlog_doc
numeroBilheteEmbarqueBPe number.

(nBP)
Stringlog_doc
identificacaoLinhaLine identification;
prefix:

road [8] or itinerary;

semi-urban [4], if applicable
(differentiated service)
Stringlog_doc
dataViagemTicket travel date.

UTC Standard: YYYYMMDD
Stringlog_doc
horaViagemTicket Travel Time.

UTC Standard: HHMMSS
Stringlog_doc
codigoMotivoCancelamentoReason for canceling the
ticket:

1 = Refund;

2 = Redial;

3 = Transfer of
ownership
Intlog_doc
dataHoraCancelamentoCancellation date and time

UTC Standard:

YYYY-MMDDTHH:MM:SS
Stringlog_doc
xMotivoLiterary description of cStatStringretEvento
Response Examples

Successful Response

{
    "status": 200,
    "motivo": "Log de Cancelamento processado com sucesso",
    "retEvento": {
        "cStat": "135",
        "chave": "2021080869855400016500000002352000000015",
        "idTransacao": "de2a37f6--8bcc-b657-3f7fc5403cd7",
        "log_doc": {
            "idLog": 11,
            "numeroBilheteEmbarque": "000002536",
            "identificacaoLinha": "00000001",
            "dataViagem": "20210825",
            "horaViagem": "093000",
            "codigoMotivoCancelamento": 1,
            "dataHoraCancelamento": "2021-08-25T14:20:00"
        },
        "xMotivo": "Ação executada com sucesso."
    }
}
Rerturned 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.
InserirLogCancelarPassagem method download

You can download the complete cancellation information in XML or JSON. For this check the method Download Cancellation.

Como podemos ajudar?