declarations_file_via_agent
Files a declaration to ANAF in one call: prepares the XML and DUK PDF, signs locally with your qualified certificate via the Storno Agent, uploads it, and records the upload index.
Instructions
File a declaration at ANAF in one call, the way the web app does: Storno prepares the XML and the DUK PDF (with the attachment zip for c168), the local Storno Agent signs it with the qualified certificate and uploads it to the e-guvernare portal, and Storno records ANAF's upload index (status processing; the recipisa arrives in the SPV inbox and in the dosar). Needs the agent on this computer and the PIN (pin, STORNO_AGENT_PIN, or the PIN remembered on this computer by the agent). Check declarations_validate first. Remember: one C168 per landlord and period in processing at a time.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Declaration UUID | |
| pin | No | Token PIN; defaults to STORNO_AGENT_PIN, or to the PIN the agent remembers for this certificate | |
| companyId | No | Company UUID (overrides STORNO_COMPANY_ID env var) | |
| certificateId | Yes | Certificate id from agent_certificates |