Skip to content

Delete All Wishlist Items ​

Remove every item from the authenticated customer's wishlist in a single request.

Endpoint ​

POST /api/shop/delete-all-wishlists

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 (201 Created) ​

FieldTypeDescription
messagestringAll wishlist items have been removed successfully.
deletedCountintegerHow many rows were removed. 0 when the wishlist was already empty.

Behaviour ​

  • Clears only the authenticated customer's rows, and only on the current channel — items saved on another channel survive.
  • Repeating the call is safe; the second one answers 201 with deletedCount: 0.
  • The message is the same whether rows were removed or not, so read deletedCount to know what happened.

Use Cases ​

  • "Clear wishlist" button — one call empties the list, and deletedCount tells the UI how many rows to drop without a re-fetch.
  • Reset after a bulk move to cart — Move to Cart removes rows one at a time; this clears whatever remains in a single request.

Best Practices ​

  • Confirm in the UI first — the call is irreversible and takes no ID, so a mis-tap wipes the whole list.
  • Read deletedCount, not message — the message reads the same on an empty wishlist.
  • Remember the channel scope — a multi-channel storefront needs one call per channel to clear everything.

Released under the MIT License.