getSuppliers

Retrieve suppliers.

Suppliers can be associated with products (see getProducts) and purchase orders / purchase invoices (see getPurchaseDocuments).

Input parameters

Parameter name Description Possible value Required
supplierID Supplier ID. Integer
searchName Search from supplier name, e-mail or phone. String
searchPersonFullName Search from person full name. String
searchPersonFirstName Search from person first name. String
searchPersonLastName Search from person last name. String
searchVATNo Search from supplier VAT no. String
searchRegistryCode Search from supplier registry code. Exact matches only. 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
supplierManagerID Supplier manager. See getEmployees. Integer
groupID Supplier group ID. See getSupplierGroups. Integer
mode SUPPLIERS, CONTACTS or ALL.
By default ALL.

Erply makes a distiction between 1) companies who are suppliers in their own right, and 2) persons who are marked as contact persons of some other supplier. Option "SUPPLIERS" returns only the first ones, "CONTACTS" returns only the second ones and "ALL" returns both.
String
changedSince Retrieve only items that have been added or modified since the specified timestamp. Use it to keep a local database in sync with Erply. Integer (Unix timestamp)
orderBy 'supplierID', 'name', 'group' or 'lastChanged'. By default 'name'.
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 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
supplierID Integer Supplier ID
supplierType String COMPANY or PERSON.

  • For companies, the following attributes are set: fullName, companyName (both have the same value).
  • For persons, the following attributes are set: fullName, firstName, lastName. fullName is a combination of latter two: "lastName, firstName".

fullName can be used for displaying supplier's name wherever needed.

Guidelines for applications with a supplier edit form:
  • Companies should have one name field and the attribute that is edited should be companyName.
  • Persons should have separate fields for given name and surname (respective attributes: firstName, lastName).

Note: API call saveSupplier also has an input parameter "fullName" (when using that, system tries to interpret and split the name as required), but it should be used only when brokering data from some other system where a better data format is not available.
fullName String Full name of the supplier, use for displaying supplier name.
companyName String For companies only.
firstName String (Given name.) For persons only.
lastName String (Surname.) For persons only.
groupID Integer Supplier group ID
groupName String
phone String
mobile String
email String
fax String
code String National ID number (for persons) / Registry code (for companies).
integrationCode String Corresponding supplier identifier in a system integrated with Erply (eg. accounting software)
vatrateID Integer ID of a VAT rate
currencyCode String Currency code, e.g. "EUR"
deliveryTermsID Integer ID of delivery terms
countryID Integer ID of supplier's country
countryName String Supplier country
countryCode String Supplier country, as a two-letter country code (ISO 3166-1 alpha-2)
address String One of supplier's addresses. Only for concise displaying of supplier information. To manage addresses, use API calls getAddresses and saveAddress.
GLN String
attributes Array Additional attributes. Each item looks like this:

Field nameTypeDescription
attributeNameStringAttribute name
attributeTypeStringAttribute type
attributeValueStringAttribute value
**** **** To retrieve the following fields, set input parameter responseMode = "detail". These fields are not included in the output by default.
vatNumber String Supplier VAT number.
skype String
website String
bankName String Name of supplier's bank.
bankAccountNumber String Number of supplier's bank account.
bankIBAN String IBAN number of supplier's bank account.
bankSWIFT String BIC/SWIFT identifier of supplier's bank account.
birthday Date (yyyy-mm-dd) Person birthday
companyID Integer ID of company (if user is a contact person of a particular company)
parentCompanyName String
supplierManagerID Integer Supplier manager ID
supplierManagerName String
paymentDays Integer Default payment period.
notes String
lastModified Unix timestamp
added Unix timestamp
**** **** End of extra output fields