Back to Service

Method Details for GetWorkingHoursRaw.

Gets a list of working hours

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
  • 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
  • startDate String Limits result to working hours with date on or later than this date
  • endDate String Limits result to working hours with date on or prior to this date

Returns

A list of working hour objects in XML format

Result Example

<?xml version="1.0" encoding="utf-8"?>
<tlp:WorkingHours 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/WorkingHoursRaw.xsd">
  <tlp:WorkingHour ID="447656">
      <tlp:Date>2013-05-01T00:00:00</tlp:Date>
      <tlp:Hours>3</tlp:Hours>
      <tlp:EmployeeID>128</tlp:EmployeeID>
      <tlp:EmployeeFirstName>Christian</tlp:EmployeeFirstName>
      <tlp:EmployeeLastName>Olsen</tlp:EmployeeLastName>
  </tlp:WorkingHour>
</tlp:WorkingHours>

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="WorkingHours" >
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="WorkingHour" type="tlp:WorkingHour_Type" minOccurs="0" maxOccurs="unbounded" />
			</xsd:sequence>
		</xsd:complexType>
		<xsd:key name="WorkingHour_Key">
			<xsd:selector xpath=".//tlp:WorkingHour" />
			<xsd:field xpath="@ID" />
		</xsd:key>
	</xsd:element>

	<xsd:complexType name="WorkingHour_Type">
		<xsd:sequence>
			<xsd:element name="Date" type="xsd:dateTime" minOccurs="1" maxOccurs="1" />
			<xsd:element name="Hours" type="xsd:decimal" minOccurs="1" maxOccurs="1" />
      <xsd:element name="EmployeeID" type="xsd:positiveInteger" minOccurs="1" maxOccurs="1" />
      <xsd:element name="EmployeeFirstName" type="xsd:string" minOccurs="1" maxOccurs="1" />
      <xsd:element name="EmployeeLastName" type="xsd:string" minOccurs="1" maxOccurs="1" />    
    </xsd:sequence>
		<xsd:attribute name="ID" type="xsd:positiveInteger" use="required" />
	</xsd:complexType>

</xsd:schema>

Download the XSD