Delete Product
Products
Delete Product
Delete a product from the catalog
DELETE
Delete Product
Endpoint
Authentication
Admin access required. Only users with theADMIN role can delete products.
Path Parameters
number
required
The unique identifier of the product to delete
Request Headers
Response
boolean
Indicates if the product was deleted successfully
Example Request
Example Response
Error Responses
Invalid Product ID
Unauthorized
Product Has Dependencies
Server Error
Notes
- This operation implements soft delete - the product is marked with a
deletedAttimestamp rather than being permanently removed - Soft-deleted products are excluded from product listings by default
- Products that are referenced in existing orders cannot be permanently deleted to maintain data integrity
- Consider setting stock to 0 and removing from featured status before deletion
- Related cart items and favorites may be affected by product deletion
Related Endpoints
- List Products - View all products
- Create Product - Add a new product
- Update Product - Modify product details