If you would like to get a raw Response object use the other getStores function.
An object containing the options for this method.
A promise of type StoreResult.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type StoreResult otherwise.
distanceUnit input parameter.To verify site latitude and longitude information in Business Manager:
If you would like to get a raw Response object use the other searchStores function.
An object containing the options for this method.
A promise of type Stores.
distanceUnit input parameter.To verify site latitude and longitude information in Business Manager:
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Stores otherwise.
Generated using TypeDoc
Shopper Stores
*Download API specification
API Overview
Use this API to access stores via search or ID lookup.
Authentication & Authorization
The Shopper Stores API requires a shopper access token from the Shopper Login and API Access Service (SLAS).
You must include
sfcc.shopper-storesand other relevant scope(s) in the client ID used to generate the SLAS token. For a full list of permissions, see Authorization Scopes Catalog.For details on how to request a shopper access token from SLAS, see the guest user flows for public clients and private clients in the SLAS guides.
Customization
Custom Properties
This API supports custom properties (prefixed with
c_). For details, see Custom Properties.Hooks
For details on working with hooks, see Extensibility with Hooks.
Request Details
URL Encoding
If resource identifiers in request parameters contain commas (
,) or percent signs (%), they must be URL encoded. For details, see Encode URL Special Characters.Response Details
Personalization
Responses from this API can be personalized using the Shopper Context API. By setting context attributes such as customer group, source code, or store ID, you can retrieve personalized promotions, pricing, and shipping methods. For details on how personalization interacts with caching, see Personalized Caching.
Caching
Caching is provided for the Shopper Stores API. For details, see Server-Side Web-Tier Caching.
Timeouts
Shopper API requests must respond within 10 seconds, including any hook execution. If a response exceeds this threshold, an HTTP 504 status code is returned. For details, see Timeouts and Limits.
Error Handling
Error responses follow the RFC 7807 problem detail format. To trace errors, include a
correlation-idheader in your request — the response returns it asx-correlation-id. For details, see HTTP Status Codes and Errors.Use Cases
Search Stores by Location
Find stores within a radius of a geographic coordinate.
curl "https://{shortCode}.api.commercecloud.salesforce.com/store/shopper-stores/v1/organizations/{organizationId}/store-search?latitude=37.7749&longitude=-122.4194&distanceUnit=mi&maxDistance=25&siteId=RefArch" \ -H "Authorization: Bearer {access_token}"Store Retrieval
Location-Based Search
Search Optimization
Related APIs
Simple example:
API Version: 0.0.33import { ShopperStores } from "commerce-sdk-isomorphic"; const clientConfig = { parameters: { clientId: "XXXXXX", organizationId: "XXXX", shortCode: "XXX", siteId: "XX" } }; const shopperStoresClient = new ShopperStores(clientConfig);Last Updated: