Delete Customer
This DELETE endpoint removes a customer record from the system using their unique customer ID.
Endpoint
- URL:
/customers/{customer_id} - Method:
DELETE
Path Parameters
| Parameter | Type | Description |
|---|---|---|
customer_id | string | The unique identifier of the customer to delete. |
Authentication
- Header:
accessToken - Type: Bearer Token
- Value:
<ACCESS-TOKEN>
Request Headers
| Header | Type | Description |
|---|---|---|
accessToken | string | Access token for authentication. (required) |
Request Body
No request body is required for this DELETE operation.
Response
- Status Code: 200 OK
Success Response Body
A successful response will confirm the deletion of the customer:
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the request was successful. |
message | string | A message confirming the deletion of the customer. |
Sample Success Response
{
"success": true,
"message": "Customer deleted successfully"
}
Error Responses
| Status Code | Description |
|---|---|
| 401 Unauthorized | The access token is invalid or missing. |
| 403 Forbidden | You do not have permission to delete this customer. |
| 404 Not Found | No customer matches the specified customer_id. |
| 500 Internal Server Error | An error occurred on the server. |
Notes
- Ensure the
customer_idin the URL is replaced with the actual ID of the customer you wish to delete. - Confirm your access token is valid and has the necessary permissions to perform the deletion.
- This operation is permanent and cannot be undone.