Whisk Docs
Whisk HomeHelp CenterDeveloper Tools
v2.0.0
v2.0.0
  • The Whisk Platform
  • Whisk API Overview
    • Introduction
    • Integration
    • Authentication
      • Server Token
      • User Access Token
        • Auth Flow Example
      • Client Token
      • Anonymous Access from Client Apps
    • Whisk Sandbox
    • Getting Started
  • Whisk API Reference 2.0
    • Provisioning
      • Get provisioning
    • Autocomplete
    • Community
      • Get your Communities
      • Get Communities from a Topic
      • Discover Recommended Communities
      • Search Communities
      • Get a Community
      • Get Recipes from a Community
      • Add Recipes to a Community
      • Remove a Recipe from a Community
      • Join a Community
      • Leave a Community
    • Posts and Reviews
      • Get reviews for a recipe
      • Create or edit review
      • Create a Post
      • Get Post by id
      • Delete a Post
      • Edit a Post
      • Report a Post
      • Create a Post Reply
      • Get Post Replies
      • Delete a Post reply
      • Report a Post reply
      • Like a Post or Reply
      • Users who liked a Post or Reply
    • Public profiles
      • Hide recipe in Public profile
      • Get Recipes for Public Profile
      • Get User's public profile by user_id
      • Get User's public profile by username
    • Custom Label
    • Feed
      • Obtain a Recipe Feed
    • Food DB
      • Autocomplete
      • Search
      • Get Food
    • Food List
    • Food Log
    • Foodpairing
    • Healthy meal recommendations
      • Healthy recipe only recommendations for DA
      • Recipe recommendations for SH
      • Tailored Plan API request for Samsung TV
    • Meal Plan
      • Generate a Meal Plan
      • Meal Object
        • Get Meals
        • Delete Meal
        • Add a Meal
      • Meal Plan Settings Object
        • Get Meal Plan Settings
        • Update Meal Plan Settings
      • Meal Plan Batch
    • Recipe
      • Get a Recipe
      • Search a Recipe
      • User Recipes & Collections
        • Add User Recipe
        • Create A Recipe
        • Update External Recipe
        • Get All User Recipes
        • Update User Recipe
        • Remove Recipe from Favorites
        • Create Collection
        • Get All User Collections
        • Get Collection
        • Get Recipes from a Collection
        • Remove Collection
        • Get Smart Collection
        • Get Recipes from a Smart Collection
    • Shopping List
      • Get your Shopping Lists
      • Get a Shopping List
      • Create a Shopping List
      • Delete a Shopping List
      • Update basic details of a Shopping List
      • Move Items between Shopping Lists
      • Add Items to a Shopping List
      • Delete an Item from a Shopping List
      • Update an Item in a Shopping List
      • Clear Items from a Shopping List
    • Media
    • Store Item
    • Unit Conversion
    • Users
      • Get a User
      • Update User Settings using Patch
      • Update User Settings using Post
    • Try it out!
  • Shopping List SDK
    • Overview
    • Examples
      • Shoppable Recipes
      • Shoppable Products
      • Shoppable Media
    • Basic Setup
      • Basic Setup
      • Methods
      • Event Listeners
      • Widget
      • Subscriptions
      • Global Configuration
      • UTM Parameters
      • Using With SPA
  • Shopping List Mobile API
    • Overview
    • Examples
    • Reference
  • API Resources
    • Authentication Scopes
    • Errors and Troubleshooting
    • Cursor Pagination
    • Limits
    • Nutrients
    • Recipe Labels
    • Filtering Recipes using Custom Labels
    • Health Score, Glycemic Index, Glycemic Load
    • Whisk User Data
    • Integrated Retailers
    • Optimizing Image Load
    • Meal Plan
Powered by GitBook
On this page
  • whisk.shoppingList.viewList
  • whisk.shoppingList.addProductsToList
  • whisk.shoppingList.addProductsToBasket
  • whisk.shoppingList.addRecipeToList
  • whisk.shoppingList.addRecipesToList
  • whisk.shoppingList.addRecipeToBasket
  • Common Parameters

Was this helpful?

  1. Shopping List SDK
  2. Basic Setup

Methods

PreviousBasic SetupNextEvent Listeners

Last updated 5 years ago

Was this helpful?

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.

Note: Basic methods do not send analytics, so you won't be able to get a . If you need tracking you can use . Also, you can use for implementing basic tracking on your side.

whisk.shoppingList.viewList

viewList method opens the shopping list.

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

whisk.shoppingList.addProductsToList

addProductsToListmethod 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'],
  });
});

ATTRIBUTE

TYPE

DESCRIPTION

products*

array [string]

List of products to add.

whisk.shoppingList.addProductsToBasket

addProductsToBasketmethod 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',
    },
  });
});

whisk.shoppingList.addRecipeToList

addRecipeToListmethod 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',
  });
});

ATTRIBUTE

TYPE

DESCRIPTION

recipeUrl*

string

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

scale

number

All ingredient quantities will be multiplied by this number

whisk.shoppingList.addRecipesToList

addRecipesToListmethod 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',
      { recipeUrl: 'https://whisk.com/demo/complementary-item-advert', scale: 2 },
    ],
  });
});

ATTRIBUTE

TYPE

DESCRIPTION

recipes*

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

RecipeSpec

ATTRIBUTE

TYPE

DESCRIPTION

recipeUrl*

string

Recipes URL. Recipe should be recognized by the recipe validator.

scale

number

All ingredient quantities will be multiplied by this number

whisk.shoppingList.addRecipeToBasket

addRecipeToBasketmethod allows you to add a recipe to an 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',
    },
  });
});

Common Parameters

ATTRIBUTE

TYPE

DESCRIPTION

language

enum

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

country

enum

Shopping list app country. Possible values: us, gb, de. Default value: automatically defined based on user location.

whiteLabel

string

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

trackingId

string

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

onlineCheckout

Object which configures shopping list app online checkout preferences.

styles

styles

Object which changes shopping list app appearance.

utm

Object with tracking params.

onlineCheckout object

ATTRIBUTE

TYPE

DESCRIPTION

enabled

boolean

Set it to false if you want to disable online checkout completely. Default value: true.

allowedRetailers

array [enum]

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

defaultRetailer

enum

Default retailer for the shopping list app. You can find list of available retailers here. Note: you can pass null to unset a default value for new users. Default value: is defined by Whisk API.

autoPick

string

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

utm object

ATTRIBUTE

TYPE

DESCRIPTION

campaign

string

Identifies a specific product promotion or strategic campaign.

source

string

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

medium

string

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

content

string

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

term

string

Identifies search terms.

Supported list of parameters is under the section.

addProductsToListmethod supports all , plus one extra required parameter:

addProductsToBasketmethod supports all parameters from the method.

addRecipeToList method supports all , plus one extra required parameter:

addRecipesToList method supports all plus one extra required parameter:

array [string | ]

addRecipeToBasket method supports all parameters from the method.

Common Parameters
Common Parameters
addProductsToList
Common Parameters
Common Parameters,
addRecipeToList
RecipeSpec
onlineCheckout
utm
event listeners
subscriptions
whisk.shoppingList.viewList
whisk.shoppingList.addProductsToList
whisk.shoppingList.addProductsToBasket
whisk.shoppingList.addRecipeToList
whisk.shoppingList.addRecipesToList
whisk.shoppingList.addRecipeToBasket
dashboard