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 name Description Possible value Required
pricelistID Retrieve one specific price list. integer
priceListIDs Retrieve specific price lists. Multiple price list IDs, separated by commas. Will return 1030 error if array is provided. string
name Retrieve by name that starts with the provided value. string
getPricesWithVAT Set to 1 to retrieve sales price (VAT included) that applies to specified sales location. 0 or 1
warehouseID integer
pointOfSaleID integer
startDateFrom Retrieve 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)
startDateTo Retrieve 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)
endDateFrom Retrieve 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)
endDateTo Retrieve 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)
active Get either inactive or active price lists only. Integer (0 or 1)
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
getHeadersOnly Set 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
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
changedSince Get 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)
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 retrieve the next recordsOnPage items, send a new request with pageNo incremented by one. By default, API returns "page 1". integer
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

Response

Field name Type Description
pricelistID integer
name string
startDate string Valid From date, eg. 2010-01-29
endDate string Valid Until date, eg. 2010-01-29
active integer 0 or 1
type string

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.

added integer Unix timestamp. Creation time.
addedByUserName string
lastModified integer Unix timestamp. Last modification time.
lastModifiedByUserName string
pricelistRules array Each 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.
attributes array Additional attributes. Each item looks like this:

Field nameTypeDescription
attributeNameStringAttribute name
attributeTypeStringAttribute type
attributeValueStringAttribute value