Resolve product query to nearby store availability
Accepts a natural-language product query plus a geographic anchor and optional filtering constraints (certifications, allergens, substances, price, nutrients) and returns ranked product matches with real-time nearby store availability.
Ranking is a blend of semantic similarity to query, proximity to location.latitude/location.longitude (within radius_km), and constraint compliance. Each result carries a list of StoreAvailabilityOut rows sorted closest-first.
Constraints in the payload are merged with the authenticated user’s saved preferences (explicit payload wins on conflict); a missing constraints key means use the user’s preferences as-is.
Empty results return 200 with results: [] — the endpoint does not 404 when nothing matches.
Authorizations
Body
Input for the product resolution endpoint.
Encapsulates a free-form shopper question, a geographic anchor, and optional constraints. The agent API combines these with the authenticated user's saved preferences (explicit payload wins on conflict) to produce ranked product matches with nearby store availability.
Natural-language product query as the shopper would phrase it (e.g. 'organic almond milk', 'gluten-free pasta sauce'). The resolver runs hybrid semantic + lexical search; brand and category hints in the query are used for ranking.
1 - 500Shopper's geographic anchor for proximity ranking. Stores within radius_km of this point are considered for availability.
Optional product-filter constraints. Merged with the authenticated user's saved preferences (explicit payload wins on conflict). Null means use the user's preferences as-is.
Search radius in kilometers from location. Stores beyond this distance are excluded from availability. Capped at 100 km.
x <= 100Maximum number of distinct product results to return. Each product may carry multiple StoreAvailabilityOut entries — this bound is on the product count, not the per-store availability list.
1 <= x <= 25Response
OK
Response from the POST /resolve endpoint.
Top-level container holds the ranked product matches; the ranking is
a blend of semantic similarity to query, proximity to
location, and constraint compliance.
Matched products with their nearby store availability, ranked best-match first. Empty list when nothing matches the query and constraints; the endpoint does not 404 on no-match.