POST
/api/dce/consult查询 DC-e 状态
根据访问密钥查询 DC-e 在税务局上的当前状态。当 DC-e 已取消时,响应反映取消的数据(本地库是取消信息的事实来源)。仅能查询通过本平台开具的 DC-e。
必需请求头
tokenstring | string | 开票公司的 Token |
signstring | string | MD5 签名 |
timestampstring | string | Unix 时间戳(秒) |
Body
chDCe*string | string | DC-e 访问密钥(44 位) |
* 必填字段。
示例
# sign = md5(token + path + body + timestamp) # 按接口路径生成的调用模板,占位符替换为实际值 curl -X POST "https://api.tffiscal.com/api/dce/consult" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"chDCe": "41250612345678000199990010000000011201234564"
}
{
"success": true,
"message": "Autorizado o uso do DC-e",
"chDCe": "41250612345678000199990010000000011201234564",
"status": "Success",
"cStat": "100",
"xMotivo": "Autorizado o uso do DC-e",
"nProt": "141250000123456",
"xml": "https://storage.../dce/41250612345678000199990010000000011201234564.xml",
"dace": "https://storage.../dce/41250612345678000199990010000000011201234564.pdf"
}
{
"success": true,
"message": "DC-e Cancelada",
"chDCe": "41250612345678000199990010000000011201234564",
"status": "Canceled",
"cStat": "101",
"xMotivo": "Cancelamento de DCe homologado",
"nProt": "141250000123457",
"xml": "https://storage.../dce/41250612345678000199990010000000011201234564.xml",
"xmlCancel": "https://storage.../dce/41250612345678000199990010000000011201234564-110111-01.xml",
"dhEventoCancel": "2026-06-11T11:00:00-03:00"
}