Whisk Docs
Whisk HomeHelp CenterDeveloper Tools
v1.0.0
v1.0.0
  • Overview
  • Guides
    • Creating An Account
    • Getting Started
    • Whisk Sandbox
  • API
    • Authentication
      • Server Token
      • Client Token
      • User Access Token
      • Anonymous Access
    • Recipes
      • Get Recipe
      • Get Recipe Categories
      • Recipe Objects
    • Recipe Discovery
      • Recipe Feed
      • Recipe Search
      • Get Similar Recipes
    • Shopping Lists
      • Get Shopping Lists
      • Create A Shopping List
      • Add Items To A Shopping List
      • List Analysis
    • Meal Plans
      • Meal Plan Management
      • Delete Meals
      • Auto-Generator
      • Error Handling
    • Retailers
      • Get Available Stores
      • Retailers Checkout Flow
      • Retailer Aliases
      • OAuth Retailer Flow
      • Retailer User Info
      • Search Store Items
    • Carts
      • Create a Cart
      • Update Cart Item
      • Splitting Combined Items
      • Add Items To Cart
      • Add Recipes To Cart
      • Get Cart Item Options
      • Swap Cart Item Product
      • Delete A Cart Or A Cart Item
      • Checkout
    • Users
      • Get A User
      • Update A User
    • 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
    • Tools
      • Autocomplete
  • 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
  • Tips and Tricks
    • Object IDs
    • URL Lookup
    • Searching
    • Multiple IDs request
  • Resources
    • Nutrients
    • Recipe Labels
    • Health Score, Glycemic Index, Glycemic Load
    • Whisk User Data
    • Supported Retailers
    • Optimizing Image Load
Powered by GitBook
On this page
  • Parameters
  • ShoppingListRecipePayload
  • ShoppingListItemPayload
  • Response
  • ShoppingListItemElement
  • Request
  • Sample Response

Was this helpful?

  1. API
  2. Shopping Lists

Add Items To A Shopping List

POST

/v1/:id/items

Parameters

ATTRIBUTE

TYPE

DESCRIPTION

name

string

Shopping List name

language

string

Language can be provided explicitly which will impact analysis on shopping list items. Default: en

recipes

array [ShoppingListRecipePayload]

references to recipes to add to a shopping list

rawItems

array [string]

Ids of recipes. The cart will be generated based on recipe ingredients. The id can be represented by GraphID or recipe URL

items

array [ShoppingListItemPayload]

list of normalised items to add

ShoppingListRecipePayload

ATTRIBUTE

TYPE

DESCRIPTION

id*

string

GraphId or URL of a Recipe

scale

float

Multiplier for default amounts in recipe: 0.5, 2 ...

ShoppingListItemPayload

ATTRIBUTE

TYPE

DESCRIPTION

quantity

double

Item quantity

unit

string

Item unit (e.g. gram, ml)

name*

string

Item name (e.g. potato)

comment

string

Response

ATTRIBUTE

TYPE

DESCRIPTION

id*

string

name*

string

primary

boolean

createdTime*

datetime

The time the Shopping List was created.

updatedTime*

datetime

items

array [ShoppingListItemElement]

ShoppingListItemElement

ATTRIBUTE

TYPE

DESCRIPTION

quantity

double

Item quantity

unit

string

Item unit (e.g. gram, ml)

name*

string

Item name (e.g. potato)

comment

string

brand

string

analysis

SLItemAnalysis

recipe

string

recipeOrdering

integer

createdTime

datetime

combined

array

Request

curl -X POST "https://graph.whisk.com/v1/0415a504f28c4e2c9535a1f56f98b41c/items" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <User-Access-Token>" \
  -d '{
    "items": [
      {
        "quantity": 200,
        "unit": "g",
        "name": "smoked salmon"
      },
      {
        "quantity": 2,
        "unit": "slices",
        "name": "cheddar cheese",
        "comment": "extra mature"
      }
    ]
  }'

Sample Response

{
  "id": "ef610b5c0e294ef6a54931738d79f55d",
  "name": "My Shopping List",
  "primary": true,
  "createdTime": "2017-12-07T20:06:14+0000",
  "updatedTime": "2017-12-07T20:06:14+0000",
  "items": [
    {
      "id": "c484682c-66b7-4fa9-82b6-9ef34dec9fc7",
      "quantity": 200,
      "unit": "g",
      "name": "smoked salmon",
      "analysis": {
        "canonicalName": "SMOKED SALMON",
        "category": {
          "name": "MEATS AND SEAFOOD"
        }
      },
      "recipe": "9773cb7eca5d11e7ae7e42010a9a0035",
      "recipeOrdering": 0
    },
    {
      "id": "bb47bf7b-060d-49f0-9091-bada6b695019",
      "quantity": 4,
      "name": "eggs",
      "comment": "large",
      "analysis": {
        "canonicalName": "EGG",
        "category": {
          "name": "DAIRY AND EGGS"
        }
      },
      "recipe": "9773cb7eca5d11e7ae7e42010a9a0035",
      "recipeOrdering": 1
    }
  ],
  "recipes": [
    {
      "id": "9773cb7eca5d11e7ae7e42010a9a0035",
      "name": "Omelette pancakes with tomato & pepper sauce",
      "url": "https://www.bbcgoodfood.com/recipes/omelette-pancakes-tomato-pepper-sauce"
    }
  ]
}
PreviousCreate A Shopping ListNextList Analysis

Last updated 5 years ago

Was this helpful?