POST
/api/dce/cancel取消 DC-e
取消一张已授权的 DC-e(事件 110111)。要求 DC-e 已被授权(已有协议号)且尚未取消。每张 DC-e 只允许取消一次。
必需请求头
tokenstring | string | 开票公司的 Token |
signstring | string | MD5 签名 |
timestampstring | string | Unix 时间戳(秒) |
Body
chDCe*string | string | DC-e 访问密钥(44 位) |
xJust*string | string | 取消理由(按税务局要求至少 15 个字符) |
nProtstring | string | 授权协议号。 可选:省略时使用开具时登记的协议号 |
* 必填字段。
遇到拒绝时,响应返回 success=false 以及拒绝的 cStat/xMotivo。
示例
# sign = md5(token + path + body + timestamp) # 按接口路径生成的调用模板,占位符替换为实际值 curl -X POST "https://api.tffiscal.com/api/dce/cancel" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"chDCe": "41250612345678000199990010000000011201234564",
"xJust": "Cancelamento por erro no preenchimento dos dados da declaracao"
}
{
"success": true,
"message": "DC-e cancelada",
"chDCe": "41250612345678000199990010000000011201234564",
"cStat": "135",
"xMotivo": "Evento registrado e vinculado a DC-e",
"nProtCancel": "141250000123457",
"xmlCancel": "https://storage.../dce/41250612345678000199990010000000011201234564-110111-01.xml"
}