TF Fiscal

MDF-e Manifest

POST/api/mdfe/consult

Query the status of the MDF-e

Consults the MDF-e status at the tax authority using the access key. When the access key does not belong to an MDF-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 MDF-e is cancelled, message is MDF-e Cancelado and cStat is 101; when it is closed, message is MDF-e Encerrado and cStat is 132. In both cases nProt is the protocol of the corresponding event.

Required headers

tokenstringstringToken of the issuing company
signstringstringMD5 signature
timestampstringstringUnix timestamp in seconds

Body

chMDFe*stringstringAccess key of the MDF-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/mdfe/consult" \
  -H "Content-Type: application/json" \
  -H "token: $TOKEN" \
  -H "timestamp: $TIMESTAMP" \
  -H "sign: $SIGN" \
  -d @body.json