Swap Cart Item Product
Last updated
Was this helpful?
Last updated
Was this helpful?
You can use this API to change the matched products for cart items. It can be useful if the user wants to choose another item or item that was not matched.
Use this to get alternative product options for the current item. Or this to find an alternative by a string.
POST
https://graph.whisk.com/v1/:cart_id/items/:item_id/swap
cart_id
string
Unique cart identifier
item_id
string
Unique item identifier
newItem
object
The new product for the cart item - StoreItemValue object
ATTRIBUTE
TYPE
DESCRIPTION
sku*
string
item identifier in Retailer
quantity
integer
number of items to checkout Default value: 1
source
CartItemSource
source for store product
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)
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 product page in store
ATTRIBUTE
TYPE
DESCRIPTION
list*
double
list price
ATTRIBUTE
TYPE
DESCRIPTION
name*
string
source item text
groupId
string
group identifier
ATTRIBUTE
TYPE
DESCRIPTION
count*
integer
number of items
ATTRIBUTE
TYPE
DESCRIPTION
name*
string
name of combined items