Skip to content

Get Wishlist Items ​

Retrieve the authenticated customer's wishlist items for the current channel.

Endpoint ​

GET /api/shop/wishlists

Request Headers ​

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

Query Parameters ​

ParameterRequiredDefaultDescription
sortNoidColumn to sort by — id or created_at. The compound form created_at-desc (<column>-<direction>) is also accepted.
orderNoascSort direction — asc or desc. Use desc to return the most recently added items first.

By default the wishlist is returned oldest-first (the order items were added). To show the newest item at the top, pass ?sort=created_at&order=desc (or the shorthand ?sort=created_at-desc).

Response ​

A bare JSON array of wishlist rows. Each row identifies its product, customer, and channel by path reference, not as a nested object — fetch the product separately to render a card.

FieldTypeDescription
idintegerWishlist row ID. Use it on Delete and Move to Cart.
productstringPath of the saved product, e.g. /api/shop/products/126. The trailing segment is the product ID.
customerstringPath of the owning customer.
channelstringPath of the channel the item was saved on.
createdAt / updatedAtstringISO 8601 timestamps.

Pagination is reported in headers, not in the body: X-Total-Count, X-Page, X-Per-Page, X-Total-Pages.

Over GraphQL the same rows expose product, customer, and channel as nested objects that can be selected in one query — see Get Wishlist.

Use Cases ​

  • Wishlist page — read the array, take the numeric ID from the end of each product path, and fetch those products to render names, prices, and images.
  • "Saved" badge count — read X-Total-Count from the headers instead of counting the array, which only holds the current page.
  • Newest-first view — ?sort=created_at&order=desc puts the latest save on top, which matches the "just added" confirmation a heart button produces.

Best Practices ​

  • Do not expect product details inline — the row carries a path only; a page that renders products needs a second call per product, or the GraphQL query instead.
  • Read the count from the header — the body is one page, so array.length under-reports a long wishlist.
  • Remember the channel scope — the same customer sees a different wishlist per channel, so a missing item usually means a different channel, not a lost row.

Released under the MIT License.