TF Fiscal

NF-e Invoices

POST/api/invoice/v2/task/get

Get 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

tokenstringstringIssuing company token
signstringstringMD5 signature
timestampstringstringUnix timestamp in seconds

Body

task_id*stringstringTask number returned by /api/invoice/v2/create

status

StatusMeaning
pendingAccepted, waiting to be processed
processingBeing submitted to the tax authority
successIssued; the response carries the same data as /api/invoice/create
failedIssuance 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