Through this endpoint, it’s possible to obtain the XML of a CT-e numeration disablement.
URL
Production: POST https://cte.ns.eti.br/cte/download/inut
Input data
| Field | Description | Notes |
|---|---|---|
| X-AUTH-TOKEN | User access token | |
| chave | CT-e disablement key | |
| tpAmb | Disablement environment type: 1 - Production, 2 - Homologation | Default value: 1 |
Request example
Disablement download request
curl -X POST
\-H "Content-Type: application/json"
\-d '{
"X-AUTH-TOKEN": "YOUR_TOKEN",
"chave": "99999999999999999999999999999999999999",
"tpAmb": 1
}' \
https://cte.ns.eti.br/cte/download/inut
Returned data
| Field | Description | Notes |
|---|---|---|
| status | Processing status code | |
| motivo | Processing status literal description | |
| retInut | Object containing the processing data of the disablement at Sefaz | Only when status = 200 |
| retInut.cStat | Disablement situation code at Sefaz | |
| retInut.xMotivo | Disablement situation literal description at Sefaz | |
| retInut.chave | CT-e disablement access key | |
| retInut.tpAmb | CT-e disablement environment type | |
| retInut.dhRecbto | Date and time of receipt of the disablement at Sefaz | Sefaz Standard: YYYY-MM-DDTHH:MM:SS+UTC E.g.: 2016-06-13T15:04:10-02:00 |
| retInut.nProt | Disablement authorization protocol number by Sefaz | |
| retInut.xml | Disablement XML | |
| erro | Object contaning the error information in case the download could not be carried out successfully | Only when status is different from 200 |
| erro.cStat | Error status code | |
| erro.xMotivo | Error literal description |
Return example
Successful return
{
"status": 200,
"motivo": "Inutilizacao localizada com sucesso",
"retInut": {
"cStat": 102,"xMotivo": "Inutilizacao de numero homologado",
"chave": "430736461700013557000000000883000000883",
"tpAmb": 2,
"dhRecbto": "2020-03-09T11:57:15-03:00",
"nProt": "143200000042460",
"xml": "<?xml version..."
}
}
Return codes
| Code | Description |
|---|---|
| 200 | Download carried out successfully |
| -3 | Not possible to load the disablement |