getSupplierPriceLists

Retrieve supplier price lists and the contents of each price list.

Contact Erply Helpdesk to enable Supplier Price Lists module on your account. (If not enabled, API returns error 1006.) Entering your supplier price lists into Erply is useful when creating Purchase Orders, or when receiving supplies; Erply will automatically populate the Price field for each item.

The following API calls help manage supplier price lists and retrieve their contents:



To search for products across all supplier price lists, see the API call getProductsFromSupplierPriceLists.

Input parameters

Parameter name Description Possible value Required
supplierPriceListID Price List ID integer
supplierID Supplier ID integer
name Retrieve by name that starts with the provided value. string
supplierName Retrieve by supplier name that starts with the provided value. 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)
active Get either inactive or active price lists only. Integer (0 or 1)
orderBy 'name', 'startDate', 'endDate', 'added', 'lastModified'. By default 'supplierPriceListID'. string
orderByDir Sort direction: 'asc' (ascending order) or 'desc' (descending order). By default, items are sorted in ascending order. 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 retrieve 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
supplierPriceListID integer Price List ID.
supplierID integer Supplier ID.
supplierName string Supplier name.
name string Price list name
startDate ISO date (yyyy-mm-dd) Valid From date.
endDate ISO date (yyyy-mm-dd) Valid Until date.
active integer 0 or 1
added integer Unix timestamp. Creation time.
addedByUserName string
lastModified integer Unix timestamp. Last modification time.
lastModifiedByUserName string
pricelistRules array This list contains the products and their prices. Each array item looks as follows:

Field nameTypeDescription
productIDIntegerID of the product.</td
priceDecimalList price.</td
amountIntegerIf you have Quantity Discounts module enabled, this is the minimum ordering quantity at which the specified price applies. Therefore, one product may have multiple prices in the price list, for example: one price for quantity 100 and up (amount = 100); another price for quantity 25...99 (amount = 25); and a default price (amount = 0).

Contact Erply Helpdesk if you need Quantity Discounts module to be enabled on your account.
attributes array Additional attributes. Each item looks like this:

Field nameTypeDescription
attributeNameStringAttribute name
attributeTypeStringAttribute type
attributeValueStringAttribute value