Your purchases
What the customer has bought on Cru, one entry per order line for a wine, by the date of the order (traded_at), newest first unless direction is "asc". Each shows the quantity and the price paid per unit, in the order's currency, and its order number (reference), with the rest as the Cru app's My Purchases list shows it: order_status (as the site labels it), order_url (the order's page on Cru), invoice_number and invoice_url (its first invoice, null until it is invoiced) - both links open for the customer signed in to Cru - and units, one per bottle or case of it stored with Cru: cru_id, warehouse_ref (its reference at the warehouse), deliverable_warehouse_code (the Cru warehouse it is in - see list_warehouses), condition_status and status ("in_portfolio", "for_sale", "sold", "in_transit" or "delivered"); units is empty when none of it is stored with Cru. Prices are normal amounts in the market currency - 12345.5 is 12,345.50 - and every market states its currency.
Marked readOnlyHint, so an assistant may call it without asking the customer first.
Arguments
ALL OPTIONAL| ARGUMENT | DESCRIPTION |
|---|---|
| lwin18array<string> · LWIN18 · ≤ 20 | Only purchases of these wines, as 18-digit LWIN18 codes (wine, vintage and pack). Get them from search_wines. |
| statusarray<string> · one of in_portfolio, for_sale, sold, in_transit, delivered · ≤ 5 | Only purchases with a unit in any of these states - see units[].status. |
| sortstring · one of traded_at | What to order purchases by: traded_at, the date of the order. |
| directionstring · one of desc, asc | "desc" (newest first, the default) or "asc" (oldest first). |
| limitinteger · 1–50 | Purchases per page. Default: 10 |
| offsetinteger · 0–10000 | Purchases to skip, for the next page. Default: 0 |
Any other argument is refused with a tool error that lists what the tool accepts. Numbers may also be sent as strings, and booleans as "true" or 1.
Returns
STRUCTUREDCONTENTpurchases: lwin18, wine_name, vintage, pack_size, quantity, price, total, currency, reference (the order number), traded_at, order_status, order_url, invoice_number, invoice_url and units (cru_id, warehouse_ref, deliverable_warehouse_code, condition_status, status); pagination.
The same object also comes as JSON text in content, for hosts that read only that.
Errors
A refusal — a wine that is not on Cru, a price out of range — comes back as a result with isError: true and a message worded for the assistant to act on. A connection without trades:read is not offered this tool, and calling it anyway returns 403 with a JSON-RPC error naming the scope. Missing or invalid credentials return 401. Conventions every tool shares →