Preview order
get_order_previewShow a full order preview before checkout, including re-priced lines, promo or bundle discount, shipping, saved address, and grand total; use it to confirm details before preparing the order.
Instructions
Show the full order before checkout: re-priced lines, promo or bundle discount (they don't stack — the better one applies), shipping, the address from set_shipping_address, and the grand total in the order currency (local for some destinations, e.g. UZS for Uzbekistan). Call it once the address is set and show the result to the human for confirmation before prepare_order. Read-only and safe to repeat; prices come from the live catalog, not from the cart. ready_to_prepare stays false while the address is missing or a line is unavailable — fix what issues lists (update_cart_item, set_shipping_address) first. An empty cart returns an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| error | No | Present when the cart is empty. | |
| items | No | Re-priced order lines. | |
| total | No | ||
| bundle | No | Bundle price applied instead of the promo code, if any. | |
| issues | No | Lines that became unavailable, if any. | |
| currency | No | ||
| discount | No | ||
| shipping | No | ||
| subtotal | No | ||
| promo_code | No | ||
| ready_to_prepare | No | True when an address is set and all lines are orderable. | |
| shipping_address | No | Address set via set_shipping_address (null if not set). |