Shopping List Mobile API

This functionality provides a simple way to integrate Whisk’s add-to-basket functionality into your mobile application, allowing you to send items and recipes to an online grocery basket.

Using this API you can generate URLs (we call these "transfer URLs") which pass your content to the Whisk basket experience. In your application you add a button, such as “Order ingredients”, which opens this URL in a web browser. This allows the user to choose a retailer, select store products, and send everything to their online basket.

Note: To use this service you will need access the Whisk Graph API. This requires registering an application on the Whisk Platform, which you can do by sending an email to [email protected]. See Graph API documentation about authentication for more information.

Getting started

Take a look at the Examples or view the Reference page for all available parameters.

There are three ways to add items with transfer URLs:

  • rawItems - full string containing quantity, unit, and product. “E.g. 250g cheddar cheese”
  • items - structured item data with separate fields for quantity, unit, product.
  • recipes - recipes are identified by URL or unique Whisk ID.

The endpoint is:

POST
https://graph.whisk.com/v1/lists/transfers

When you send items Whisk automatically matches them to appropriate store items at all available retailers. Whisk’s matching algorithm uses various factors including: available store items, quantity, brand, attributes, and price.

Here is a basic example sending items and recipes:

curl "https://graph.whisk.com/v1/lists/transfers" \ -H "Authorization: Token <Access-Token>" \ -H "Content-Type: application/json" \ -d '{ "items": [ { "name": "skimmed milk", "quantity": 2, "unit": "l" }, { "name": "coffee" }, { "name": "sugar", "quantity": "5", "unit": "tbsp" } ], "rawItems": [ "2l skimmed milk", "coffee", "5 tbsp sugar" ], "recipes": [ { "id": "https://whisk.com/demo/calzone-roasted-peppers", "scale": 1 } ] }'

Response

The response will contain a url which should be opened in the user’s mobile web browser - not inside WebViews. This opens the Whisk basket experience and allows users to select their store, choose store items, and send items to their basket.

{"landingUrl": "https://graph.whisk.com/v1/lists/transfers/9e107d15377f484eb7c343f93028b936/landing"}
Note: Generated urls are valid for 14 days and are then expired.