Back to Service

Method Details for GetWorkingHoursRaw.

Gets a list of working hours

Definition

TimeLog.TLP.WebAppCode.Service.GetWorkingHoursRaw(System.String,System.String,System.String,System.Int32,System.Int32,System.Int32,System.String,System.String)

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:Workdate>
      <tlp:Hours>3</tlp:NormHours>
      <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="NormHours" >
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="NormHour" type="tlp:NormHoursRaw_Type" minOccurs="0" maxOccurs="unbounded" />
			</xsd:sequence>
		</xsd:complexType>
		<xsd:key name="NormHour_Key">
			<xsd:selector xpath=".//tlp:NormHour" />
			<xsd:field xpath="@ID" />
		</xsd:key>
	</xsd:element>

	<xsd:complexType name="NormHoursRaw_Type">
		<xsd:sequence>
			<xsd:element name="Workdate" type="xsd:datetime" />
			<xsd:element name="NormHours" type="xsd:decimal" />
			<xsd:element name="Overtime" type="xsd:decimal" />
      <xsd:element name="EmployeeID" type="xsd:positiveInteger" />
      <xsd:element name="EmployeeFirstName" type="xsd:string" />
      <xsd:element name="EmployeeLastName" type="xsd:string" />    
    </xsd:sequence>
		<xsd:attribute name="ID" type="xsd:positiveInteger" use="required" />
	</xsd:complexType>

</xsd:schema>

Download the XSD