Add Items To Cart
Add Items to Cart
POST
https://graph.whisk.com/v1/:id/items
Add new items to an existing cart.
Path Parameters
Name | Type | Description |
---|---|---|
id | string | Unique cart identifier |
Request Body
Name | Type | Description |
---|---|---|
items | array | An array of |
combineItemts | boolean | Whether to combine the new items into the existing ones. Default value: |
Sample Request
Combined Items
An automatic combination of items is enabled by default. All cart items will be recombined considering the new items. Use combineItems = false
to disable it.
More about combined items here.
Parameters
ATTRIBUTE | TYPE | DESCRIPTION |
id* | string | unique cart id |
items | array [ShoppingCartItem] | Raw text or specific SKU of a store item |
combineItems | boolean | need to recombine cart items considering new items |
ShoppingCartItem
ATTRIBUTE | TYPE | DESCRIPTION |
storeItem | StoreItemValue | |
raw | RawItemValue |
StoreItemValue
ATTRIBUTE | TYPE | DESCRIPTION |
sku* | string | item identifier in Retailer |
quantity | integer | number of items to checkout Default value: |
source | CartItemSource | source for store product |
RawItemValue
ATTRIBUTE | TYPE | DESCRIPTION |
name* | string | raw item text. Example: |
Response
ATTRIBUTE | TYPE | DESCRIPTION |
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) |
expiresIn | long | The time when cart will be expired; in Unix timestamp format (seconds) |
CartItemResponse
ATTRIBUTE | TYPE | DESCRIPTION |
id* | string | unique cart item identifier |
sourceList* | array [CartItemSource] | list of original ingredients related to the current item |
product | CartProductOption | store item |
combined | array [CombinedProductsInfo] | information about combined items, if items were combined by a similar product |
analysis | object | Analysis for cart item (category, product canonical name) |
CartProductOption
ATTRIBUTE | TYPE | DESCRIPTION |
sku* | string | store item identifier |
name* | string | store item name |
quantity* | CartProductQuantity | quantity of product items |
price | CartItemPrice | 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 | The unique cart group identifier |
type* | enum | ingredients can be grouped by recipe or custom group Possible values: |
displayName* | string | group display name |
recipe | RecipeDetails | recipe details |
CartItemPrice
ATTRIBUTE | TYPE | DESCRIPTION |
list* | double | list price |
CartItemSource
ATTRIBUTE | TYPE | DESCRIPTION |
name* | string | source item text |
groupId | string | group identifier |
CartProductQuantity
ATTRIBUTE | TYPE | DESCRIPTION |
count* | integer | number of items |
CombinedProductsInfo
ATTRIBUTE | TYPE | DESCRIPTION |
name* | string | name of combined items |
Last updated