Cheapest way to buy
cheapest_pathThe cheapest way to buy a product Trueprice tracks (same as POST /api/v1/prices/optimize): the exact steps (sale, each code, shipping, tax, rewards) with each step's amount, source_id (the code's deals id or the product URL), confidence and checked_at, then checkout_total = items − eligible discounts + shipping + tax (tax only with user.taxRate), effective_cost after rewards (null without one), codes rejected and why (not stackable, minimum not met, new customers only, expired), assumptions, and snapshot_id: the purchase_paths row that reproduces every number. Maths is deterministic code, never a model; ranking never follows commission. Pass a product URL, or domain + handle, or your own offers/coupons/rewards. path is null when nothing is buyable.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "cheapest_path"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Product page URL (a tracked Shopify store or any store page Trueprice tracks) | |
| user | No | ||
| domain | No | ||
| handle | No | ||
| offers | No | Your own offers: {store, url, price, checked_at, compare_at?, currency?, shipping?, available?, kind?, ref?} | |
| coupons | No | {code, store, kind: percent|fixed|ship_percent|ship_fixed, value, min_spend?, stackable?, new_customer_only?, expires_at?} | |
| rewards | No | {source, kind: percent|fixed, value, checked_at, store?, cap?, min_spend?} |