A TanStack Query query hook with data from the Shopper Search productSearch
endpoint.
apiOptions - Options to pass through to commerce-sdk-isomorphic
, with null
accepted for unset API parameters.
queryOptions - TanStack Query query options, with enabled
by default set to check that all required API parameters have been set.
commerce-sdk-isomorphic
documentation for more information on the parameters and returned data type.useQuery
reference for more information about the return value.
This resource retrieves a list of stores for the given site that are within a configured distance of a geolocation.
The distance is interpreted either in miles or kilometers, depending on the distanceUnit input parameter. The location is specified either by directly providing a latitude and longitude coordinate pair, or by providing a country and a postal code. If a postal code is passed, the resource looks in the system's geolocation mappings to find the coordinates for this postal code. If no matching geolocation is found, the resource returns an empty list of stores. If coordinates are passed, the values for country and postal code are ignored.