declarations_create
Create a new tax declaration (VAT, payroll, SAF-T, or special regimes). Auto-populates from invoices for the period, with form input support for d212 and c168.
Instructions
Create a new tax declaration. VAT and payroll types (d394, d300, d390, d100, d112) are auto-populated from the company's invoices for the period; so are 'd301' (decont special de TVA for companies not registered for VAT: purchases from abroad with self-assessed VAT, monthly) and 'd398' (OSS / regimul UE: special-regime art. 314-315 sales to consumers in other member states, quarterly, any month of the quarter) and 'd406' (SAF-T: the whole audit file — header, accounts, customers / suppliers, tax codes, the ledger derived from the documents and the source documents — for the company's VAT period, periodType monthly or quarterly). Form-based types are filled from plain JSON: 'd212' (Declarația unică, rent income; month 12) and 'c168' (rental contract registration/amendment/termination; month 12) take data.input in the shape of declaration_form_spec, and c168 needs data.attachments [{name, contentBase64}] (the scanned contract / termination document) for the PDF. Then declarations_validate → declarations_file_via_agent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | For d212 / c168: { input: <form input>, attachments?: [{name, contentBase64}] }. Responses return attachments as {name, size, mime, stored} without the content; sending that shape back keeps the stored files | |
| type | Yes | Declaration type | |
| year | Yes | Declaration year (e.g. 2026) | |
| month | Yes | Declaration month (1–12) | |
| dosarId | No | Attach the new declaration to this dosar | |
| companyId | No | Company UUID (overrides STORNO_COMPANY_ID env var) | |
| periodType | No | Period type (default: "monthly") |