E069: Delete material
DELETE /api/materials/:id
Removes a material if nothing references it. Triggered from Material Detail. PO items, BOM input rows, and the materials ledger all block deletion. Archiving via PATCH isActive=false (E068) is the routine path.
Authentication
Standard tenant route. Requires Authorization: Bearer <firebase-id-token> and X-Org-Id: <org-id>. Access: Admin.
Request
No body. Hard delete — blocked while the material is referenced.
Response — 200 OK
{ "deletedId": "uuid" }
Echo of the deleted material's id.
Errors
| HTTP | code | Condition |
|---|---|---|
| 404 | not_found | No such material. |
| 409 | in_use | Material is referenced by a PO item, BOM item, or inventory-ledger entry. |
Workflow
Calls W069 Delete material.