Create a Shopping List

Both Server Token and User Access Token are allowed to be used in this endpoint. In the case of Server Token, a list will not be linked to any user and it will be only possible to access it by id.

post

https://api.whisk.com/list/v2
Create Shopping List. Requires shopping_list:write scope
Request
Response
Request
Body Parameters
body
required
string
Response
200: OK
{
"list": {
"id": "string",
"name": "string",
"primary": true
},
"content": {
"items": [
{
"id": "string",
"item": {
"name": "string",
"brand": "string",
"comment": "string",
"quantity": 0,
"unit": "string"
},
"checked": true,
"image_url": "string",
"analysis": {
"product": {
"canonical_name": "string",
"original_name": "string"
},
"category": {
"canonical_name": "string"
},
"brand": {
"canonical_name": "string"
}
},
"recipe": {
"recipe_id": "string",
"position": 0
},
"combined": {
"combined_item_id": "string",
"quantity": 0
},
"created_time": "string",
"updated_at": "string"
}
],
"combined_items": [
{
"id": "string",
"item": {
"name": "string",
"brand": "string",
"comment": "string",
"quantity": 0,
"unit": "string"
},
"checked": true,
"image_url": "string",
"analysis": {
"product": {
"canonical_name": "string",
"original_name": "string"
},
"category": {
"canonical_name": "string"
},
"brand": {
"canonical_name": "string"
}
},
"created_time": "string",
"updated_at": "string"
}
],
"recipes": [
{
"id": "string",
"name": "string",
"images": [
{
"responsive": {
"url": "string",
"width": 0,
"height": 0
},
"url": "string"
}
],
"source": {
"name": "string",
"display_name": "string",
"source_recipe_url": "string",
"image": {
"responsive": {
"url": "string",
"width": 0,
"height": 0
},
"url": "string"
},
"license": "LICENCE_INVALID"
}
}
]
}
}
401: Unauthorized
{
"code": "auth.tokenRequired"
}

Parameters

{
"name": "string",
"primary": true,
"items": [
{
"normalized": {
"name": "string",
"brand": "string",
"comment": "string",
"quantity": 0,
"unit": "string"
},
"raw": {
"text": "string"
}
}
],
"recipes": [
{
"recipe_id": "string",
"scale": {
"scale": 0
},
"ingredients": {
"ids": [
"string"
]
}
}
],
"language": "string"
}

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

{
"list": {
"id": "string",
"name": "string",
"primary": true
},
"content": {
"items": [
...
],
"combined_items": [
...
],
"recipes": [
...
]
}
}

List

"list": {
"id": "string",
"name": "string",
"primary": true
},

Items

"items": [
{
"id": "string",
"item": {
"name": "string",
"brand": "string",
"comment": "string",
"quantity": 0,
"unit": "string"
},
"checked": true,
"image_url": "string",
"analysis": {
"product": {
"canonical_name": "string",
"original_name": "string"
},
"category": {
"canonical_name": "string"
},
"brand": {
"canonical_name": "string"
}
},
"recipe": {
"recipe_id": "string",
"position": 0
},
"combined": {
"combined_item_id": "string",
"quantity": 0
},
"created_time": "string",
"updated_at": "string"
}
],

Combined Items

"combined_items": [
{
"id": "string",
"item": {
"name": "string",
"brand": "string",
"comment": "string",
"quantity": 0,
"unit": "string"
},
"checked": true,
"image_url": "string",
"analysis": {
"product": {
"canonical_name": "string",
"original_name": "string"
},
"category": {
"canonical_name": "string"
},
"brand": {
"canonical_name": "string"
}
},
"created_time": "string",
"updated_at": "string"
}
],

Recipes

"recipes": [
{
"id": "string",
"name": "string",
"images": [
{
"responsive": {
"url": "string",
"width": 0,
"height": 0
},
"url": "string"
}
],
"source": {
"name": "string",
"display_name": "string",
"source_recipe_url": "string",
"image": {
"responsive": {
"url": "string",
"width": 0,
"height": 0
},
"url": "string"
},
"license": "LICENCE_INVALID"
}
}
]

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

SLItemAnalysis

ATTRIBUTE

TYPE

DESCRIPTION

canonicalName

string

Unique normalized product name

category

ProductCategory

ProductCategory

ATTRIBUTE

TYPE

DESCRIPTION

name*

string

Request (adding raw items)

curl -X POST "https://graph.whisk.com/v1/lists" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <User-Access-Token>" \
-d '{
"name": "My Shopping List",
"rawItems": [
"200g pack smoked salmon",
"2 slices sharp cheddar cheese",
"1 tbsp salt and olive oil to serve"
]
}'

Request (adding items)

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

Request (adding recipes)

curl -X POST "https://graph.whisk.com/v1/lists" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <User-Access-Token>" \
-d '{
"name": "My Shopping List",
"recipes": [
{
"id": "https://www.bbcgoodfood.com/recipes/omelette-pancakes-tomato-pepper-sauce",
"scale": 0.5
},
{
"id": "9773cb7eca5d11e7ae7e42010a9a0035"
}
]
}'