Delete Supplier (v1)
Method & Path
DELETE /api/v1/workspace/:workspaceId/suppliers/:supplierId
Actual backend path: DELETE /v1/workspace/:workspaceId/suppliers/:supplierId
Description
Delete a supplier. The supplier must have no invoices or payments; delete those first otherwise the API returns an error.
Authentication
Required: Workspace JWT.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <workspace_token> |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
supplierId | string | Yes | Supplier identifier |
Response 204 No Content
No body.
Common Errors
- 400 Bad Request: Supplier has existing invoices or payments
- 401 Unauthorized: Missing or invalid token
- 403 Forbidden: Workspace access denied
- 404 Not Found: Workspace or supplier not found
- 500 Internal Server Error: Server error