addToMyShoppingList
Add a single product to the Shopping List.
By default, it uses the addToMyShoppingListDefaultQuery GraphQL query
Signature
declare function addToMyShoppingList(
context: CommercetoolsIntegrationContext,
params: AddToMyShoppingListParams,
customQuery?: CustomQuery
): Promise<AddToMyShoppingListResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | CommercetoolsIntegrationContext | |
params | Required | AddToMyShoppingListParams | |
customQuery | Optional | CustomQuery |
Referenced Types
Examples
Adding a product to the Shopping List:
const MY_SHOPPING_LIST_PARAMS = {
product: { sku: 'test-sku' },
id: 'test-id',
version: 'test-version'
};
const { wishlist } = await sdk.commerce.addToMyShoppingList(MY_SHOPPING_LIST_PARAMS);