Add to cart
add_to_cartAdd products by SKU and quantity to a guest cart, then receive the updated cart with line items and totals. Per-item issues are returned as user_errors without failing the entire request.
Instructions
Add one or more products (by SKU and quantity) to a guest cart. Returns the updated cart with line items and totals. Per-item problems (out of stock, unknown SKU, configurable products needing options) are reported in user_errors rather than failing the whole call.
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>",
"items": "<items>"
},
"name": "add_to_cart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | One or more products to add to the cart. | |
| cart_id | Yes | The guest cart id returned by create_guest_cart. |