Class: module:api/StoresApi

module:api/StoresApi(apiClient)

new module:api/StoresApi(apiClient)

Constructs a new StoresApi.

Parameters:
Name Type Description
apiClient module:ApiClient

Optional API client implementation to use, default to module:ApiClient#instance if unspecified.

Source:

Methods

getStores(opts) → {Promise}

This resource retrieves a list of stores, for the given site, that are within a configured distance of a location on the earth. The stores and their distance from the specified location are returned as a result set of Store objects. The distance is interpreted either in miles or kilometers depending on the distance_unit input parameter. The location can be specified by either directly providing a latitude/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 will return an empty list of stores. If coordinates are passed, the values for country and postal code are ignored.

Parameters:
Name Type Description
opts Object

Optional parameters

Properties
Name Type Description
latitude Number

The geo coordinate latitude to search for stores (value range -90.00 .. 90.00).

longitude Number

The geo coordinate longitude to search for stores (value range -180.00 .. 180.00).

countryCode String

The two letter ISO country code e.g. \"US\".

postalCode String

The postal code e.g. \"01801\".

distanceUnit String

The distance unit. Supported values are \"mi\" and \"km\" (for miles and kilometers respectively, default is \"km\").

maxDistance Number

The area (radius) in distancUnit where stores will be searched for (default is half of the earth's perimeter).

start Number

The result set index to return the first instance for. Default value is 0.

count Number

The maximum number of instances per request. Default value is 25.

Source:
Returns:

a Promise, with data of type module:models/StoreResult

Type
Promise

getStoresByID(id) → {Promise}

To access a store, you construct a URL using the template shown below. This template requires you to specify a store id. In the response, the server returns a corresponding store document.

Parameters:
Name Type Description
id String

The id of the requested store.

Source:
Returns:

a Promise, with data of type module:models/Store

Type
Promise

getStoresByIDs(ids) → {Promise}

Parameters:
Name Type Description
ids Array.<String>
Source:
Returns:

a Promise, with data of type module:models/StoreResult

Type
Promise

getStoresByIDsWithHttpInfo(ids) → {Promise}

Parameters:
Name Type Description
ids Array.<String>
Source:
Returns:

a Promise, with an object containing data of type module:models/StoreResult and HTTP response

Type
Promise

getStoresByIDWithHttpInfo(id) → {Promise}

To access a store, you construct a URL using the template shown below. This template requires you to specify a store id. In the response, the server returns a corresponding store document.

Parameters:
Name Type Description
id String

The id of the requested store.

Source:
Returns:

a Promise, with an object containing data of type module:models/Store and HTTP response

Type
Promise

getStoresWithHttpInfo(opts) → {Promise}

This resource retrieves a list of stores, for the given site, that are within a configured distance of a location on the earth. The stores and their distance from the specified location are returned as a result set of Store objects. The distance is interpreted either in miles or kilometers depending on the distance_unit input parameter. The location can be specified by either directly providing a latitude/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 will return an empty list of stores. If coordinates are passed, the values for country and postal code are ignored.

Parameters:
Name Type Description
opts Object

Optional parameters

Properties
Name Type Description
latitude Number

The geo coordinate latitude to search for stores (value range -90.00 .. 90.00).

longitude Number

The geo coordinate longitude to search for stores (value range -180.00 .. 180.00).

countryCode String

The two letter ISO country code e.g. \&quot;US\&quot;.

postalCode String

The postal code e.g. \&quot;01801\&quot;.

distanceUnit String

The distance unit. Supported values are \&quot;mi\&quot; and \&quot;km\&quot; (for miles and kilometers respectively, default is \&quot;km\&quot;).

maxDistance Number

The area (radius) in distancUnit where stores will be searched for (default is half of the earth's perimeter).

start Number

The result set index to return the first instance for. Default value is 0.

count Number

The maximum number of instances per request. Default value is 25.

Source:
Returns:

a Promise, with an object containing data of type module:models/StoreResult and HTTP response

Type
Promise