Add Recipes To Cart

You can use this API to add new recipes in existing cart.

POST
/v1beta/:id/recipes

Combined Items

Automatic combination of items is enabled by default. All cart items will be recombined considering new item. Use combineItems = false to disable it.

More about combined items here.

Parameters

ATTRIBUTETYPEDESCRIPTION
id*string

unique cart id

recipeIdsstring

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

Id can be represented by GraphID or recipe url

combineItemsboolean

need to recombine cart items considering new ingredients

Sample Request

curl -X POST "https://graph.whisk.com/v1beta/:id/recipes" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Token Access-Token>" \ -d '{ "recipeIds": [ "9773cb7eca5d11e7ae7e42010a9a0035", "https://www.mccormick.com/recipes/breakfast-brunch/quick-and-easy-french-toast" ] }'

CartResponse

ATTRIBUTETYPEDESCRIPTION
id*string

unique cart identifier

retailer*Retailer

store details

items*array [CartItemResponse]

matched products

groups*array [CartGroupResponse]

ingredients can be grouped by recipe or another arbitrary group

created*long

time of cart creation; in unix timestamp format (seconds)

expiresInlong

time when cart will be expiered; in unix timestamp format (seconds)

CartItemResponse

ATTRIBUTETYPEDESCRIPTION
id*string

unique cart item identifier

sourceList*array [CartItemSource]

list of original ingredients related to current item

productCartProductOption

store item

combinedarray [CombinedProductsInfo]

information about combined items, if items was combined by similar product

analysisobject

Analysis for cart item (category, product canonical name)

CartProductOption

ATTRIBUTETYPEDESCRIPTION
sku*string

store item identifier

name*string

store item name

quantity*CartProductQuantity

quantity of product items

price CartItemPrice

price for the quantity of products

images*array [ImageContainer]
urlstring

link to product page in store

CartGroupResponse

ATTRIBUTETYPEDESCRIPTION
id*string

unique cart group identifier

type*enum

ingredients can be grouped by recipe or custom group

Possible values: Recipe, Custom.
displayName*string

group display name

recipeRecipeDetails

recipe details

CartItemPrice

ATTRIBUTETYPEDESCRIPTION
list*double

list price

CartItemSource

ATTRIBUTETYPEDESCRIPTION
name*string

source item text

groupIdstring

group identifier

CartProductQuantity

ATTRIBUTETYPEDESCRIPTION
count*integer

number of items

CombinedProductsInfo

ATTRIBUTETYPEDESCRIPTION
name*string

name of combined items

Sample Response

{ "id": "b35ababeefa0452ebd9bac430417254d", "retailer": { "id": "898003be304e49b084ac6224adc7ff53", "name": "Tesco", "displayName": "Tesco", "country": "GB", "currency": "GBP", "logo": { "url": "https://res.cloudinary.com/whisk/image/upload/whisk3/supermarket_select_dropdown/tesco-logo.png", "width": 134, "height": 36 }, "urls": { "signupUrl": "https://secure.tesco.com/account/en-GB/register", "forgotPasswordUrl": "https://secure.tesco.com/account/en-GB/forgotten-password", "trolleyUrl": "https://www.tesco.com/groceries/en-GB/slots" } }, "items": [ { "id": "28c47e7684704e73bce11b74300dc6b7", "sourceList": [ { "name": "1 egg", "groupId": "f4e354c79e984fe6bad72a9f8e0e0de9" }, { "name": "4 large eggs" }, { "name": "4 eggs", "groupId": "a0316893c5404d689fe91f9f2adbebc3" } ], "product": { "sku": "299626009", "name": "Tesco 15 Eggs", "quantity": { "count": 1 }, "price": { "list": 1.19 }, "images": [ { "url": "https://img.tesco.com/Groceries/pi/043/5057545736043/IDShot_540x540.jpg" } ], "url": "https://www.tesco.com/groceries/en-GB/products/299626009" }, "combined": { "name": "9 egg" } }, { "id": "34c0f890b49148d4b607dd6e3f51625a", "sourceList": [ { "name": "0.5 teaspoon mccormick cinnamon, ground", "groupId": "f4e354c79e984fe6bad72a9f8e0e0de9" } ], "product": { "sku": "254920403", "name": "Tesco Ground Cinnamon 40G", "quantity": { "count": 1 }, "price": { "list": 0.85 }, "images": [ { "url": "https://img.tesco.com/Groceries/pi/300/0000003011300/IDShot_540x540.jpg" } ], "url": "https://www.tesco.com/groceries/en-GB/products/254920403" } }, { "id": "7539e5c54cbb4cf7a1a274de8b629f35", "sourceList": [ { "name": "0.25 cup milk", "groupId": "f4e354c79e984fe6bad72a9f8e0e0de9" } ], "product": { "sku": "251314233", "name": "Tesco British Whole Milk 568Ml, 1 Pint", "quantity": { "count": 1 }, "price": { "list": 0.5 }, "images": [ { "url": "https://img.tesco.com/Groceries/pi/976/5031021057976/IDShot_540x540.jpg" } ], "url": "https://www.tesco.com/groceries/en-GB/products/251314233" } }, { "id": "77f99f0f39364a52be6f316d975aefbc", "sourceList": [ { "name": "handful basil leaves", "groupId": "a0316893c5404d689fe91f9f2adbebc3" } ], "product": { "sku": "292695686", "name": "Tesco Cut Basil 30G", "quantity": { "count": 3 }, "price": { "list": 0.7 }, "images": [ { "url": "https://img.tesco.com/Groceries/pi/698/0000003268698/IDShot_540x540.jpg" } ], "url": "https://www.tesco.com/groceries/en-GB/products/292695686" } }, { "id": "00d2d93271ae493fb4b6cbb51264b4fe", "sourceList": [ { "name": "wholemeal bread", "groupId": "a0316893c5404d689fe91f9f2adbebc3" } ], "product": { "sku": "251048818", "name": "Tesco Wholemeal Small Loaf 400G", "quantity": { "count": 1 }, "price": { "list": 0.75 }, "images": [ { "url": "https://img.tesco.com/Groceries/pi/000/0284050000000/IDShot_540x540.jpg" } ], "url": "https://www.tesco.com/groceries/en-GB/products/251048818" } }, { "id": "59a433b170af48549df409a2f5a87438", "sourceList": [ { "name": "400 g chopped tomatoes", "groupId": "a0316893c5404d689fe91f9f2adbebc3" } ], "product": { "sku": "282149836", "name": "Ktc Chopped Tomatoes 400G", "quantity": { "count": 1 }, "price": { "list": 0.3 }, "images": [ { "url": "https://img.tesco.com/Groceries/pi/108/5013635312108/IDShot_540x540.jpg" } ], "url": "https://www.tesco.com/groceries/en-GB/products/282149836" } }, { "id": "1859ff268fdb4262befc4b5ca4b28c62", "sourceList": [ { "name": "2 garlic cloves", "groupId": "a0316893c5404d689fe91f9f2adbebc3" } ], "product": { "sku": "263386065", "name": "Tesco Garlic Each", "quantity": { "count": 1 }, "price": { "list": 0.3 }, "images": [ { "url": "https://img.tesco.com/Groceries/pi/106/0000000001106/IDShot_540x540.jpg" } ], "url": "https://www.tesco.com/groceries/en-GB/products/263386065" } }, { "id": "dc0764d1a761434795f609d25f52ac4b", "sourceList": [ { "name": "4 slices bread", "groupId": "f4e354c79e984fe6bad72a9f8e0e0de9" } ], "product": { "sku": "272782291", "name": "Kingsmill Small 50/50 Bread 400G", "quantity": { "count": 1 }, "price": { "list": 0.75 }, "images": [ { "url": "https://img.tesco.com/Groceries/pi/541/5010092236541/IDShot_540x540.jpg" } ], "url": "https://www.tesco.com/groceries/en-GB/products/272782291" } }, { "id": "7512adb6426c409eb4cb27467b7093a9", "sourceList": [ { "name": "1 tbsp cider vinegar", "groupId": "a0316893c5404d689fe91f9f2adbebc3" } ], "product": { "sku": "297021296", "name": "Tesco Cider Vinegar 350Ml", "quantity": { "count": 1 }, "price": { "list": 0.8 }, "images": [ { "url": "https://img.tesco.com/Groceries/pi/386/5057373748386/IDShot_540x540.jpg" } ], "url": "https://www.tesco.com/groceries/en-GB/products/297021296" } }, { "id": "8eb78019d14a41bfa91ccea335402805", "sourceList": [ { "name": "1 yellow pepper", "groupId": "a0316893c5404d689fe91f9f2adbebc3" } ], "product": { "sku": "258905427", "name": "Tesco Yellow Peppers Each", "quantity": { "count": 1 }, "price": { "list": 0.55 }, "images": [ { "url": "https://img.tesco.com/Groceries/pi/000/0200310000000/IDShot_540x540.jpg" } ], "url": "https://www.tesco.com/groceries/en-GB/products/258905427" } }, { "id": "e29fe2a59ee248b4906e0b0daae869c6", "sourceList": [ { "name": "1 teaspoon mccormick pure vanilla extract", "groupId": "f4e354c79e984fe6bad72a9f8e0e0de9" } ], "product": { "sku": "289599551", "name": "Tesco Vanilla Extract 60Ml", "quantity": { "count": 1 }, "price": { "list": 1.3 }, "images": [ { "url": "https://img.tesco.com/Groceries/pi/619/5054269713619/IDShot_540x540.jpg" } ], "url": "https://www.tesco.com/groceries/en-GB/products/289599551" } }, { "id": "0a33e8d087ce4de4a188e2f504a087ea", "sourceList": [ { "name": "2 tsp rapeseed oil", "groupId": "a0316893c5404d689fe91f9f2adbebc3" } ], "product": { "sku": "281921684", "name": "Tesco Organic Rapeseed Oil 500Ml", "quantity": { "count": 1 }, "price": { "list": 1.5 }, "images": [ { "url": "https://img.tesco.com/Groceries/pi/749/0000003243749/IDShot_540x540.jpg" } ], "url": "https://www.tesco.com/groceries/en-GB/products/281921684" } } ], "groups": [ { "id": "a0316893c5404d689fe91f9f2adbebc3", "type": "Recipe", "displayName": "Omelette pancakes with tomato & pepper sauce", "recipe": { "id": "9773cb7eca5d11e7ae7e42010a9a0035", "name": "Omelette pancakes with tomato & pepper sauce", "description": "Healthy, low-calorie and gluten-free - these herby egg 'pancakes' will become your go-to favourite for a quick midweek meal", "ingredients": [ { "text": "4 large eggs" }, { "text": "handful basil leaves" }, { "text": "2 tsp rapeseed oil, plus a little extra for the pancakes" }, { "text": "1 yellow pepper, quartered, deseeded and thinly sliced" }, { "text": "2 garlic cloves, thinly sliced" }, { "text": "1 tbsp cider vinegar" }, { "text": "400g can chopped tomatoes" }, { "text": "wholemeal bread or salad leaves, to serve" } ], "images": [ { "url": "https://www.bbcgoodfood.com/sites/default/files/styles/recipe/public/recipe_images/omelette-pancakes-with-tomato-pepper-sauce.jpg", "responsive": { "url": "https://whisk-res.cloudinary.com/image/upload/v1523012138/recipe/758058656142eaae402f1781e18c527c.jpg", "width": 500, "height": 454 } } ], "videos": [], "source": { "name": "bbcgoodfood.com", "displayName": "BBC Good Food", "sourceRecipeUrl": "https://www.bbcgoodfood.com/recipes/omelette-pancakes-tomato-pepper-sauce", "license": "Fairuse", "image": { "url": "http://whisk-res.cloudinary.com/image/upload/v1527610208/publishers/logos/bbcgoodfood-logo.png", "responsive": { "url": "http://whisk-res.cloudinary.com/image/upload/v1527610208/publishers/logos/bbcgoodfood-logo.png", "width": 256, "height": 256 } } }, "numberOfServings": 2 } }, { "id": "f4e354c79e984fe6bad72a9f8e0e0de9", "type": "Recipe", "displayName": "Quick and Easy French Toast", "recipe": { "id": "99f1fb4eca5d11e7ae7e42010a9a0035", "name": "Quick and Easy French Toast", "description": "Vanilla extract and cinnamon bring a richness of flavor to French toast. Pick your favorite bread - white, Italian, French or whole wheat. Serve with Maple-Flavored Syrup.", "ingredients": [ { "text": "1 egg" }, { "text": "1 teaspoon McCormick® Pure Vanilla Extract" }, { "text": "1/2 teaspoon McCormick® Cinnamon, Ground" }, { "text": "1/4 cup milk" }, { "text": "4 slices bread" } ], "images": [ { "url": "https://d1doqjmisr497k.cloudfront.net/-/media/mccormick-us/recipes/mccormick/q/800/quick-and-easy-french-toast.ashx", "responsive": { "url": "https://whisk-res.cloudinary.com/image/upload/v1523011995/recipe/950cff424cebe33f8bb6c3264caabdbc.jpg", "width": 800, "height": 800 } } ], "videos": [], "source": { "name": "mccormick.com", "displayName": "McCormick", "sourceRecipeUrl": "https://www.mccormick.com/recipes/breakfast-brunch/quick-and-easy-french-toast", "license": "Fairuse" }, "numberOfServings": 4 } } ], "created": 1532503799, "expiresIn": 1533108599, "labels": { "myId": "some value" } }