Shopping List Mobile API Examples

This functionality allows you to send items and recipes to a basket, below are some common use cases.

Sending items to basket

You can send one or more items using rawItems or items.

curl "https://graph.whisk.com/v1/lists/transfers" \ -H "Authorization: Token <Access-Token>" \ -H "Content-Type: application/json" \ -d '{ "language": "en", "rawItems": [ "250ml milk", "50g dark chocolate ", "10 marshmellows" ], "items": [ { "name": "milk", "quantity": 250, "unit": "ml" }, { "name": "dark chocolate", "quantity": 50, "unit": "g" }, { "name": "marshmellows", "quantity": 10 } ] }'

Sending recipes to basket

You can send one or more recipes to the basket.

You can use scale to adjust quantities of all ingredients within a recipe. For example, if a recipe is for 4 servings by default, you can use scale:2 to set quantities to 8 servings or use scale:0.5 for 2 servings.

curl "https://graph.whisk.com/v1/lists/transfers" \ -H "Authorization: Token <Access-Token>" \ -H "Content-Type: application/json" \ -d '{ "recipes": [ { "id": "https://whisk.com/demo/calzone-roasted-peppers", "scale": 1 }, { "id": "https://whisk.com/demo/sponsored-ingredient", "scale": 2 } ] }'
Note: To make your recipes shoppable they must be understood by Whisk, to check how we’ve parsed your recipe go to the recipe validator.

Setting additional parameters

You can customize the experience using additional parameters when sending items. For example, you can set the country and zipcode to show stores relevant to the users region. See the Reference page for the full list.

If you don’t submit additional parameters Whisk will attempt to detect language and location automatically.

curl "https://graph.whisk.com/v1/lists/transfers" \ -H "Authorization: Token <Access-Token>" \ -H "Content-Type: application/json" \ -d '{ "language": "de", "country": "DE", "zipcode": "80333", "items": [ { "name": "Äpfel", "quantity": 5 }, { "name": "Bananen", "quantity": 5 }, { "name": "Orangen", "quantity": 5 } ] }'
Note: Although Whisk performs automatic language detection we recommended you submit language explicitely so that Whisk can apply the correct NLP (to analyize your content and match it to store items).