TF Fiscal

MDF-e 货运清单

POST/api/mdfe/consult

查询 MDF-e 状态

使用访问密钥在税务局查询 MDF-e 状态。访问密钥不属于通过本平台开具的 MDF-e 时,按请求中的 tpAmb 查询,未传时按生产环境查询。MDF-e 已取消时,message 为 MDF-e Cancelado、cStat 为 101;已关闭时,message 为 MDF-e Encerrado、cStat 为 132;这两种情况下 nProt 为相应事件的协议号。

必需请求头

tokenstringstring发行企业 token
signstringstringMD5 签名
timestampstringstringUnix 时间戳(秒)

Body

chMDFe*stringstringMDF-e 访问密钥(44 位)
tpAmbintint查询环境:1=生产(默认),2=测试。

 * 必填字段。

示例

# sign = md5(token + path + body + timestamp)
# 按接口路径生成的调用模板,占位符替换为实际值
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