beel_ensure_default_series
Ensures a company always has default invoice series for standard, simplified, and corrective types, creating missing ones and returning the set. Idempotent: repeating does nothing.
Instructions
Ensures the company (NIF) has a default invoice series for STANDARD, SIMPLIFIED and
CORRECTIVE in the current environment, and returns the resulting set. The request takes
no body: the desired end state is one default per document type, so repeating it changes
nothing.
A document type that already has a default keeps it, and it is returned unchanged. A
missing one is created with code F, S or R and format {CODIGO}-{YYYY}-{NUM:4},
active and marked as default — unless that code is already taken by another series, in
which case the type is omitted from the response and is left with no default.
Endpoint: PUT /v1/companies/{company_id}/series/defaults
⚠️ Fiscal guardrails — read before calling:
How invoice numbers are formed, and why numbering can never be rewritten. (resource: beel://guardrails/series-and-numbering)
For the exhaustive rules and worked examples, call beel_docs_search.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| company_id | Yes | NIF (company) the operation acts on. It is the only source of context: the account that owns it is derived from it, and the `BeeL-Active-Company` header plays no part. A NIF you do not reach answers `403`, and so does a NIF that does not exist, so the existence of a NIF in another account is never disclosed. |