This service is used to consult the processing status of a CT-e previously sent for processing by the CT-e Issuance Method.
URL
3.00 version
Production CT-e 3.00 and CT-e OS: POST https://cte.ns.eti.br/cte/issueStatus/300
Input data
| Field | Occurrence | Description | Notes |
|---|---|---|---|
| X-AUTH-TOKEN | 1-1 | User access token | |
| nsNRec | 1-1 | Receipt number by NS CT-e API | |
| CNPJ | 1-1 | Issuer CNPJ | Only in 3.00 version |
| tpAmb | 1-1 | CT-e authorization environment type: 1 - Production, 2 - Homologation |
Request example
CT-e processing status request
curl -X POST
\-H "Content-Type: application/json"
\-d '{
"X-AUTH-TOKEN":"...",
"nsNRec":"431000008742554",
"CNPJ":"07364617000135",
"tpAmb": "2"
}' \
https://cte.ns.eti.br/cte/issueStatus/300
Returned data
| Field | Description | Data Type | Occurrence | Parent | Notes |
|---|---|---|---|---|---|
| status | Processing status code | Int | 1-1 | ||
| motivo | Processing status literal description | String | 1-1 | ||
| chCTe | CT-e access key | Int | 0-1 | Only when status = 200 or -4 | |
| cStat | Situation code of the processing status | Int | 1-1 | Only when status = 200 | |
| xMotivo | Situation code literal description at Sefaz | String | 0-1 | Only when status = 100 | |
| nProt | CT-e authorization protocol number | String | 0-1 | ||
| dhRecebto | Date and time of receipt of the CT-e by Sefaz | Sefaz Standard: YYYY-MM-DDTHH:MM:SS+UTC E.g.: 2016-06-13T15:04:10-02:00 |
|||
| xml | CT-e distribution XML | String | 0-1 | Only when cStat = 100 | |
| erro | Object containing error information that occurred | Object | 0-1 | Only when status = -4 | |
| cStat | Error status code | Int | 1-1 | erro | |
| xMotivo | Error literal description | String | 1-1 | erro |
Return examples
Successful return
{
"status": 200,
"motivo": "Consulta realizada com sucesso",
"chCTe": "44444444444444444444444444444444444444444444",
"cStat": "100",
"xMotivo": "Autorizado o uso do CT-e",
"nProt": "143170000931396",
"dhRecbto": "2017-11-10T11:58:52-02:00",
"xml": "<?xml version=..."
}
Return with error
//Example 1:
{
"status": -6,
"motivo": "Não foi possível carregar as informações do CT-e",
"chCTe": "44444444444444444444444444444444444444444444",
"erro": {
"cStat": 999,
"xMotivo": "Documento não Localizado no Banco de Dados"
}
}
//Example 2:
{
"status": 200,
"motivo": "Consulta realizada com sucesso",
"chCTe": "44444444444444444444444444444444444444444444",
"cStat": "228",
"xMotivo": "Rejeição: Data de Emissao muito atrasada",
"dhRecbto": "2017-11-10T11:58:00-02:00"
}
Return codes
| Code | Description |
|---|---|
| 200 | CT-e consultation carried out successfully |
| -2 | Mandatory fields not informed in the request |
| -4 | It was not possible to load the CT-e information. Please, verify the "erro" object to identify the reason |
| -6 | Document already received, but still without processing status. Please, consult the processing status of the informed nsNRec |