# LIF-001 · An issued invoice is never edited or deleted

`Required` · Law · Impact: critical · Checked by the API: a request that breaks it is rejected with the error codes listed.

Once an invoice is issued, neither the invoice nor its billing record is changed or removed. Any correction goes through a later document: a corrective invoice or a void.

**Why:** The billing record is chained and, under VeriFactu, already with AEAT. An edit would make the invoice say something its record does not, and deleting it would leave a hole in the series.

**Applies to:** statuses `ISSUED`, `SENT`, `PAID`, `OVERDUE`, `RECTIFIED`, `VOIDED`; operations [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`DELETE /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/deleteCompanyInvoice)

**Error codes:** [`STATUS_NOT_MODIFIABLE`](/errors/STATUS_NOT_MODIFIABLE) (`422` or `400`), [`STATUS_NOT_DELETABLE`](/errors/STATUS_NOT_DELETABLE) (`400`)

**Legal basis:**

- RD 1007/2023 (RRSIF), art. 8.2.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#a8)

  > «Cualquier necesidad de corrección o anulación de los datos registrados deberá ser realizada mediante al menos un registro de facturación adicional posterior, de forma que se conserven inalterables los datos originalmente registrados.»

**Incorrect:** Patching the amount of an invoice that is already `ISSUED`: the API answers [`STATUS_NOT_MODIFIABLE`](/errors/STATUS_NOT_MODIFIABLE).

```http
PATCH /v1/companies/{company_id}/invoices/{invoice_id}

{ "lines": [{ "description": "Consulting", "quantity": 1, "unit_price": 900, "main_tax": { "type": "IVA", "percentage": 21 } }] }
```

**Correct:** Issuing a corrective invoice against it, which leaves the original as it was.

```http
POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective

{ "rectification_type": "PARTIAL", "rectification_code": "R1", "reason": "Price agreed after delivery was lower", "lines": [{ "description": "Consulting (adjustment)", "quantity": -1, "unit_price": 100, "main_tax": { "type": "IVA", "percentage": 21 } }] }
```

**Related:** [LIF-002 · Only a draft can be issued](/rules/lifecycle#lif-002) · [VOI-001 · Void only an invoice that should never have been issued](/rules/void#voi-001) · [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001)

**Explained in:** [Invoice lifecycle › What each status allows](/guides/invoice-lifecycle#what-each-status-allows) · [Amounts and rounding › Issued invoices are never recalculated](/guides/amounts-and-rounding#issued-invoices-are-never-recalculated)

Domain: [Invoice lifecycle](/rules/lifecycle) · All rules: [/rules](/rules) · JSON: [/api/rules.json](/api/rules.json)
