TF Fiscal

CT-e Transport

POST/api/cte/consult

Consult the status of the CT-e

Consults the status of the CT-e at the tax authority from the access key. When the CT-e is cancelled (local record), the response reflects the cancellation. When the access key does not belong to a CT-e issued through this platform, the query is made in the environment given by tpAmb in the request, or in the production environment when it is omitted. When the CT-e is cancelled, message is CT-e Cancelado, cStat is 101 and nProt is the cancellation protocol.

Required headers

tokenstringstringToken of the issuing company
signstringstringMD5 signature
timestampstringstringUnix timestamp in seconds

Body

chCTe*stringstringAccess key of the CT-e (44 digits)
tpAmbintintQuery environment: 1=Production (default), 2=Test.

 * Required field.

Examples

# sign = md5(token + path + body + timestamp)
# Template generated from the endpoint path; replace the placeholders
curl -X POST "https://api.tffiscal.com/api/cte/consult" \
  -H "Content-Type: application/json" \
  -H "token: $TOKEN" \
  -H "timestamp: $TIMESTAMP" \
  -H "sign: $SIGN" \
  -d @body.json