Delete Compare Item
Remove a single product from the authenticated customer's comparison list.
Endpoint
DELETE /api/shop/compare_items/{id}Request Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
X-STOREFRONT-KEY | Yes | Your storefront API key |
Authorization | Yes | Customer Bearer token (Bearer <accessToken>) |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Compare item ID to delete |
Response
204 No Content with an empty body. There is no confirmation message — the status is the confirmation.
Behaviour
- Only the comparison row is removed; the product is untouched and can be added again immediately.
- A row belonging to another customer answers
404, exactly as an ID that does not exist. - Repeating the call on an already-deleted row answers
404.
Use Cases
- Remove one column from a comparison table — call with the row's
id, then drop that column locally; the empty body leaves nothing to re-render from. - Undo an accidental add — the
400returned by a duplicate Create means the row is already there, and this removes it.
Best Practices
- Address the row, not the product — the path takes the comparison row ID; there is no remove-by-product-ID endpoint here.
- Do not parse a body — a
204carries none. - Use Delete All to clear the set — one call beats a loop over the rows.
Related Resources
- Get Compare Items — the customer's comparison rows
- Delete All Compare Items — clear the whole comparison list

