Update a cart
update_cartModify an open cart before checkout. op: 'add' appends items, 'remove' drops items by 0-based index, 'set' replaces the full item list, 'clear' empties the cart. Merges customer details (name, email, phone) via the customer field. Call get_cart afterwards to confirm. Cannot modify a cart that already has a checkout in progress.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cart_id": "<cart_id>"
},
"name": "update_cart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | No | add appends items; remove drops the items at the 0-based positions given in indices; set (the default) replaces the whole list with items; clear empties the cart | set |
| items | No | Blinds for op add or set, each with product_id, width_mm, height_mm, colour and mount_type. The server recalculates all prices | |
| cart_id | Yes | Id of the cart, as returned when the cart was created. Carts expire after 24 hours without changes | |
| indices | No | Item indices to remove (0-based) when op='remove' | |
| customer | No | Customer details: real name, email and South African mobile number, plus delivery address and city. Placeholder details are refused at checkout |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| cart_id | Yes | ||
| currency | Yes | ||
| customer | Yes | ||
| total_zar | Yes | ||
| created_at | Yes | ||
| expires_at | Yes | ||
| item_count | Yes | ||
| updated_at | Yes |