beel_ensure_default_series
Ensures a company has one default invoice series for standard, simplified, and corrective documents, creating missing defaults and returning the 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
⚠️ Read before calling:
Fiscal rules, domains numbering: beel_rules_list with domain, or resource beel://guardrails/.
How a series formats numbers, and which series configurations are rejected. (resource: beel://guardrails/series-and-numbering)
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. |