Approve a draft as the filing
Requires the ‘regulatory-approval’ permission AND a person: an application token is refused (403 RPT-0201, or 401 RPT-0158 where M2M inversion is off), so a workflow can generate and follow a report but only a person approves it. The permission is deliberately NOT the one that generates and corrects — that separation is what lets a client put approval in a second pair of hands. Freezes the draft as Final — the file a person accepted, at the version they read (If-Match, required). A draft with a REQUIRED field still blank is refused with 409: an incomplete file must never become the filing. A second approval of the same version by the SAME approver answers 200 again — that is a retry, and the report is approved either way; by a DIFFERENT approver it is refused, because the record would otherwise name whoever won a race. A different version is a conflict, because what they read is not what they would be approving. After approval nothing changes it: corrections are refused and the provenance is frozen for good.
Respuesta
OK
The filing period this generation is for, as the pinned contract's filing.period spells it: name=value of each period parameter in name order, joined by &, or * when the contract declares the document has no period (one filing for the document and the institution). Two generations of the same document for the same declarant CNPJ with the same filingPeriod and remittance are the same filing, whichever subscription generated them. Absent on an operational report and on a filing generated before the period was recorded.
"dataBase=2026-09"
Values the engine generated into the document's generated fields when the draft was made, each unique across the tenant's reports. A correction re-renders the same values; a new generation draws new ones. Present wherever the report is read, the list endpoint included; absent when the document generates nothing.
What a regulatory Draft still cannot fill, computed on read from the same stored state the approval refusal reads, each field flagged required or not. Present when a Draft is read by id; absent on a Final, on a non-regulatory report, and in the list endpoint, which does not compute it. Absent means unknown, an empty list means nothing is missing, and only a required gap refuses an approval.
The newest Draft or Final of the same declarant (document and institution CNPJ, across subscriptions), filing period and remittance created after this report, which therefore stands in its place. Computed on read for regulatory filings that are not Final; absent when nothing supersedes the report, on a Final, on a filing without a recorded period and on an operational report.
"00000000-0000-0000-0000-000000000003"

