Add items to a Shopping List

POST
/v1beta/:id/items

Parameters

ATTRIBUTETYPEDESCRIPTION
namestring

Shopping List name

languagestring

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

recipesarray [ShoppingListRecipePayload]

references to recipes to add to a shopping list

rawItemsarray [string]

Ids of recipes. Cart will be generated basing on recipe ingredients.

Id can be represented by GraphID or recipe url

itemsarray [ShoppingListItemPayload]

list of normalised items to add

ShoppingListRecipePayload

ATTRIBUTETYPEDESCRIPTION
id*string

GraphId or URL of a Recipe

scaleinteger

Number of recipe servings

ShoppingListItemPayload

ATTRIBUTETYPEDESCRIPTION
quantitydouble

Item quantity

unitstring

Item unit (e.g. gram, ml)

name*string

Item name (e.g. potato)

commentstring

Request

curl -X POST "https://graph.whisk.com/v1beta/lists/0415a504f28c4e2c9535a1f56f98b41c/items" \ -H "Accept: 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" } ] }'

Response

ATTRIBUTETYPEDESCRIPTION
id*string
name*string
primaryboolean
createdTime*datetime

The time the Shopping List was created.

updatedTime*datetime
itemsarray [ShoppingListItemElement]

ShoppingListItemElement

ATTRIBUTETYPEDESCRIPTION
quantitydouble

Item quantity

unitstring

Item unit (e.g. gram, ml)

name*string

Item name (e.g. potato)

commentstring
brandstring
analysisobject
recipestring
recipeOrderinginteger
createdTimedatetime
combinedarray

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": { "id": "e9df2867-63b7-48f8-aede-c3acab6f597c", "canonicalName": "MEATS AND SEAFOOD" } }, "recipe": "9773cb7eca5d11e7ae7e42010a9a0035", "recipeOrdering": 0 }, { "id": "bb47bf7b-060d-49f0-9091-bada6b695019", "quantity": 4, "name": "eggs", "comment": "large", "analysis": { "canonicalName": "EGG", "category": { "id": "38f0d9f7-d19d-407d-bfc3-17258c57d954", "canonicalName": "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" } ] }