Skip to main content

search_addresses

Lists the consenting user’s gateway-saved delivery addresses (saved_addresses) and, when a keyword is given, returns POI candidate addresses (suggestions). When lat/lng are passed, each saved address is annotated with distance_meters and the closest one’s ID is surfaced at the top level as nearest_address_id.
Position in the order flow: the address_id (a saved address) or suggestions[].token (a POI candidate) returned here feeds the next step, select_address, which returns the canonical address_id used by preview_order and create_order.

Parameters

All fields except consent_grant_id are optional. POI suggestions are returned only when both a keyword and a scope signal (a lat+lng pair, or a resolvable city) are present; otherwise suggestions is an empty array and only saved_addresses is returned.

Returns

Always sanity-check the chosen address’s distance_meters before using nearest_address_id: if even the nearest is far away (e.g. tens of km — all saved addresses are in another city), do not auto-pick; ask the user or search a new address by keyword instead.

Error Codes

See Error Handling for the full list.

Call Example