getStoreRegions

Get a list of store regions.

Store regions can be used for grouping stores (locations, warehouses). The main feature of store regions is that price lists can also be applied to a region, not just individual stores, thereby simplifying price list management. A region can also have an unlimited number of price lists, unlike a location, which is limited to 5 price lists. Region can also contain customer group-specific price lists.

To edit a store region or add a new one, see saveStoreRegion. To delete a store region, see deleteStoreRegion. To manipulate with the price lists associated with a region, see API calls addStoreRegionPriceList, editStoreRegionPriceList and removeStoreRegionPriceList.

To manipulate with the price lists associated with region and customer group, see API calls addStoreRegionCustomerGroupPriceList, editStoreRegionCustomerGroupPriceList and removeStoreRegionCustomerGroupPriceList.

To see which regions a price list has been associated with, see the API call getStoreRegionsAssociatedWithPriceList.

This API call is available only if "Store regions" module has been enabled on your account.

Input parameters

Parameter name Description Possible value Required
getPriceLists Set to 1 if you want API to return a list of each region's price lists. Integer (0 or 1)
getCustomerGroupPriceLists Set to 1 if you want API to return a list of each region's customer group-specific price lists. Integer (0 or 1)
lang Retrieve item names in a specific language. If omitted, API will return item names in the default language of your Erply account.
Possible values:
  • 'eng' - English
  • 'spa' - Spanish
  • 'ger' - German
  • 'swe' - Swedish
  • 'fin' - Finnish
  • 'rus' - Russian
  • 'est' - Estonian
  • 'lat' - Latvian
  • 'lit' - Lithuanian
  • 'gre' - Greek
String
searchAttributeName Name of attribute to search from. Both "searchAttributeName" and "searchAttributeValue" have to be specified. Error 1030 will be returned if value is an array. String
searchAttributeValue Attribute value to search for. Error 1030 will be returned if value is an array. String
recordsOnPage Number of records API should return. By default 20, at most 100. Integer
pageNo API returns at most recordsOnPage items at a time. To retrive the next recordsOnPage items, send a new request with pageNo incremented by one. By default, API returns "page 1". Integer

Response

Field name Type Description
storeRegionID Integer ID of the store region.
code String Region code.
name String Region name.
priceLists Array

Price lists associated with the region.

To retrieve each region's price lists, specify input parameter getPriceLists = 1. These are not returned by default.

Each price list record looks like this:

Field nameTypeDescription
priceListIDIntegerPrice list ID
positionNumberIntegerNumber of position, related to order how price lists will be applied
nameStringPrice list name
startDateISO date (yyyy-mm-dd)From date
endDateISO date (yyyy-mm-dd)Until date
activeInteger
typeString

Price list type, possible types are 'BASE_PRICE_LIST', 'STORE_PRICE_LIST'.

This field is returned only if the "Price list types" module has been enabled on your account. Contact customer support to enable that feature.

customerGroupPriceLists Array List of region customer group related price lists. To retrieve this data specify getCustomerGroupPriceLists = 1. Contains blocks with integer 'customerGroupID' and 'priceLists' with same formatting as described above.
added Unix timestamp Creation time.
lastModified Unix timestamp Last modification time.
attributes Array Additional attributes. Each item looks like this:

Field nameTypeDescription
attributeNameStringAttribute name
attributeTypeStringAttribute type
attributeValueStringAttribute value

This API call returns error code 1006 if "Store regions" module has not been enabled on your account.