TF Fiscal

Platform & integrations

Audit

1 endpoints

POST/api/audit/run

Run tax audit

Runs the digital tax audit over the invoices already stored for the authenticated company — without generating a file or relying on an external validator. Scope: NF-e (model 55), production invoices only (homologation is ignored). It runs two rules: numbering gaps/omissions (numbers missing between the lowest and highest authorized number, per series) and duplicates (the same key stored more than once, or the same order authorized more than once). The period is optional; without a period, it audits all of the company's invoices.

Required headers

HeaderTypeDescription
tokenstringCompany token
signstringMD5 signature
timestampstringUnix timestamp in seconds

Body — parameters (all optional)

FieldTypeDescription
monthnumberMonth (1–12). Has top priority: audits the whole month. Combine with year.
yearnumberYear of month (default: current year). Ignored without month.
start_datestringStart of the period, in dd/MM/yyyy or dd/MM/yyyy HH:mm:ss format. Without the time, it assumes 00:00:00. São Paulo time zone. Used when month is not sent.
end_datestringEnd of the period (same format). The end is exclusive — for a full month, use the 1st day of the following month (e.g., 01/07/2026).
start_create_timenumberStart of the period as a Unix timestamp (milliseconds). Used when month and start_date/end_date are not sent.
end_create_timenumberEnd of the period as a Unix timestamp (milliseconds, exclusive).

All fields are optional. Precedence: month (+year) › start_date/end_date › start_create_time/end_create_time › none (audits all invoices).

Response — fields

FieldTypeDescription
periodoobjectPeriod actually audited (São Paulo time zone), with de and ate; null when no period (audited everything).
notas_puladasarrayNumbering rule. Each item = { serie, quantidade, notas }, where notas are the missing numbers joined by comma.
notas_duplicadasarrayDuplicate rule. Each item carries quantidade + registros[] and is identified by chave (same document stored more than once) or by pedido (same order authorized more than once). Each record = { serie, numero, chave, status, emitida_em }.