GET
/api/invoice/get_detail查询 NF-e 详情
通过 UUID 或访问密钥(chave)返回特定 NF-e 的详情。包括 XML URL、DANFE URL(完整、简化、标签)和元数据。DANFE 地址超过存储保留期后返回空字符串,此时可调用 /api/invoice/get_danfe 重新生成。
必需请求头
tokenstring | string | 开票公司令牌 |
signstring | string | MD5 签名(path 包含查询字符串) |
timestampstring | string | 秒级 Unix 时间戳 |
查询字符串
uuidstring | string | NF-e UUID |
chavestring | string | NF-e 访问密钥(44 位数字) |
请提供 uuid 或 chave(至少一个)。若同时发送,以 uuid 为准。
示例
# sign = md5(token + path + body + timestamp) # 按接口路径生成的调用模板,占位符替换为实际值 curl -X GET "https://api.tffiscal.com/api/invoice/get_detail" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN"
GET /api/invoice/get_detail?uuid=4663a257-adf1-4561-971f-6aaffbd30ca8 GET /api/invoice/get_detail?chave=35210112345678901234567890123456789012345678
{
"success": true,
"data": {
"id": "pedido-2024-0001",
"uuid": "4663a257-adf1-4561-971f-6aaffbd30ca8",
"chave": "35210112345678901234567890123456789012345678",
"serie": 1,
"number": 100,
"status": "Success",
"total_price": 300.00,
"xml": "https://oss.example.com/.../chave.xml",
"danfe": "https://oss.example.com/.../chave.pdf",
"danfe_simples": "https://oss.example.com/.../chave_simplie.pdf",
"danfe_etiqueta": "https://oss.example.com/.../chave_etiqueta.pdf",
"create": "2024-01-10T10:30:00Z",
"issue_time": "2024-01-10T10:31:00Z"
}
}