Add to cart
foran_cart_addAdd a product to a customer's cart from one grocery or restaurant store, including quantity, variants, or food options, so an order can be built before checkout.
Instructions
Add a product to the customer's cart. All items in one order must come from the same store. If the product has options, pass them (see foran_product_details).
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": {
"session_key": "<session_key>",
"item_id": "<item_id>"
},
"name": "foran_cart_add"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module | No | mart = groceries and daily needs; bites = restaurant food. | mart |
| item_id | Yes | ||
| options | No | Food options, e.g. [{group:'Size', choice:'Large'}]. | |
| variant | No | Grocery variant name, if the product has variants. | |
| quantity | No | ||
| session_key | Yes | The session_key returned by foran_login. |