E028: Delete vendor
DELETE /api/vendors/:id
Removes a vendor that no PO references. Triggered from Vendor Detail. Archive (set isActive to false via Update) is the routine path for retired suppliers.
Authentication
Standard tenant route. Requires Authorization: Bearer <firebase-id-token> and X-Org-Id: <org-id>. Access: Admin.
Request
No body. Hard delete — the vendor row is removed. Blocked with 409 in_use if any purchase order references the vendor; archive (set isActive to false via Update) is the routine path for retired suppliers.
Response — 200 OK
{ "deletedId": "uuid" }
Errors
| HTTP | code | Condition |
|---|---|---|
| 404 | not_found | No such vendor. |
| 409 | in_use | One or more purchase orders reference this vendor. |
Workflow
Calls W028 Delete vendor.