Home > @vsf-enterprise/sap-commerce-webservices-sdk > ProductsApi > getLocationProductStock
ProductsApi.getLocationProductStock() method
Returns a product's stock levels sorted by distance from the specified location, which is provided using the free-text "location" parameter, or by using the longitude and latitude parameters. The following two sets of parameters are available: location (required), currentPage (optional), pageSize (optional); or longitude (required), latitude (required), currentPage (optional), pageSize(optional). Get a product's stock level.
Signature:
getLocationProductStock(baseSiteId: string, productCode: string, currentPage?: number, fields?: string, latitude?: number, location?: string, longitude?: number, pageSize?: number, options?: any): Promise<import("axios").AxiosResponse<StoreFinderStockSearchPage>>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| baseSiteId | string | Base site identifier |
| productCode | string | Product identifier |
| currentPage | number | The current result page requested. |
| fields | string | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL |
| latitude | number | Latitude location parameter. |
| location | string | Free-text location |
| longitude | number | Longitude location parameter. |
| pageSize | number | The number of results returned per page. |
| options | any | Override http request option. |
Returns:
Promise<import("axios").AxiosResponse<StoreFinderStockSearchPage>>
Exceptions
{RequiredError} ProductsApi