Alokai

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

NameRequiredTypeDescription
contextRequiredCommercetoolsIntegrationContext
paramsRequiredAddToMyShoppingListParams
customQueryOptionalCustomQuery

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);

On this page