rami_levy_add_item
Add a product to the shared Rami Levy cart using details from a prior product search, merging quantity if already present, and syncs the cart to the real account.
Instructions
Add a product to the shared cart. productId, name, and price all come from a prior rami_levy_search_products result — never guessed, and never re-fetched (there is no "get one product" endpoint). If this product is already in the cart, qty is ADDED to what's there, not overwritten. Syncs the whole cart to the real Rami Levy account immediately. Returns cartTotal (local estimate) and serverTotal (Rami Levy's own total — authoritative). ok:false with a transport reason means nothing changed. reason items_rejected means the server refused the listed products; they have been removed from the cart too, so tell the user and pick alternatives. If resetAfterOrder {orderId, createdAt} is present, an order was placed since the last sync, so the items from before it were treated as bought and cleared first; tell the user the cart started fresh after that order.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qty | No | ||
| name | Yes | ||
| price | Yes | ||
| productId | Yes |