Search

getPriceLists

Returns price lists and the contents of each price list.

Price lists may contain three types of “rules”: 1) fixed prices for specified products; 2) fixed prices for specified services; 3) percentage discounts for specified product groups. (A discount applies to all products in this group and its subgroups.)

There can be multiple price lists associated with location, customer, or customer group and the price lists interact with each other and override each other in various ways. To apply all applicable price lists and promotions to a sale, we recommend to use API call calculateShoppingCart. (As input, you need to send all the items on your receipt. API will return the same list, with final prices for each item added.)

Re–implementing all price list rules in your application would be a major undertaking, and we plan to constantly add new promotion features to ERPLY.

If you need to add products to a price list, then use the addProductToPriceList API call.
To edit products on the price list use the editProductInPriceList API call.
To delete a product from a price list, use the deleteProductInPriceList API call.
To get only the products on the price list, use the getProductsInPriceList API call.

Input parameters

Parameter nameDescriptionPossible valueRequired
pricelistIDRetrieve one specific price list.Integer
priceListIDsRetrieve specific price lists. Multiple price list IDs, separated by commas.String
getPricesWithVATSet to 1 to retrieve sales price (VAT included) that applies to specified sales location.0 or 1
warehouseIDInteger
pointOfSaleIDInteger
startDateFromRetrieve price lists for which the starting date is on or after the specified date (or for which no starting date has been set).ISO date (yyyy-mm-dd)
startDateToRetrieve price lists for which the starting date is on or before the specified date (or for which no starting date has been set).ISO date (yyyy-mm-dd)
endDateFromRetrieve price lists for which the end date is on or after the specified date (or for which no end date has been set).ISO date (yyyy-mm-dd)
endDateToRetrieve price lists for which the end date is on or before the specified date (or for which no end date has been set).ISO date (yyyy-mm-dd)
types

Filter price lists by type. A comma-separated list of price list types, possible types are 'BASE_PRICE_LIST', 'STORE_PRICE_LIST'.

Type filter can be used only if the "Price list types" module has been enabled on your account; otherwise error 1006 will be returned. Contact customer support to enable that feature.

An invalid type will return error 1016.

String
getHeadersOnlySet to 1 to retrieve only price list headers, but not the contents of each price list.

This may be useful if you only need to enumerate the available price lists (fetch IDs and names), but not the items and prices in each list.
0 or 1
searchAttributeNameSearch from attribute name.searchAttributeName and searchAttributeValue have to be specified bothString
searchAttributeValueSearch from attribute valueString
changedSinceGet price lists that have been modified since the specified timestamp. Useful for synchronizing data. Price lists will be returned with their full contents.Integer (Unix timestamp)
recordsOnPageNumber of records API should return. By default 20, at most 100.Integer
pageNoAPI 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
langRetrieve 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

Response

Field nameTypeDescription
pricelistIDInteger
nameString
startDateValid From dateeg. 2010-01-29
endDateValid Until dateeg. 2010-01-29
activeInteger0 or 1
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.

addedSince
changedSince
pricelistRulesArrayEach array item looks as follows:

type - PRODUCT, PRODGROUP, or SERVICE
discountPercent - discount % for product's groups
price - discounted sales price for products
id - ID of the product/product's group.
ruleID - ID of the rule. (However, these IDs are not unique and may repeat. Usage not recommended.)
amount - available only if Quantity discounts module is enabled on your account. Quantity threshold from which the special price will apply to this product.
attributesArrayAdditional attributes. Each item looks like this:

Field nameTypeDescription
attributeNameStringAttribute name
attributeTypeStringAttribute type
attributeValueStringAttribute value