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
| Name | Required | Type | Description |
|---|---|---|---|
props | Required | CreateWishlistProps | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
options | Optional | MethodOptions |
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": []
}
});