Skip to main content
The sdk.wishlist namespace manages the authenticated customer’s wishlist. All methods require a Bearer token (set via sdk.setAuthToken()).

Methods

wishlist.get()

Retrieve the customer’s full wishlist.
Returns: { items: Product[]; count: number }

wishlist.addItem(productId)

Add a product to the wishlist.
Parameters: Returns: void

wishlist.removeItem(productId)

Remove a product from the wishlist.
Returns: void

wishlist.check(productId)

Check whether a specific product is in the customer’s wishlist.
Returns: { in_wishlist: boolean }

wishlist.clear()

Remove all items from the wishlist.
Returns: void

Example: Wishlist Toggle Button