Skip to main content

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

ParameterTypeDescription
customer_idstringThe unique identifier of the customer to delete.

Authentication

  • Header: accessToken
  • Type: Bearer Token
  • Value: <ACCESS-TOKEN>

Request Headers

HeaderTypeDescription
accessTokenstringAccess 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:

FieldTypeDescription
successbooleanIndicates if the request was successful.
messagestringA message confirming the deletion of the customer.

Sample Success Response

{
"success": true,
"message": "Customer deleted successfully"
}

Error Responses

Status CodeDescription
401 UnauthorizedThe access token is invalid or missing.
403 ForbiddenYou do not have permission to delete this customer.
404 Not FoundNo customer matches the specified customer_id.
500 Internal Server ErrorAn error occurred on the server.

Notes

  • Ensure the customer_id in 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.