Platform & integrations
Audit
1 endpoints
POST
/api/audit/runRun 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
| Header | Type | Description |
|---|---|---|
| token | string | Company token |
| sign | string | MD5 signature |
| timestamp | string | Unix timestamp in seconds |
Body — parameters (all optional)
| Field | Type | Description |
|---|---|---|
| month | number | Month (1–12). Has top priority: audits the whole month. Combine with year. |
| year | number | Year of month (default: current year). Ignored without month. |
| start_date | string | Start 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_date | string | End 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_time | number | Start of the period as a Unix timestamp (milliseconds). Used when month and start_date/end_date are not sent. |
| end_create_time | number | End 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
| Field | Type | Description |
|---|---|---|
| periodo | object | Period actually audited (São Paulo time zone), with de and ate; null when no period (audited everything). |
| notas_puladas | array | Numbering rule. Each item = { serie, quantidade, notas }, where notas are the missing numbers joined by comma. |
| notas_duplicadas | array | Duplicate 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 }. |