Delete a product from the system.
Authentication
This endpoint requires authentication with the admin role.
Path Parameters
The unique identifier of the product to delete
Response
Confirmation message indicating successful deletion
curl -X DELETE https://api.example.com/products/123 \
-H "Authorization: Bearer YOUR_TOKEN"
{
"message": "Product removed successfully"
}
{
"statusCode": 404,
"message": ["Product not found"]
}
Important Notes
This action is irreversible. Once a product is deleted, it cannot be recovered.
Make sure to remove any references to this product from orders or other entities before deletion to maintain data integrity.