curl --request DELETE \
--url https://api.example.com/api/products/:id{
"success": true
}Delete a product from the catalog
curl --request DELETE \
--url https://api.example.com/api/products/:id{
"success": true
}DELETE /api/products/:id
ADMIN role can delete products.
Authorization: Bearer <access_token>
curl -X DELETE "https://api.pcfix.com/api/products/42" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
{
"success": true
}
{
"success": false,
"error": "Product not found"
}
{
"success": false,
"error": "Unauthorized - Admin access required"
}
{
"success": false,
"error": "Cannot delete product with existing orders or cart items"
}
{
"success": false,
"error": "Error message description"
}
deletedAt timestamp rather than being permanently removed