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 by either 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 in Business Manager 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.
To verify site latitude and longitude information in Business Manager:
Navigate to Merchant Tools -> Online Marketing -> Stores.
Select the applicable site.
In the Address tab, verify that valid information is provided in the following fields: Address, City, Postal Code, State, and Country. For latitude and longitude values, you can manually enter values or provide all field values to auto-populate Latitude and Longitude. You must provide valid values for all of the previous fields for latitude and longitude to auto-populate Latitude and Longitude values.
If you would like to get a raw Response object use the other searchStores function.
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 by either 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 in Business Manager 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.
To verify site latitude and longitude information in Business Manager:
Navigate to Merchant Tools -> Online Marketing -> Stores.
Select the applicable site.
In the Address tab, verify that valid information is provided in the following fields: Address, City, Postal Code, State, and Country. For latitude and longitude values, you can manually enter values or provide all field values to auto-populate Latitude and Longitude. You must provide valid values for all of the previous fields for latitude and longitude to auto-populate Latitude and Longitude values.
Shopper Stores
Search for a specific store or stores in an area.
Example with shopper auth
API Version: 1.0.15import { Seller, ClientConfig, Customer, slasHelpers } from "commerce-sdk"; // or const { Seller, ClientConfig, Customer, slasHelpers } = require("commerce-sdk"); const clientConfig: ClientConfig = { parameters: { clientId: "XXXXXX", organizationId: "XXXX", shortCode: "XXX", siteId: "XX" } }; // must be registered in SLAS. On server, redirectURI is never called const redirectURI = "http://localhost:3000/callback"; const slasClient = new Customer.ShopperLogin(clientConfig); token = await slasHelpers.loginGuestUser(slasClient, { redirectURI }); clientConfig.headers['authorization'] = `Bearer ${token.access_token}`; const shopperStoresClient = new Seller.ShopperStores(clientConfig);
Last Updated: