Back to Service

Method Details for GetEmployeesRaw.

Gets a list of employees

Parameters

  • siteCode String Unique identification for your TimeLog account
  • apiID String The API ID
  • apiPassword String The API password
  • employeeID Integer ID of specific employee. Set to 0 to get all employees
  • initials String Initials of specific employee. Set to empty string to get all employees
  • departmentID Integer ID of specific department. Set to 0 to get all employees
  • status Integer Set to 0 for inactive employees; 1 for active employees; -1 to get all employees

Returns

A list of employee objects in XML format

Result Example

<?xml version="1.0" encoding="utf-8"?>
<tlp:Employees xmlns:tlp="http://www.timelog.com/XML/Schema/tlp/v4_4"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://www.timelog.com/XML/Schema/tlp/v4_4 http://www.timelog.com/api/xsd/EmployeesRaw.xsd">
	<tlp:Employee ID="17">
		<tlp:EmployeeUserId>2</tlp:EmployeeUserId>
		<tlp:FirstName>John</tlp:FirstName>
		<tlp:LastName>Doe</tlp:LastName>
		<tlp:FullName>John Doe</tlp:FullName>
		<tlp:Initials>JDO</tlp:Initials>
		<tlp:Title>Code Buster</tlp:Title>
		<tlp:Email>jdo@timelog.se</tlp:Email>
		<tlp:Phone>+46 1244 378 47</tlp:Phone>
		<tlp:Mobile>+46 1234 378 48</tlp:Mobile>
		<tlp:PrivatePhone>+46 1234 378 49</tlp:PrivatePhone>
	    <tlp:Address>New street 110</tlp:Address>
	    <tlp:ZipCode>99 999</tlp:ZipCode>
	    <tlp:City>Malmö</tlp:City>
	    <tlp:Status>1</tlp:Status>
	    <tlp:HiredDate>2011-01-18T00:00:00.000</tlp:HiredDate>
	    <tlp:TerminatedDate>2015-03-18T00:00:00.000</tlp:TerminatedDate>
		<tlp:DepartmentNameID>25</tlp:DepartmentNameID>
		<tlp:DepartmentName>Research and Development</tlp:DepartmentName>
	    <tlp:WorkWeek>Full time - 37 hours</tlp:WorkWeek>
	    <tlp:EmployeeTypeId>2</tlp:EmployeeTypeId>
	    <tlp:EmployeeTypeName>Consultant</tlp:EmployeeTypeName>
	    <tlp:EmployeeNo>12345</tlp:EmployeeNo>
	    <tlp:Username>SYSTEM</tlp:Username>
	    <tlp:CostPrice>1200.00</tlp:CostPrice>
	    <tlp:LegalEntityID>1</tlp:LegalEntityID>
	    <tlp:ApprovalManagerUserID>1</tlp:ApprovalManagerUserID>
	    <tlp:ApprovalManagerEmployeeID>16</tlp:ApprovalManagerEmployeeID>
	</tlp:Employee>
</tlp:Employees>

Result Schema

<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:tlp="http://www.timelog.com/XML/Schema/tlp/v4_4"
            targetNamespace="http://www.timelog.com/XML/Schema/tlp/v4_4"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified">
  <xsd:element name="Employees" >
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Employee" type="tlp:EmployeeRaw_Type" minOccurs="0" maxOccurs="unbounded" />
      </xsd:sequence>
    </xsd:complexType>
    <xsd:key name="Employee_Key">
      <xsd:selector xpath=".//tlp:Employee" />
      <xsd:field xpath="@ID" />
    </xsd:key>
  </xsd:element>

  <xsd:complexType name="EmployeeRaw_Type">
    <xsd:sequence>
      <xsd:element name="EmployeeUserId" type="xsd:positiveInteger" />
      <xsd:element name="FirstName" type="xsd:string" />
      <xsd:element name="LastName" type="xsd:string" />
      <xsd:element name="FullName" type="xsd:string" />
      <xsd:element name="Initials" type="xsd:string" />
      <xsd:element name="Title" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Email" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Phone" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Mobile" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="PrivatePhone" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Address" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ZipCode" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="City" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Status" type="xsd:unsignedByte"/>
      <xsd:element name="HiredDate" type="xsd:dateTime" />
      <xsd:element name="TerminatedDate" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
      <xsd:element name="DepartmentNameID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="DepartmentName" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="WorkWeek" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="EmployeeTypeID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="EmployeeTypeName" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="EmployeeNo" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Username" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CostPrice" type="xsd:decimal" minOccurs="0" maxOccurs="1" />
      <xsd:element name="LegalEntityID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ApprovalManagerUserID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ApprovalManagerEmployeeID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
    <xsd:attribute name="ID" type="xsd:positiveInteger" use="required" />
  </xsd:complexType>

</xsd:schema>

Download the XSD