beel_delete_invoice
Delete a draft invoice and automatically restore its originating proforma to active for editing. Issued invoices are never deleted—void them to maintain the fiscal trail.
Instructions
Deletes a draft invoice of this company. The record is marked as deleted rather than removed.
Issued invoices: never deleted. They are voided with
POST …/{invoice_id}/void, which leaves the fiscal trail.source_proforma_id: when the draft came from converting a proforma, deleting it returns that proforma fromCONVERTEDtoACTIVE, editable and convertible again. Voiding or rectifying an issued invoice does not return its proforma; only deleting the draft does.
Endpoint: DELETE /v1/companies/{company_id}/invoices/{invoice_id}
⚠️ Fiscal guardrails — read before calling:
When an invoice can still be changed, and what to do once it cannot. (resource: beel://guardrails/invoice-state-machine)
For the exhaustive rules and worked examples, call beel_docs_search.
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. | |
| invoice_id | Yes | Invoice ID |