getAddresses

Retrieve customer, supplier, or company addresses.

Important: if you operate in the European Union, the General Data Protection Regulation (GDPR) requires all processing done with customers' personal information to be logged. If you retrieve customer addresses, you are responsible for logging everything you do with the data. If it is not possible to keep the logs in the system that processes the data, you may consider writing the log entries into Erply, with the logProcessingOfCustomerData call.

Input parameters

Parameter name Description Possible value Required
addressIDs Retrieve multiple addresses, IDs separated by commas. Eg. "1,2,3,4,5". String
ownerID Customer ID, supplier ID, or your own company's ID. See getCustomers and getSuppliers. (Customer and supplier IDs do not overlap.) Deprecated alternative name: clientID Integer yes
typeID Address type ID. See getAddressTypes. Integer
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
addedSince Retrieve only items that have been created since the specified timestamp. Usually, you will want to use "changedSince" instead — see below. Integer
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)
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
orderBy 'addressID'
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
addressID Integer
ownerID Integer Customer's or supplier's unique ID (deprecated alternative name: clientID)
typeID Integer Address type ID, see getAddressTypes.
typeName String (255) Address type.
typeActivelyUsed 0 or 1 Some address types are "archival types" -- addresses in these groups are not used for invoicing. This parameter indicates whether the type of this address is an archival type or not.
street String (65536) Street address (or more generally, address line 1).
address2 String (65536) Street address, line 2. This field is exposed via Erply user interface only for US, CA and MX accounts!
city String (255) City, region, or county.
postalCode String (16) Postal code or ZIP code.(deprecated alternative name: postcode)
state String (255) State. This field is exposed via Erply user interface only for US, CA and MX accounts!
country String (255)
added Integer
lastModified Integer
lastModifierUsername String Employee's username
lastModifierEmployeeID Integer ID of the employee
attributes Array Additional attributes. Each item looks like this:

Field nameTypeDescription
attributeNameStringAttribute name
attributeTypeStringAttribute type
attributeValueStringAttribute value