beel_create_recurring_invoice
Automate monthly billing by creating a recurring invoice template with line items, series, payment details, and start/end dates.
Instructions
Creates a recurring invoice template under this company (NIF) with its template data
(lines, recipient, series, payment) and its recurrence. Generation runs monthly on
day_of_month, from start_date until end_date if one is given.
A start_date in the past is accepted and stored, but never anchors generation backwards:
next_generation moves to the first upcoming day_of_month and the missed periods are not
generated.
Endpoint: POST /v1/companies/{company_id}/recurring-invoices
⚠️ Fiscal guardrails — read before calling:
How BeeL derives the AEAT invoice type, and the rules each type imposes. (resource: beel://guardrails/invoice-types)
What regime_key means, where it lives, and which combinations are rejected. (resource: beel://guardrails/regime-keys)
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. |