set_cart_quantity
Set a cart line's quantity (the server cart is the checkout source of truth, so this updates it live). Requires the item_id from the cart contents and the new absolute quantity. A quantity of 0 removes the line. Returns the updated cart card.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cart_id | Yes | Cart ID | |
| item_id | Yes | Line item ID from the cart (cart.items[].item_id) | |
| site_id | Yes | Registered site ID | |
| quantity | Yes | New absolute quantity for the line (>= 0; 0 removes the line) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| items | Yes | ||
| total | Yes | ||
| cartId | Yes | ||
| siteId | Yes | ||
| subtotal | Yes | ||
| discounts | No |