POST
/api/mdfe/cancel取消 MDF-e
取消已授权的 MDF-e。窗口: 授权后最多 24 小时。如果 MDF-e 已关闭,则不允许。
必需请求头
tokenstring | string | 发行企业 token |
signstring | string | MD5 签名 |
timestampstring | string | Unix 时间戳(秒) |
Body
chMDFe*string | string | MDF-e 访问密钥(44 位) |
xJust*string | string | 取消理由(根据税务局要求最少 15 个字符) |
* 必填字段。
示例
# sign = md5(token + path + body + timestamp) # 按接口路径生成的调用模板,占位符替换为实际值 curl -X POST "https://api.tffiscal.com/api/mdfe/cancel" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"chMDFe": "35260512345678000199580010000000011000000018",
"xJust": "Cancelamento por erro no preenchimento dos dados do veiculo"
}
{
"success": true,
"message": "Evento registrado e vinculado a MDF-e",
"cStat": "135",
"chMDFe": "35260512345678000199580010000000011000000018",
"nProt": "135260000123457",
"xml": "https://storage.../mdfe/35260512345678000199580010000000011000000018.xml"
}