1. Inicio
  2. Documentos
  3. NS CTe (English)
  4. CTe Events
  5. Delivery Receipt Cancellation

Delivery Receipt Cancellation

Through this endpoint, it’s possible to carry out the Cancellation event of an authorized Delivery Receipt.


POST https://cte.ns.eti.br/cte/compentregacanc

Input data
FieldDescriptionOccurrenceData TypeNotes
X-AUTH-TOKENCT-e access token0-1StringCan be sent in the request header
chCTeCT-e access key1-1Int
tpAmbCT-e authorization environment type1-1Int
dhEventoDate and time of the cancellation1-1DateSefaz Standard: YYYY-MM-DDTHH:MM:SS+UTC
E.g.: 2016-06-13T15:04:10-02:00
nProtCT-e authorization protocol number1-1Int
nProtCEEvent authorization protocol number of the Delivery Receipt to be cancelled1-1Int
Request example

Delivery receipt cancellation request

curl -X POST 
    \-H "Content-Type: application/json"
    \-d '{
          "X-AUTH-TOKEN": "YOUR_TOKEN", 
          "chCTe": "99999999999999999999999999999999999999999999", 
          "tpAmb": 2, 
          "dhEvento": "2019-08-12T13:28:30-03:00", 
          "nProt": "999999999999999", 
          "nProtCE": "999999999999999"
          }' \
Returned data
statusProcessing status code
motivoProcessing status literal description
retEventoObject containing the cancellation processing data at SefazOnly when stauts = 200
retEvento.cStatEvent situation code at Sefaz
retEvento.xMotivoEvento situation literal description at Sefaz
retEvento.chCTeCT-e access key
retEvento.dhRegEventoDate and time of the event registration at Sefaz Sefaz Standard: YYYY-MM-DDTHH:MM:SS+UTC
E.g.: 2016-06-13T15:04:10-02:00
retEvento.nProtEvent authorization protocol number by Sefaz
xmlEvent XMLOnly when tpDown = "X" (or "XP") and status = 200
jsonEvent XML jsonOnly when tpDown = "J" (or "JP") and status = 200
pdfEvent graphical representation in PDFPDF in Base 64. Only when tpDown = "P" (or "XP" or "JP") and status = 200
erroObject containing the information error in case the cancellation was not successfulOnly when status is different from 200
erro.cStatError code
erro.xMotivoError literal description
Return example

Successful return

    "status": 200,
    "motivo": "Comprovação de Entrega vinculada ao CT-e com sucesso",
    "retEvento": {
        "cStat": 135,
        "xMotivo": "Evento registrado e vinculado a CT-e",
        "chCTe": "99999999999999999999999999999999999999999999",
        "dhRegEvento": "2019-08-09T19:41:09-03:00",
        "nProt": "999999999999999"
    "xml": "<?xml version=\"1.0\" encoding=\"utf-8\"?><procEventoCTe versao...."

Return codes
200Cancellation of Delivery Receipt linked to CT-e successfully
-2Mandatory fields of request not informed
-3Invalid access key
-4Error information according to the data type
-5Error or rejection when carrying out the cancellation of delivery receipt. Verify the "codigo" and "descricao" fields for more information

Como podemos ajudar?