getEmployees

Retrieve list of employees.

To create an employee, or update employee information, see API call saveEmployee.

For other employee-related API calls, see:

  • recordGDPRConfirmation - to record that the employee agrees to follow the data protection requirements of General Data Protection Regulation;
  • getSchedule - to retrieve employees' work schedules. (This is a salon-specific feature, and not actively in use any more.)
  • getTimeSlots - to retrieve available time slots in employee's schedule. (This is a salon-specific feature, and not actively in use any more.)

Input parameters

Parameter name Description Possible value Required
employeeID  Employee's ID  Integer    
searchName  Search from employee name, e-mail or phone.  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)    
userGroupID  Get employees that belong to a specific user group. Note that if employee does not have a user account, it will never be returned when using this filter.  Integer    
usernameOrEmail  Search for a specific employee by user name or e-mail address.  Integer    
warehouseID  Get employees that work in a particular location (have access rights for a particular location).  Integer    
getProductInfo  Set this to 1 if you are using Salon / Spa module and want to get a list of services (products) that each stylist performs. This information will be returned in attribute productIDs - see below.  Integer - 1 or 0    
birthdayMonthDayFrom 

Filter employees by birthday — get all employees whose birthday is on or after the specified month and day.

If you only specify birthdayMonthDayFrom and not birthdayMonthDayTo, all birthdays between the specified day and the end of the year are returned.

Combine the two filters to get birthdays in a specific range (eg. birthdays in June or July). Year wrap-around is supported: filter birthdayMonthDayFrom = "12-01", birthdayMonthDayTo = "01-31" returns birthdays in December and January.

Both month and day must be two digits. Use a leading zero if necessary.

 
String (mm-dd)    
birthdayMonthDayTo 

Filter employees by birthday — get all employees whose birthday is on or before the specified month and day.

If you only specify birthdayMonthDayTo and not birthdayMonthDayFrom, all birthdays between the beginning of the year and the specified day are returned.

Combine the two filters to get birthdays in a specific range (eg. birthdays in June or July). Year wrap-around is supported: filter birthdayMonthDayFrom = "12-01", birthdayMonthDayTo = "01-31" returns birthdays in December and January.

Both month and day must be two digits. Use a leading zero if necessary.

 
String (mm-dd)    
searchAttributeName  Search from attribute name. searchAttributeName and searchAttributeValue have to be specified both  String    
searchAttributeValue  Search from attribute value  String    
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    'name', 'group' or 'lastChanged'. By default 'name'.    
orderByDir        
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
employeeID  Integer  (deprecated alternative name: id)  
fullName  String  Full name of the customer, use for displaying customer name.  
employeeName  String  For companies only.  
firstName  String  (Given name.) For persons only.  
lastName  String  (Surname.) For persons only.  
phone  String    
mobile  String    
email  String    
fax  String    
code  String  National ID number  
gender  String  Gender: "male", "female" or empty string  
userID  Integer string  If employee does not have user account, this attribute is not returned.  
username  String  If employee does not have user account, this attribute is not returned.  
userGroupID  Integer string  If employee does not have user account, this attribute is not returned.  
performsColoring  0 or 1  DO NOT USE - NOT A STANDARD FIELD. Indicates whether this employee performs coloring.  
warehouses  Array  Array of locations (warehouse IDs) in which the employee is working.
In other words, the locations for which the employee has access rights. Array elements have the following structure:
Field nameTypeDescription
idIntegerWarehouse ID
 
pointsOfSale  String  A comma-separated list of registers (Point of sale IDs) in which the employee is working.
In other words, the registers for which the employee has access rights.

Attributes warehouses and pointsOfSale both show basically the same information, because user rights are defined per-location. Using pointsOfSale just saves you the trouble of looking up register IDs for each location.  
productIDs  Array  Salon-specific attribute. Available only if Salon / Spa module is enabled on your account, and if you have set getProductInfo parameter to 1.

A list of services that the stylist / attendant performs. (Services are also listed in the products table, although marked as "non-stock products" - that's why this attribute returns product IDs.)

Each element of the array has the following parameters:
Field nameTypeDescription
productIDIntegerProduct (service) ID
productCodeStringProduct (service) code
productNameStringProduct (service) name
productGroupIntegerProduct (service) group

For other salon-related API calls, see getSchedule and getTimeSlots. To get a list of all salon services, use API call getProducts with parameter nonStockProduct set to 1.  
attributes  Array  Additional attributes. Each item looks like this:

Field nameTypeDescription
attributeNameStringAttribute name
attributeTypeStringAttribute type
attributeValueStringAttribute value
 
lastModified  Unix timestamp  Last modification time.  
lastModifiedByUserName  String    
****  ****  To retrieve the following fields, set input parameter responseMode = "detail". These fields are not included in the output by default.  
skype  String    
birthday  Date (yyyy-mm-dd)  Person's birthday  
jobTitleID  Integer  Person's job title ID  
jobTitleName  String    
notes  String    
added  Unix timestamp  Creation time.  
****  ****  End of extra output fields