Create a Cart
Create a Cart
POST
https://graph.whisk.com/v1/carts
You can provide both recipeIds
or items alongside a retailerId
for Whisk to generate a Cart.
Request Body
language
string
The language to use for the cart
retailerId
string
Retailer Id or name to generate a Cart for. available retailers Example: tesco, 9b032cd7ca5d11e7ae7e42010a9a0035
recipeIds
array
An array of strings representing ids of recipes. The cart will be generated based on recipe ingredients. The id can be represented by GraphID or recipe URL
items
array
An array of Shopping Cart Items to use for generating a Cart. It can be raw text or specific store item
labels
object
The flag which controls where Whisk should create a state for Cart on its side to manage later. Labels can be used later for filtering carts. Default: false
combineItems
boolean
Controls combining submitted items into single CartItem. 1 tbsp olive oil
and 30ml olive oil
can be combined with the single offered products from the retailer. Default: true
Sample Request
Combined Items
Whisk supports intelligent algorithm for combining similar items into one, to improve shopping list experience.
Items like 2 eggs
and 28g of eggs yolk
can be combined into one item 4 eggs
.
Automatic combination of items is enabled by default, you can pass combineItems = false
to disable it.
Supported Retailers
Not every retailer provides us with information about inventory, so for some retailers we can't match store items and create a cart. You still can check out items for these retailers, check landing url checkout section.
You can find if we support matching for a retailer and able to create a cart here in the retailer’s list in Store Inventory
column.
Body Parameters
ShoppingCartItem
ATTRIBUTE
TYPE
DESCRIPTION
storeItem
raw
StoreItemValue
ATTRIBUTE
TYPE
DESCRIPTION
sku*
string
item identifier in Retailer
quantity
integer
number of items to checkout Default value: 1
source
source for store product
RawItemValue
ATTRIBUTE
TYPE
DESCRIPTION
name*
string
raw item text. Example: 1 tbsp sugar
CartItemSource
ATTRIBUTE
TYPE
DESCRIPTION
name*
string
source item text
groupId
string
group identifier
Response
ATTRIBUTE
TYPE
DESCRIPTION
id*
string
unique cart identifier
retailer*
store details
items*
matched products
groups*
ingredients can be grouped by recipe or another arbitrary group
created*
long
time of cart creation; in Unix timestamp format (seconds)
expiresIn
long
The time when cart will be expired; in Unix timestamp format (seconds)
Retailer
ATTRIBUTE
TYPE
DESCRIPTION
id*
string
name*
string
displayName
string
country
string
currency
string
logo
ImageContainer
urls
CartItemResponse
ATTRIBUTE
TYPE
DESCRIPTION
id*
string
unique cart item identifier
sourceList*
list of original ingredients related to the current item
product
store item
combined
information about combined items, if items were combined by a similar product
analysis
object
Analysis for cart item (category, product canonical name)
Retailer Urls
ATTRIBUTE
TYPE
DESCRIPTION
signupUrl*
string
forgotPasswordUrl*
string
trolleyUrl*
string
CartProductOption
ATTRIBUTE
TYPE
DESCRIPTION
sku*
string
store item identifier
name*
string
store item name
quantity*
quantity of product items
price
price for the number of products
images*
array [ImageContainer]
url
string
link to the product page in the store
CartGroupResponse
ATTRIBUTE
TYPE
DESCRIPTION
id*
string
A unique cart group identifier
type*
enum
ingredients can be grouped by recipe or custom group Possible values: Recipe, Custom.
displayName*
string
group display name
recipe
RecipeDetails
recipe details
CartItemPrice
ATTRIBUTE
TYPE
DESCRIPTION
list*
double
list price
CartProductQuantity
ATTRIBUTE
TYPE
DESCRIPTION
count*
integer
number of items
CombinedProductsInfo
ATTRIBUTE
TYPE
DESCRIPTION
name*
string
name of combined items
Last updated