1. Inicio
  2. Documentos
  3. NS CTe (English)
  4. CTe Utility Functions
  5. Send CT-e by e-mail

Send CT-e by e-mail

Through this service it’s possible to send a CT-e authorized by the NS CT-e API by e-mail and/or resend the CT-e to the e-mails contained in the XML.

It’s important to note that the sender address used will be the e-mail configured for the contributor in the Painel.

URL

Production: POST https://cte.ns.eti.br/util/resendemail

Input data

The input data of this method can be sent in the request body in JSON format or as QueryString in the URL of the method.

FieldDescriptionData TypeOccurrenceNotes
X-AUTH-TOKENUser access tokenString0-1
chCTeAccess key of the CT-e that will be sentString1-1
tpAmbType of environment where the CT-e is locatedInt1-11 - Production
2 - Homologation
enviaEmailDocSend to the original e-mails contained in the document's XMLBoolean0-1Required if the "email" field is not sent. Default value: False
emailDestination e-mailArray(String)0-NRequired if the enviaEmailDoc is not sent
anexarPDFIndicates if the document's PDF must be generated and sent togetherBoolean0-1
anexarEventoIndicates if the events must be sent togetherBoolean0-1
Request example

Request example

curl -X POST \
-H "Content-Type: application/json" \
-d '{
      "X-AUTH-TOKEN": "YOUR_TOKEN", 
      "chCTe": "43161106364717000135570000000099341000094837", 
      "tpAmb":"2", 
      "email": ["email@email.com.br"]
     }'
\https://cte.ns.eti.br/util/resendemail
Returned data
FieldDescriptionData TypeOccurrenceNotes
statusProcessing status codeInt1-1
motivoProcessing status literal descriptionString1-1
erroObject contaning error informationObject0-1Only when status is different from 200 and -2
cStatError status codeInt1-1
xMotivoError literal descriptionString1-1
Return example

Successful return

{
    "status": 200,
    "motivo": "Reenvio de e-mail agendado com sucesso"
}
Return codes
CodeDescription
200Successfully scheduled e-mail resend
-3'enviaEmailDoc' must be true or the destination addresses must be sent in the field "email"
-3Informed e-mail is invalid: email

Como podemos ajudar?