Skip to content

Delete All Compare Items

Remove every product from the authenticated customer's comparison list in a single request.

Endpoint

POST /api/shop/delete-all-compare-items

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
X-STOREFRONT-KEYYesYour storefront API key
AuthorizationYesCustomer Bearer token (Bearer <accessToken>)

Request Body

No fields are required. Send an empty JSON object:

json
{}

Response Fields (200 OK)

FieldTypeDescription
messagestringConfirmation message
deletedCountintegerNumber of compare items removed

Use Cases

  • "Clear comparison" action on the compare page
  • Reset a customer's comparison list in one call

Notes

  • Only the authenticated customer's items are removed.
  • Returns deletedCount: 0 when the comparison list is already empty.

Released under the MIT License.