beel_create_series
Creates an invoice series for a company, setting a unique code, numbering format, and counter reset period while enforcing fiscal guardrails.
Instructions
Creates an invoice series under a company (NIF). The series code must be unique within the
company — a code already taken answers 409 — and its format and counter_reset must
be able to tell reset periods apart: a MONTHLY reset needs {MM} and a year token, an
ANNUAL reset needs a year token.
The first series created for a company is automatically marked as default.
Endpoint: POST /v1/companies/{company_id}/series
⚠️ 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 |
|---|---|---|---|
| body | Yes | ||
| 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. | |
| idempotency_key | No | Optional idempotency key for this operation. Omit it and one is derived from the request itself, which makes a blind retry safe but also collapses a SECOND, deliberately identical operation into the first for 24 hours. Set it — to an order id, or anything unique per intended operation — whenever you mean to create something that may look identical to what you just created. |