Alokai

createWishlist

Method to create a wishlist

This method sends a POST request to the createWishlist endpoint of the Vue Storefront API Middleware. In turn, it receives data from the createWishlist endpoint exposed by the BigCommerce API

Signature

declare function createWishlist$1(
	props: CreateWishlistProps,
	options?: MethodOptions
): Promise<WishlistResponse>;

Parameters

NameRequiredTypeDescription
propsRequiredCreateWishlistPropsParameter object which can be used with this method. Refer to its type definition to learn about possible properties.
optionsOptionalMethodOptions

Returns

Returns a response with the Wishlist object.

Referenced Types

Examples

Creating a new wishlist.

import { sdk } from '~/sdk.config.ts';

const createWishlistResponse = await sdk.bigcommerce.createWishlist({
  {
    "name": "My very own Wishlist!",
    "is_public": true,
    "items": []
  }
});

On this page