POST
/api/cte/cancel取消 CT-e
取消一张已授权的 CT-e(事件 110111)。要求该 CT-e 已被授权(具有协议号)且尚未取消。仅能取消通过本平台开具的 CT-e。
必需请求头
tokenstring | string | 开票公司的 Token |
signstring | string | MD5 签名 |
timestampstring | string | Unix 时间戳(秒) |
Body
chCTe*string | string | CT-e 访问密钥(44 位) |
xJust*string | string | 取消理由(按税务局要求最少 15 个字符) |
nProtstring | string | 授权协议号。 可选:省略时使用开具时登记的协议号 |
* 必填字段。
示例
# sign = md5(token + path + body + timestamp) # 按接口路径生成的调用模板,占位符替换为实际值 curl -X POST "https://api.tffiscal.com/api/cte/cancel" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"chCTe": "35260626638419000167570010000000011123456780",
"xJust": "Cancelamento por erro no preenchimento dos dados da prestacao"
}
{
"success": true,
"message": "Evento registrado e vinculado a CT-e",
"cStat": "135",
"chCTe": "35260626638419000167570010000000011123456780",
"nProt": "135260000123457",
"xml": "https://storage.../cte/35260626638419000167570010000000011123456780.xml"
}