Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
---
title: Wishlists
description: Manage wishlists and wishlist items with the Spree SDK
---
## Wishlists
```typescript
const options = { token: jwtToken };
// List wishlists
const { data: wishlists } = await client.wishlists.list({}, options);
// Get wishlist by ID
const wishlist = await client.wishlists.get('wl_xxx', {
expand: ['items'],
}, options);
// Create wishlist
const newWishlist = await client.wishlists.create({
name: 'Birthday Ideas',
is_private: true,
}, options);
// Update wishlist
await client.wishlists.update('wl_xxx', {
name: 'Updated Name',
}, options);
// Delete wishlist
await client.wishlists.delete('wl_xxx', options);
```
## Wishlist Items
```typescript
const options = { token: jwtToken };
// Add item to wishlist
await client.wishlists.items.create('wl_xxx', {
variant_id: 'var_123',
quantity: 1,
}, options);
// Update item quantity
await client.wishlists.items.update('wl_xxx', 'wi_xxx', {
quantity: 2,
}, options);
// Remove item from wishlist
await client.wishlists.items.delete('wl_xxx', 'wi_xxx', options);
```