Skip to main content
DELETE
Delete Product

Endpoint

Authentication

Admin access required. Only users with the ADMIN 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 deletedAt timestamp 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