Delete Customer
DELETE /api/v1/customers/:id
Permanently delete a customer record.
Description
Removes the customer and associated data (e.g., linked invoices may be archived). Use with caution—cannot be undone.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
Integer | Yes | Customer ID |
Query Parameters
None.
Request Headers
| Header | Value | Description |
|---|---|---|
Authorization |
Bearer <access_token> |
OAuth 2.0 Bearer token |
Content-Type |
application/json |
Request body format |
Accept |
application/json |
Response format |
Request Body
None.
Request Example
curl -X DELETE "https://koteshen.com/api/v1/customers/13" \ -H "Authorization: Bearer <access_token>" \ -H "Accept: application/json"
Response
- Status Code:
204 No Content - Content-Type:
application/json
Success Response Body
Empty.
Error Responses
- 401 Unauthorized:
{ "error": "Unauthorized" } - 404 Not Found:
{ "error": "Customer not found" } - 409 Conflict:
{ "error": "Customer has linked invoices" }(if deletions are restricted)
Usage Notes
- Check for dependencies (e.g., via List Invoices) before deleting.
- Soft-delete may be implemented in future; confirm via changelog.