Delete Customer

DELETE Customer Endpoint - Yativo

The DELETE /customer/{{customer_id}} endpoint allows you to delete a specific customer profile using their unique customer ID. This endpoint is useful for closing a customer account within your application or for performing operations that require customer details.

Key Features:

  1. HTTP Method: DELETE

  2. Endpoint URL: /customer/{{customer_id}}

  3. Authentication: Requires Bearer token to ensure secure access.

Response Structure:

  • Status Code: 200 OK on success, with other codes indicating various errors (e.g., 401 Unauthorized, 404 Not Found).

Headers

Request sample and Response

import requests

customer_id = "5ae2f659-45d2-4256-9f82-2811726a5376" //example customer ID
url = f"{{baseUrl}}/customer/{customer_id}"
headers = {
    "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9"
}

response = requests.delete(url, headers=headers)
print(response.text)

success response
{
  "message": "Customer successfully deleted"
}

Last updated