addWishlistItems
Adds items to the wishlist.
It receives data from the addWishlistItems endpoint exposed by the BigCommerce API
Signature
declare function addWishlistItems(
context: BigcommerceIntegrationContext,
params: AddWishlistItemsParams
): Promise<WishlistResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | BigcommerceIntegrationContext | |
params | Required | AddWishlistItemsParams |
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
}
]
})