POST
/api/nfce/exportBatch export NFC-e
Batch-exports the company's production NFC-e by period (homologation/test notes are excluded). Generation is asynchronous: the first call starts the export and returns "status": "Processing"; repeat the same call (same body) until you receive "status": "Success" with the download url. XML and PDF are delivered as a .zip (one file per note); the spreadsheet as .xlsx or .csv. The result stays valid for 10 days: within that window the same parameters return the same file (notes issued after generation are not included — use a different period to generate a new file).
Required headers
tokenstring | string | Issuing company token |
signstring | string | MD5 signature |
timestampstring | string | Unix timestamp in seconds |
Body
type*string | string | "xml" (ZIP of XMLs), "pdf" (ZIP of DANFEs) or "sheet" (spreadsheet) |
start_string | string | Start date dd/MM/yyyy, Brasília time — the period starts at 00:00:00 of that day |
end_string | string | End date dd/MM/yyyy — the end day is included in full (until 23:59:59) |
monthint | int | Alternative to the date range: full month (1–12, Brasília time); a month greater than the current one = last year |
statusstring | string | "all" (default), "emitida" (authorized), "cancelada" (canceled) or "contingencia" (contingency) |
patternstring | string | For sheet: "xlsx" (default) or "csv".For pdf: receipt width in mm — "80" (default), "72" or "50" |
* Required field. Provide the period with start_create_time + end_create_time or with month.
Examples
# sign = md5(token + path + body + timestamp) # Template generated from the endpoint path; replace the placeholders curl -X POST "https://api.tffiscal.com/api/nfce/export" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"type": "sheet",
"start_create_time": "01/08/2026",
"end_create_time": "31/08/2026",
"status": "all"
}
{
"success": true,
"data": {
"status": "Processing",
"progress_count": 120,
"total_count": 450,
"url": ""
}
}
{
"success": true,
"data": {
"status": "Success",
"progress_count": 450,
"total_count": 450,
"url": "https://.../nfce-export/12345678000190_NFCe_planilha_01-08-2026_a_31-08-2026_todas_20260824153000.xlsx"
}
}