TF Fiscal

NFC-e Consumer Invoices

POST/api/nfce/export

Batch 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

tokenstringstringIssuing company token
signstringstringMD5 signature
timestampstringstringUnix timestamp in seconds

Body

type*stringstring"xml" (ZIP of XMLs), "pdf" (ZIP of DANFEs) or "sheet" (spreadsheet)
start_create_timestringstringStart date dd/MM/yyyy, Brasília time — the period starts at 00:00:00 of that day
end_create_timestringstringEnd date dd/MM/yyyy — the end day is included in full (until 23:59:59)
monthintintAlternative to the date range: full month (1–12, Brasília time); a month greater than the current one = last year
statusstringstring"all" (default), "emitida" (authorized), "cancelada" (canceled) or "contingencia" (contingency)
patternstringstringFor sheet: "xlsx" (default) or "csv".

 * 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