Skip to main content

📥 Retrieving a Wishlist

This guide explains how to retrieve wishlists and optionally include their items in the response.


✅ Plugin Config to include Wishlisted Items

To automatically include wishlist items in the response when retrieving or listing wishlists, your plugin must be configured with:

{
resolve: "@alphabite/medusa-wishlist",
options: {
includeWishlistItems: true,
includeWishlistItemsTake: 5 // optional, default value is 5
}
}

includeWishlistItemsTake option is optional, by default if includeWishlistItems is set to true, it will return up to 5 items, if you want more or less add the includeWishlistItemsTake option and set the desired amount


📘 Behavior

When includeWishlistItems is set to true:

Where N is the value of includeWishlistItemsTake (default: 5)


🔍 Retrieve a Single Wishlist

const retrievedWishlist = await sdk.alphabite.wishlist.retrieve({
id: "wl_...",
});
API Reference

Learn more about our Medusa SDK Wrapper Alphabite Medusa SDK Wrapper 🔗

You can view the full endpoint documentation for Retrieve a Wishlist


🔍 List Wishlists

const retrievedWishlist = await sdk.alphabite.wishlist.list({});
API Reference

Learn more about our Medusa SDK Wrapper Alphabite Medusa SDK Wrapper 🔗

You can view the full endpoint documentation for Retrieve a Wishlist


📝 Notes

  • If includeWishlistItems is not enabled, the items field will not be included at all
  • This behavior affects both single retrieval and list endpoints
  • To get the full list of items beyond the includeWishlistItemsTake limit, call: