Delete a recurring invoice
Scopeinvoices:writePermanently deletes a recurring invoice template of this company and cancels any pending scheduled generations. Invoices already generated from it are not affected.
Keys are prefixed beel_sk_, and each one carries the scopes it was created with: a key
short of the scope an operation needs is answered 403. The scope an operation requires
is shown next to its title, and the full catalogue lives in the Scopes reference.
Keys are created from the BeeL dashboard. They are secret credentials: do not share them or commit them to source control.
In: header
Path Parameters
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.
uuidUnique identifier (UUID) of the recurring invoice template, as returned when it is created or listed. A template of another company answers 404 with RECURRING_NOT_FOUND, exactly like one that does not exist.
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://app.beel.es/api/v1/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/recurring-invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required to access this resource"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The provided data is not valid",
"details": {
"field": "specific error message"
}
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
},
"type": "https://docs.beel.es/errors/INVOICE_NO_LINES",
"title": "INVOICE_NO_LINES",
"detail": "The invoice must have at least one line",
"instance": "/v1/invoices/abc-123"
}{
"success": false,
"error": {
"code": "INVOICE_NOT_FOUND",
"message": "Invoice not found"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Please try again in 60 seconds."
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "UNSUPPORTED_MEDIA_TYPE",
"message": "Unsupported media type: text/plain. Supported: application/json"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}Update a recurring invoice PATCH
Updates only the fields present in the body, leaving every other field of the recurring invoice template as it is. - **Omitted vs `null`:** an omitted field keeps its current value; a field sent as `null` is cleared, and only where the request schema documents the field as nullable. - **`lines`:** replaced as a whole, not patched line by line. The recipient survives the change, and an empty array is rejected. - **`payment_method`:** replaced as a whole together with `payment_iban`, `payment_swift` and `payment_term_days` — send them in the same request or they are dropped. - **Schedule:** `frequency`, `day_of_month` and `start_date` stay put unless you send them; sending a new value for any of the three moves the next generation — resending the ones already in effect changes nothing. Changing `frequency` recalculates it on the new grid and discards a pending skip. `start_date` is only editable while the template has not generated any invoice yet.
Set the status of a recurring invoice PUT
Sets the lifecycle status of a recurring invoice template. This is how generation is paused, resumed and ended. - **`PAUSED`:** stops automatic generation, keeping the schedule configuration intact. - **`ACTIVE`:** resumes generation. It keeps the scheduled next generation date whenever that date has not fallen due yet (including today), so resuming never re-issues a period you already invoiced and never undoes a skipped one. Only a date left in the past is rescheduled, to the first occurrence after today; the periods missed while the template was paused are not backfilled. If nothing is left to generate — the next generation date falls beyond `end_date`, or `max_invoices` has already been reached — the template becomes `COMPLETED`; for `end_date` that holds whether the date was kept or rescheduled. - **`COMPLETED`:** ends the schedule for good, from `ACTIVE` or `PAUSED`; it is also reached on its own when the schedule runs out. It is terminal: `ACTIVE` and `PAUSED` are then rejected with `RECURRING_STATE_TRANSITION_INVALID`. - **Rejected transitions:** resuming a template that is already active, or one whose `pause.blocker` is still in effect.