POST
/api/invoice/v2/task/getGet async issuance result
Query task status and result by task_id. The canonical path is /api/invoice/v2/task/get; the legacy path /api/invoice/task/get remains available with identical behavior and billing. Only tasks submitted by the same account can be queried, otherwise Task not found. Poll every 1–2 seconds; tasks usually finish within seconds.
Required headers
tokenstring | string | Issuing company token |
signstring | string | MD5 signature |
timestampstring | string | Unix timestamp in seconds |
Body
task_*string | string | Task number returned by /api/invoice/v2/create |
status
| Status | Meaning |
|---|---|
| pending | Accepted, waiting to be processed |
| processing | Being submitted to the tax authority |
| success | Issued; the response carries the same data as /api/invoice/create |
| failed | Issuance failed. If the tax authority rejected it, the reason is in data.motivo (and message = "失败"); for errors before the tax authority, the reason is in message, with no data |
The top-level
status is the task status (lowercase); on success data.status is the issuance result status (e.g. Success), identical to /api/invoice/create.Examples
# sign = md5(token + path + body + timestamp) # Template generated from the endpoint path; replace the placeholders curl -X POST "https://api.tffiscal.com/api/invoice/v2/task/get" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{ "task_id": "66d0a1b2c3d4e5f6a7b8c9d0" }{ "success": true, "message": "Em processamento, consulte novamente.", "status": "processing" }{
"success": true,
"message": "成功",
"status": "success",
"data": {
"uuid": "4663a257-adf1-4561-971f-6aaffbd30ca8",
"status": "Success",
"motivo": "Rejeição 100: Autorizado o uso da NF-e",
"nfe": 100,
"serie": 1,
"chave": "35260111444777000161550010000001001000000010",
"modelo": "nfe",
"epec": false,
"xml": "https://oss.example.com/.../chave.xml"
}
}{
"success": false,
"message": "失败",
"code": "TAX_AUTHORITY_REJECTED",
"status": "failed",
"data": {
"uuid": "4663a257-adf1-4561-971f-6aaffbd30ca8",
"status": "Failed",
"motivo": "Rejeição 539: Duplicidade de NF-e, com diferença na Chave de Acesso",
"nfe": 100,
"serie": 1,
"chave": "",
"modelo": "nfe",
"epec": false,
"xml": ""
}
}