Methods

Basic shopping list methods will allow you to open or add products and recipes to the Whisk shopping list or open the Whisk add to basket screen.

whisk.shoppingList.viewList

viewList method opens the shopping list.

whisk.queue.push(function() { whisk.shoppingList.viewList({ styles: { type: 'modal', }, }); });

Supported list of parameters is under the Common Parameters section.

whisk.shoppingList.addProductsToList

addProductsToList method allows you to add products not bound to any recipe to a shopping list.

whisk.queue.push(function () { whisk.shoppingList.addProductsToList({ products: ['Almonds', 'Salt', 'Milk'], }); });

addProductsToList method supports all Common Parameters, plus one extra required parameter:

ATTRIBUTETYPEDESCRIPTION
products*array [string]

List of products to add.

whisk.shoppingList.addProductsToBasket

addProductsToBasket method allows you to add products to online checkout basket. Note: this does not add products to the shopping list.

whisk.queue.push(function() { whisk.shoppingList.addProductsToBasket({ products: ['Almonds', 'Salt', 'Milk'], onlineCheckout: { defaultRetailer: 'GB:Tesco', }, }); });

addProductsToBasket method supports all parameters from the addProductsToList method.

whisk.shoppingList.addRecipeToList

addRecipeToList method allows you to add a recipe to the shopping list.

whisk.queue.push(function() { whisk.shoppingList.addRecipeToList({ recipeUrl: 'https://whisk.com/demo/calzone-roasted-peppers', }); });

addRecipeToList method supports all Common Parameters, plus one extra required parameter:

ATTRIBUTETYPEDESCRIPTION
recipeUrl*string

Recipe URL to add. Recipe should be recognized by the recipe validator.

whisk.shoppingList.addRecipesToList

addRecipesToList method allows you to add multiple recipes to the shopping list.

whisk.queue.push(function() { whisk.shoppingList.addRecipesToList({ recipes: [ 'https://whisk.com/demo/sponsored-retailer', 'https://whisk.com/demo/sponsored-ingredient', ], }); });

addRecipesToList method supports all Common Parameters, plus one extra required parameter:

ATTRIBUTETYPEDESCRIPTION
recipes*array [string]

Recipes URLs to add. Recipes should be recognized by the recipe validator.

whisk.shoppingList.addRecipeToBasket

addRecipeToBasket method allows you to add a recipe to online checkout basket. Note: this does not add the recipe to the shopping list.

whisk.queue.push(function() { whisk.shoppingList.addRecipeToBasket({ recipeUrl: 'https://whisk.com/demo/calzone-roasted-peppers', onlineCheckout: { defaultRetailer: 'GB:Tesco', }, }); });

addRecipeToBasket method supports all parameters from the addRecipeToList method.

Common Parameters

ATTRIBUTETYPEDESCRIPTION
languageenum

Shopping list app language.

Possible values: en, de, fr.
Default value: automatically defined based on browser language.
whiteLabelstring

Shopping list app design customisations. This is a premium feature for our partners.

trackingIdstring

Unique identifier for your business (optional). This is a premium feature for our partners. Contact us to get one.

onlineCheckoutonlineCheckout

Object which configures shopping list app online checkout preferences.

stylesstyles

Object which changes shopping list app appearance.

utmutm

Object with tracking params.

onlineCheckout object
ATTRIBUTETYPEDESCRIPTION
enabledboolean

Set it to false if you want to disable online checkout completely.

Default value: true.
allowedRetailersarray [enum]

List of available retailers in the shopping list app. [] - is equal to enabled: false.

Default value: all available retailers.
defaultRetailerenum

Default retailer for the shopping list app. You can find list of available retailers here.

Default value: is defined by Whisk API.
autoPickstring

Set it to true to go straight to checkout in addRecipeToBasket and addProductsToBasket methods

styles object
ATTRIBUTETYPEDESCRIPTION
typeenum

Shopping list app view.

Possible values: modal, slideout.
Default value: modal.
utm object
ATTRIBUTETYPEDESCRIPTION
campaignstring

Identifies a specific product promotion or strategic campaign.

sourcestring

Identifies which site sent the traffic, and is a required parameter.

mediumstring

Identifies what type of link was used, such as cost per click or email.

contentstring

Identifies what specifically was clicked to bring the user to the site, such as a banner ad or a text link.

termstring

Identifies search terms.