Add to Cart
add_to_cartFull Description
Add one or more products to the shopping cart by their EAN. Accepts a list of {gtin, quantity} objects — works for a single item or a batch. Handles bulk additions in one request instead of calling the tool repeatedly. IMPORTANT: EANs MUST come from search_products, search_multiple_products, or get_substitutions results. When a request lists specific EANs (e.g. after the customer replaced items with substitutes in the list widget), add EXACTLY those EANs — never swap them back to the original search results, and never fabricate or guess an EAN. IMPORTANT: ALWAYS ask the user for explicit confirmation before adding products to their cart. Never add to cart without user consent. After execution, a cart summary widget automatically displays ALL items in the cart with quantities, prices, total, and a link to the Carrefour cart. EXCEPTION: when this tool was invoked by the app (the customer pressed 'Add to cart' in the product widget) instead of by you, that call renders NO widget. In that case the products are ALREADY in the cart: call get_cart with the provided cart_id to display the cart summary, and never re-run add_to_cart. Do not display cart links in text — the widget handles it. A new cart is created automatically on the first call. Reuse the returned cart_id for subsequent calls. Prerequisites: search_products (to obtain EANs).
Parameters (2 required, 3 optional)
facility_service_idstringThe facility_service_id from the selected store.
productsarrayA list of products to add to the cart (max 100).
cart_idstringThe cart_id from a previous add_to_cart call. Omit on the first call to auto-create a new cart.
service_typestringThe pickup mode set by set_pickup_mode (DRIVE for store pickup, LAD for home delivery). Pass the value returned by set_pickup_mode or auto_select_delivery_location.
DRIVELADstore_namestringThe name of the selected store (from set_store response).