update_cart_item
Change an item that is already in the shopping cart.
Use this tool to change the quantity, the variant, or the modifier options of one cart item. A cart must exist and must have items.
Steps
Call the 'add_item_to_cart' tool to put an item in the cart.
Call this tool to change the item.
Call the 'create_checkout_url' tool to get a checkout URL.
Rules
Send 'line_item_id' to select the cart item to change. Send 'quantity' and 'productEntityId' in 'item'. If the product has variants, send 'variantEntityId'.
Modifier options
'item.selectedOptions' works as it works in the 'add_item_to_cart' tool. The 'get_product_details' tool returns these options in 'modifierOptions'.
If the product has required modifier options, send them again in this request. If you do not send them, the server does not change the item. Send only the buckets that you need.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | Yes | ||
| line_item_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cart | Yes | ||
| message | No | ||
| success | Yes |