1. Inicio
  2. Documentos
  3. NS CTe (English)
  4. CTe Events
  5. Issue delivery receipt

Issue delivery receipt

Through this endpoint, it’s possible to carry out the Delivery Receipt event of an already authorized CT-e.

Obs.: The Delivery Receipt event has rules and deadlines defined by Secretaria da Fazenda that must be considered and respected. For more information, click here and verify the most updated version of the Sefaz Contributors’ Guidance Manual.


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

Input data
FieldDescriptionOccurrenceData TypeNotes
X-AUTH-TOKENUser access token0-1StringCan be sent in the header
chCTeCT-e access key1-1Int
tpAmbCT-e authorization environment type1-1Int1 - Production
2 - Homologation
dhEventoDate and time of the event issuance1-1DateSefaz Standard: YYYY-MM-DDTHH:MM:SS+UTC
E.g.: 2016-06-13T15:04:10-02:00
nProtCT-e authorization protocol number1-1Int
nSeqEventoEvent sequential number1-1IntIn most cases it will be 1. However, when more than one event of the same type is generated for the same CT-e, this number must be sequentially incremented.
dhEntregaDate and time of the delivery completion1-1DateSefaz Standard: YYYY-MM-DDTHH:MM:SS+UTC
E.g.: 2016-06-13T15:04:10-02:00
nDocIdentification document of the person who received the delivery1-1String
xNomeName of the person who received the delivery1-1String
latitudeLatitude of the delivery point0-1Int6 precision decimal digits required
longitudeLongitude of the delivery point0-1Int6 precision decimal digits required
hashEntregaHASH (SHA1) in the Base64 format resulting from the concatenation of: the CT-e access key + the Base64 of the delivery image captured1-1String28 characters
chavesEntreguesNF-es access keys that are being delivered0-2000ArrayInform only for CT-e with Normal service type
Request example

Issue delivery receipt request

curl -X POST 
    \-H "Content-Type: application/json"
    \-d '{
          "X-AUTH-TOKEN": "YOUR_TOKEN", 
          "chCTe": "99999999999999999999999999999999999999999999", 
          "tpAmb": 2,           
          "dhEvento": "2019-08-09T19:28:30-03:00", 
          "nSeqEvento": "1", 
          "nProt": "999999999999999", 
          "dhEntrega": "2019-08-09T19:27:40-03:00", 
          "nDoc": "99999999999", 
          "xNome": "Name of who received", 
          "hashEntrega": "NzgzNkM3QTUwRDZGNg==", 
          "dhHashEntrega": "2019-08-09T19:28:00-03:00", 
          "latitude": "-31.776000", 
          "longitude": "-52.359400", 
          }' \
Returned data
statusProcessing status code
motivoProcessing status literal description
retEventoObject containing the CT-e processing data at SefazOnly when statys = 200
retEvento.cStatCode of the processing situation at Sefaz
retEvebto.xMotivoLiteral description of the processing situation at Sefaz
retEvento.chCTeCT-e access key
retEvento.dhRegEventoDate and time of event registration at SefazSefaz Standard: YYYY-MM-DDTHH:MM:SS+UTC
E.g.: 2016-06-13T15:04:10-02:00
retEvento.nProtDocument receipt number by Sefaz
xmlDistribution XML of the Delivery Receipt eventOnly when status = 200
errosArray containing the list of errors occurred during the information validation of the delivery receipt according to the data typeOnly when status = -4
codigoOccurred error codeOnly when status = -5
descricaoOccured error literal descriptionOnly when status = -5
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
200Delivery receipt linked to the CT-e successfully
-2Mandatory fields in the request not informed
-3Invalid access key
-4Error information according to the data type
-5Error or rejection when carrying out the delivery receipt. Check the "codigo" and "descricao" fields for more information
-6The access key of the NFe informed at inf.Entrega is invalid: (access key)

Como podemos ajudar?