DELETE /api/products/:id
Permanently deletes a product from the system. This action cannot be undone.Authentication
Required. Must include a valid JWT token in the Authorization header.Authorization
Admin role required.Request Headers
Path Parameters
The unique identifier of the product to delete
Response
Success message confirming the deletion
Example Request
Example Response
Error Responses
404 - Not Found
401 - Unauthorized
403 - Forbidden
500 - Internal Server Error
Notes
- This endpoint performs a hard delete using
findByIdAndDelete - Consider implementing soft deletes by setting
isActive: falseinstead for better data retention - Any orders or references to this product may be affected by deletion