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.
Field | Description | Data Type | Occurrence | Notes |
---|---|---|---|---|
X-AUTH-TOKEN | User access token | String | 0-1 | |
chCTe | Access key of the CT-e that will be sent | String | 1-1 | |
tpAmb | Type of environment where the CT-e is located | Int | 1-1 | 1 - Production 2 - Homologation |
enviaEmailDoc | Send to the original e-mails contained in the document's XML | Boolean | 0-1 | Required if the "email" field is not sent. Default value: False |
Destination e-mail | Array(String) | 0-N | Required if the enviaEmailDoc is not sent | |
anexarPDF | Indicates if the document's PDF must be generated and sent together | Boolean | 0-1 | |
anexarEvento | Indicates if the events must be sent together | Boolean | 0-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
Field | Description | Data Type | Occurrence | Notes |
---|---|---|---|---|
status | Processing status code | Int | 1-1 | |
motivo | Processing status literal description | String | 1-1 | |
erro | Object contaning error information | Object | 0-1 | Only when status is different from 200 and -2 |
cStat | Error status code | Int | 1-1 | |
xMotivo | Error literal description | String | 1-1 |
Return example
Successful return
{
"status": 200,
"motivo": "Reenvio de e-mail agendado com sucesso"
}
Return codes
Code | Description |
---|---|
200 | Successfully scheduled e-mail resend |
-3 | 'enviaEmailDoc' must be true or the destination addresses must be sent in the field "email" |
-3 | Informed e-mail is invalid: email |