Add an item to the cart (auto-resolve options)
add_itemAdd a menu item to the efood basket by describing its options in plain language. Resolves names to codes, auto-fills required choices, computes price, and rejects out-of-stock items.
Instructions
Add a menu item to the shop's server-side basket by naming its options in plain language — no raw codes or price math. Give item_code and an options list (names as they appear in the menu, or codes), e.g. ["traditional pita","tomato","tzatziki"]. It resolves each name to a code, auto-fills required choices (bread; all-vs-choose), computes the price, rejects out-of-stock items, and appends the line to the basket (visible in the efood app). Pass lang matching the language of your option names (default EFOOD_LANG). Unknown names return the option catalog so you can retry. dry_run previews the resolved line without saving.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Menu language for resolving names, e.g. "en" or "el". | |
| comment | No | Special instructions for this item. | |
| dry_run | No | Resolve and price only; do not modify the basket. | |
| options | No | Option selections by name (menu language) or code. Required tiers auto-fill if omitted. | |
| quantity | No | Quantity (default 1). | |
| item_code | Yes | The item `code` from the menu (e.g. "IT_000000000083"). | |
| restaurant_id | Yes | Restaurant/shop id the item belongs to. |