POST
/api/invoice/refreshRefresh invoice status
Queries the current NF-e status at the tax authority and updates the local record. Useful when issuance remained in processing or contingency.
Required headers
tokenstring | string | Issuing company token |
signstring | string | MD5 signature |
timestampstring | string | Unix timestamp in seconds |
Body
uuid*string | string | UUID of the NF-e to query |
* Required field.
Response fields (data)
motivostring | string | Status description returned by the tax authority |
statusstring | string | Updated invoice status, e.g."Success", "Canceled", "Failed" |
nfeint | int | NF-e number |
serieint | int | NF-e series |
chavestring | string | 44-digit access key |
If the previous refresh took place less than one hour earlier, the tax authority is not queried and the locally recorded status is returned. The tax authority limits the number of queries; when the limit is reached the API returns an error and the call should be retried after one hour. When there is no local access key and the tax authority has no record of the invoice either, the API returns
Nota não existe, inutilize o número; the number should then be invalidated through /api/invoice/invalid.
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/refresh" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"uuid": "4663a257-adf1-4561-971f-6aaffbd30ca8"
}
{
"success": true,
"message": "成功",
"data": {
"motivo": "Autorizado o uso da NF-e",
"status": "Success",
"nfe": 100,
"serie": 1,
"chave": "35260112345678000199550010000001001000000017"
}
}