Skip to main content
DELETE
/
products
/
{id}
curl -X DELETE https://api.example.com/products/123 \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "message": "Product removed successfully"
}
Delete a product from the system.

Authentication

This endpoint requires authentication with the admin role.

Path Parameters

id
integer
required
The unique identifier of the product to delete

Response

message
string
Confirmation message indicating successful deletion
curl -X DELETE https://api.example.com/products/123 \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "message": "Product removed successfully"
}

Errors

statusCode
integer
HTTP status code
message
array
Array of error messages
{
  "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.

Build docs developers (and LLMs) love