addWishlistItems
Adds items to the wishlist.
This method sends a POST request to the addWishlistItems endpoint of the Vue Storefront API Middleware. In turn, it receives data from the addWishlistItems endpoint exposed by the BigCommerce API
Signature
declare function addWishlistItems$1(
props: AddWishlistItemsParams,
options?: MethodOptions
): Promise<WishlistResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
props | Required | AddWishlistItemsParams | 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 of a a wishlist that contains information about the wishlist and its collection of items.
Referenced Types
Examples
Adding an item to the wishlist
import { sdk } from '~/sdk.config.ts';
const addWishlistItemsResponse = await sdk.bigcommerce.addWishlistItems({
wishlistId: '7c3ab631-782c-4747-8ccc-873e87de5152',
items: [
{
product_id: 112,
quantity: 1
}
]
})