Update cart line
cart_updateChange a cart line by its index (from view_cart): set qty (0 removes), or switch size/fabric. Args: index, qty?, size?, fabric?.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qty | No | New quantity; 0 removes the line. | |
| size | No | New size for this line (must be available for the product). | |
| index | Yes | Zero-based cart line index from view_cart. | |
| fabric | No | New fabric for this line (must be available for the product). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present instead of a cart when the call failed (bad index, unavailable size, ...). | |
| items | No | Cart lines in index order — this index is what set_cart_quantity/cart_update/cart_remove take. | |
| currency | No | ||
| subtotal | No | Sum of price x qty over all lines, USD. | |
| checkout_url | No | Cart page URL for the human. |