beel_ensure_default_series
Create missing default invoice series for standard, simplified, and corrective documents, keeping existing defaults, and return the full resulting set.
Instructions
Ensures the company 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.
Already there: a document type that already has a default keeps it, and it is returned unchanged.
Missing: it is created with code
F,SorRand format{CODIGO}-{YYYY}-{NUM:4}, active and marked as default.Code taken: if that code already belongs to another series, the document type is omitted from the response and is left with no default.
Closed catalogue. This collection is fixed and bounded — one entry per DocumentType:
it carries no pagination, it takes no page/limit, and every response holds the whole
set.
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 | Unique identifier (UUID) of the company the operation acts on — its identifier, not its NIF. 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 company you do not reach answers `403`, and so does a company that does not exist, so the existence of a company in another account is never disclosed. |