Skip to main content
POST
Resolve product query to nearby store availability

Authorizations

X-API-Key
string
header
required

Body

application/json

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.

query
string
required

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.

Required string length: 1 - 500
location
LocationIn · object
required

Shopper's geographic anchor for proximity ranking. Stores within radius_km of this point are considered for availability.

Example:
constraints
ConstraintsIn · object | null

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.

Example:
radius_km
number
default:10

Search radius in kilometers from location. Stores beyond this distance are excluded from availability. Capped at 100 km.

Required range: x <= 100
limit
integer
default:5

Maximum 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.

Required range: 1 <= x <= 25

Response

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.

results
ResolveResultOut · object[]

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.