Delete Category
2/7/25Less than 1 minute
Delete Category
Description
The Delete Category API allows users to delete a category the have selected or created from their list of categories.
- Authenticated Users: Must provide a valid JWT token.
- The
X-MerchantApiKey
header is mandatory for all requests.
Endpoint
PATCH /v1/tenant-categories/:categoryId
Required Headers
{
"Authorization": "Bearer JWT_TOKEN",
"X-MerchantApiKey": "MERCHANT_API_KEY",
"Content-Type": "application/json"
}
Example API Call (Fetch or Axios)
fetch('https://api.shopsynch.com/v1/tenant-categories/67b1eba52950d47e85cf54f4', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer JWT_TOKEN',
'X-MerchantApiKey': 'MERCHANT_API_KEY',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data));
📤 Sample 200 Response (Success)
{
"message": "Category deleted",
"status": true
}
📤 Sample 404 Response (Success)
{
"status": false,
"message": "Category now found"
}