beel_ensure_default_series
Ensures a default invoice series exists for STANDARD, SIMPLIFIED, and CORRECTIVE document types and returns the complete set. Missing defaults are created automatically; existing ones remain unchanged.
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.
BeeL API endpoint: PUT /v1/companies/{company_id}/series/defaults (reference: https://docs.beel.es)
⚠️ 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)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"company_id": "<company_id>"
},
"name": "beel_ensure_default_series"
}
}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. |