Cart
edit_cartChange or read the order's cart. ops: add (increase), set (exact quantity) or remove, per product id; no ops reads the cart. Quantities count packages: one package holds pricing.package.pieces pieces (100 pieces of a 6-piece package is 17 packages); search with quantity {pieces} gives for_quantity ready. Stock limits a quantity and clamped lines say so; tier prices and discounts apply by themselves. The answer carries minimum (the minimum order amount and whether it is reached), lines[].hints (overbox and staffel savings), also (products often bought together) and, for a line short of stock, lines[].replacements with ready actions. Offer one when it helps the shopper, ask before changing their order, and put hint (overbox, break, also or replace) on the op they accepted. The cart is frozen while a payment is open (cancel_payment stops it) and after the order is placed. Needs the order reference from start_order (Authorization: Bearer mo1_… or the ref argument). Send a fresh op_id (16 to 40 letters, digits, - or _) with each change: a repeat with the same op_id within 10 minutes answers the first result and never changes the order twice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ops | No | Changes in order; leave out to read the cart | |
| ref | No | Order reference (mo1_…) from start_order, only when the client cannot send it as Authorization: Bearer | |
| op_id | No | A fresh id per change (16 to 40 letters, digits, - or _); repeating it within 10 minutes answers the first result without changing the order again |