beel_set_invoice_schedule
Schedule or reschedule a draft invoice for a specific processing date and set its generation mode to draft-for-review or issue-and-send automatically.
Instructions
Replaces the scheduling of a draft invoice, whether it had one or not, moving it to
SCHEDULED. Both fields of the body are required.
scheduled_for: the date the invoice is processed on. Today or later; an earlier date is rejected with422 SCHEDULED_DATE_IN_PAST.generation_mode:DRAFTleaves the invoice as a draft for manual review,ISSUE_AND_SENDissues and sends it automatically. There is no default.Availability: requires the
scheduled_invoicesfeature.If-None-Match: *: without it, this call always replaces the scheduling whole — the behaviour integrators rely on. Send it to opt into the opposite: if the invoice is already scheduled, nothing is changed and the call fails with412 INVOICE_ALREADY_SCHEDULEDinstead of silently overwriting the date and mode someone else set. Any other value, or omitting the header, keeps today's replace-whole behaviour.
BeeL API endpoint: PUT /v1/companies/{company_id}/invoices/{invoice_id}/schedule (reference: https://docs.beel.es)
⚠️ Read before calling:
Fiscal rules, domains lifecycle: beel_rules_list with domain, or resource beel://guardrails/.
The status names, the proforma lifecycle, and which tool performs each operation. (resource: beel://guardrails/invoice-state-machine)
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>",
"invoice_id": "<invoice_id>",
"body": "<body>"
},
"name": "beel_set_invoice_schedule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| 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. | |
| invoice_id | Yes | Invoice ID |