Back to Service

Method Details for GetWorkUnitsRaw.

Gets a list of work units.

Definition

TimeLog.TLP.WebAppCode.Service.GetWorkUnitsRaw(System.String,System.String,System.String,System.Int32,System.Int32,System.Int32,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
  • workUnitID Integer ID of specific work unit. Set to 0 to get work units
  • employeeID Integer ID of specific employee. Set to 0 to get all work units
  • allocationID Integer ID of specific allocation. Set to 0 to get all work units
  • taskID Integer ID of specific task. Set to 0 to get all work units
  • projectID Integer ID of specific project. Set to 0 to get work units
  • departmentID Integer ID of specific department. Set to 0 to get work units
  • startDate String Limits result to all work units registred on or later than this date
  • endDate String Limits result to all work units registred on or prior to this date

Returns

A list of work unit objects in XML format

Result Example

<?xml version="1.0" encoding="utf-8"?>
<tlp:WorkUnits 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/WorkUnitsRaw.xsd">
	<tlp:WorkUnit ID="7">
	  <tlp:TimeRegistrationGuid>87ED7267-3C2F-4892-ACEB-138E3754876C</tlp:TimeRegistrationGuid>
	  <tlp:OvertimeFactor>100</tlp:OvertimeFactor>
	  <tlp:EmployeeID>373</tlp:EmployeeID>
	  <tlp:EmployeeInitials>psu</tlp:EmployeeInitials>
	  <tlp:EmployeeFirstName>Peter</tlp:EmployeeFirstName>
	  <tlp:EmployeeLastName>Summersen</tlp:EmployeeLastName>
	  <tlp:AllocationID>5</tlp:AllocationID>
	  <tlp:TaskID>7</tlp:TaskID>
	  <tlp:TaskName>Period balancing</tlp:TaskName>
	  <tlp:ProjectID>3</tlp:ProjectID>
	  <tlp:ProjectName>Single contract customer</tlp:ProjectName>
	  <tlp:CustomerId>670</tlp:CustomerId>
	  <tlp:CustomerName>Customer 2</tlp:CustomerName>
	  <tlp:Date>2018-07-20T00:00:00</tlp:Date>
	  <tlp:Note/>
	  <tlp:DepartmentID>1</tlp:DepartmentID>
	  <tlp:DepartmentName>TimeLog A/S</tlp:DepartmentName>
	  <tlp:AdditionalTextField/>
	  <tlp:RegHours>4.0000</tlp:RegHours>
	  <tlp:RegHourlyRate>120.0000</tlp:RegHourlyRate>
    <tlp:RegAmount>480.0000</tlp:RegAmount>
	  <tlp:EstimatedHours>4.0000</tlp:EstimatedHours>
    <tlp:EstimatedHourlyRate>120.0000</tlp:EstimatedHourlyRate>
    <tlp:EstimatedAmount>480.0000</tlp:EstimatedAmount>
	  <tlp:BARHours>4.0000</tlp:BARHours>
    <tlp:BARHourlyRate>120.0000</tlp:BARHourlyRate>
    <tlp:BARAmount>480.0000</tlp:BARAmount>
	  <tlp:InvoicedHours>0.0000</tlp:InvoicedHours>
    <tlp:InvoicedHourlyRate>0.0000</tlp:InvoicedHourlyRate>
    <tlp:InvoicedAmount>0.0000</tlp:InvoicedAmount>
	  <tlp:InvHours>4.0000</tlp:InvHours>
	  <tlp:InvAmount>480.0000</tlp:InvAmount>
	  <tlp:CostAmount>280.0000</tlp:CostAmount>
	  <tlp:IsBillable>1</tlp:IsBillable>
	  <tlp:ApprovedStatus>0</tlp:ApprovedStatus>
	  <tlp:CreatedAt>2018-07-20T12:36:34.3666667</tlp:CreatedAt>
	  <tlp:CreatedByEmployeeId>373</tlp:CreatedByEmployeeId>
	  <tlp:CreatedBy>psu</tlp:CreatedBy>
	  <tlp:LastModifiedAt>2018-07-20T12:36:34.3666667</tlp:LastModifiedAt>
	  <tlp:LastModifiedByEmployeeId>373</tlp:LastModifiedByEmployeeId>
	  <tlp:LastModifiedBy>psu</tlp:LastModifiedBy>
	  <tlp:UserID>1</tlp:UserID>
	</tlp:WorkUnit>
	<tlp:WorkUnit ID="6">
	  <tlp:TimeRegistrationGuid>954E075A-BA38-44C9-BDAE-CA8B17C4A5BA</tlp:TimeRegistrationGuid>
	  <tlp:OvertimeFactor>100</tlp:OvertimeFactor>
	  <tlp:EmployeeID>373</tlp:EmployeeID>
	  <tlp:EmployeeInitials>psu</tlp:EmployeeInitials>
	  <tlp:EmployeeFirstName>Peter</tlp:EmployeeFirstName>
	  <tlp:EmployeeLastName>Summersen</tlp:EmployeeLastName>
	  <tlp:AllocationID>3</tlp:AllocationID>
	  <tlp:TaskID>5</tlp:TaskID>
	  <tlp:TaskName>End balancing</tlp:TaskName>
	  <tlp:ProjectID>3</tlp:ProjectID>
	  <tlp:ProjectName>Single contract customer</tlp:ProjectName>
	  <tlp:CustomerId>670</tlp:CustomerId>
	  <tlp:CustomerName>Customer 2</tlp:CustomerName>
	  <tlp:Date>2018-07-20T00:00:00</tlp:Date>
	  <tlp:Note/>
	  <tlp:DepartmentID>1</tlp:DepartmentID>
	  <tlp:DepartmentName>TimeLog A/S</tlp:DepartmentName>
	  <tlp:AdditionalTextField/>
	  <tlp:RegHours>2.0000</tlp:RegHours>
    <tlp:RegHourlyRate>120.0000</tlp:RegHourlyRate>
    <tlp:RegAmount>240.0000</tlp:RegAmount>
	  <tlp:EstimatedHours>2.0000</tlp:EstimatedHours>
    <tlp:EstimatedHourlyRate>120.0000</tlp:EstimatedHourlyRate>
    <tlp:EstimatedAmount>240.0000</tlp:EstimatedAmount>
	  <tlp:BARHours>2.0000</tlp:BARHours>
    <tlp:BARHourlyRate>240.0000</tlp:BARHourlyRate>
    <tlp:BARAmount>240.0000</tlp:BARAmount>
	  <tlp:InvoicedHours>0.0000</tlp:InvoicedHours>
    <tlp:InvoicedHourlyRate>0.0000</tlp:InvoicedHourlyRate>
    <tlp:InvoicedAmount>0.0000</tlp:InvoicedAmount>
	  <tlp:InvHours>2.0000</tlp:InvHours>
	  <tlp:InvAmount>240.0000</tlp:InvAmount>
	  <tlp:CostAmount>140.0000</tlp:CostAmount>
	  <tlp:IsBillable>1</tlp:IsBillable>
	  <tlp:ApprovedStatus>0</tlp:ApprovedStatus>
	  <tlp:CreatedAt>2018-07-20T12:36:34.0600000</tlp:CreatedAt>
	  <tlp:CreatedByEmployeeId>373</tlp:CreatedByEmployeeId>
	  <tlp:CreatedBy>psu</tlp:CreatedBy>
	  <tlp:LastModifiedAt>2018-07-20T12:36:34.0600000</tlp:LastModifiedAt>
	  <tlp:LastModifiedByEmployeeId>373</tlp:LastModifiedByEmployeeId>
	  <tlp:LastModifiedBy>psu</tlp:LastModifiedBy>
	  <tlp:UserID>1</tlp:UserID>
	</tlp:WorkUnit>
	<tlp:WorkUnit ID="5">
	  <tlp:TimeRegistrationGuid>5885ACAF-690B-4237-9D7A-60B7DDA45A17</tlp:TimeRegistrationGuid>
	  <tlp:OvertimeFactor>100</tlp:OvertimeFactor>
	  <tlp:EmployeeID>373</tlp:EmployeeID>
	  <tlp:EmployeeInitials>psu</tlp:EmployeeInitials>
	  <tlp:EmployeeFirstName>Peter</tlp:EmployeeFirstName>
	  <tlp:EmployeeLastName>Summersen</tlp:EmployeeLastName>
	  <tlp:AllocationID>4</tlp:AllocationID>
	  <tlp:TaskID>6</tlp:TaskID>
	  <tlp:TaskName>Prepaid</tlp:TaskName>
	  <tlp:ProjectID>3</tlp:ProjectID>
	  <tlp:ProjectName>Single contract customer</tlp:ProjectName>
	  <tlp:CustomerId>670</tlp:CustomerId>
	  <tlp:CustomerName>Customer 2</tlp:CustomerName>
	  <tlp:Date>2018-07-20T00:00:00</tlp:Date>
	  <tlp:Note/>
	  <tlp:DepartmentID>1</tlp:DepartmentID>
	  <tlp:DepartmentName>TimeLog A/S</tlp:DepartmentName>
	  <tlp:AdditionalTextField/>
	  <tlp:RegHours>3.0000</tlp:RegHours>
    <tlp:RegHourlyRate>120.0000</tlp:RegHourlyRate>
    <tlp:RegAmount>360.0000</tlp:RegAmount>
	  <tlp:EstimatedHours>3.0000</tlp:EstimatedHours>
    <tlp:EstimatedHourlyRate>120.0000</tlp:EstimatedHourlyRate>
    <tlp:EstimatedAmount>360.0000</tlp:EstimatedAmount>
	  <tlp:BARHours>3.0000</tlp:BARHours>
    <tlp:BARHourlyRate>120.0000</tlp:BARHourlyRate>
	  <tlp:BARAmount>360.0000</tlp:BARAmount>
	  <tlp:InvoicedHours>0.0000</tlp:InvoicedHours>
    <tlp:InvoicedHourlyRate>0.0000</tlp:InvoicedHourlyRate>
    <tlp:InvoicedAmount>0.0000</tlp:InvoicedAmount>
	  <tlp:InvHours>3.0000</tlp:InvHours>
	  <tlp:InvAmount>360.0000</tlp:InvAmount>
	  <tlp:CostAmount>210.0000</tlp:CostAmount>
	  <tlp:IsBillable>1</tlp:IsBillable>
	  <tlp:ApprovedStatus>0</tlp:ApprovedStatus>
	  <tlp:CreatedAt>2018-07-20T12:36:33.4466667</tlp:CreatedAt>
	  <tlp:CreatedByEmployeeId>373</tlp:CreatedByEmployeeId>
	  <tlp:CreatedBy>psu</tlp:CreatedBy>
	  <tlp:LastModifiedAt>2018-07-20T12:36:33.4466667</tlp:LastModifiedAt>
	  <tlp:LastModifiedByEmployeeId>373</tlp:LastModifiedByEmployeeId>
	  <tlp:LastModifiedBy>psu</tlp:LastModifiedBy>
	  <tlp:UserID>1</tlp:UserID>
	</tlp:WorkUnit>
</tlp:WorkUnits>

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="WorkUnits">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="WorkUnit" type="tlp:WorkUnitRaw_Type" minOccurs="0" maxOccurs="unbounded" />
      </xsd:sequence>
    </xsd:complexType>
    <xsd:key name="WorkUnit_Key">
      <xsd:selector xpath=".//tlp:WorkUnit" />
      <xsd:field xpath="@ID" />
    </xsd:key>
  </xsd:element>

  <xsd:complexType name="WorkUnitRaw_Type">
    <xsd:sequence>
	  <xsd:element name="TimeRegistrationGuid" type="xsd:string" />
	  <xsd:element name="OvertimeFactor" type="xsd:decimal" />
      <xsd:element name="EmployeeID" type="xsd:positiveInteger" />
      <xsd:element name="EmployeeInitials" type="xsd:string" />
      <xsd:element name="EmployeeFirstName" type="xsd:string" />
      <xsd:element name="EmployeeLastName" type="xsd:string" />
      <xsd:element name="AllocationID" type="xsd:positiveInteger" />
      <xsd:element name="TaskID" type="xsd:positiveInteger" />
      <xsd:element name="TaskName" type="xsd:string" />
      <xsd:element name="ProjectID" type="xsd:positiveInteger" />
      <xsd:element name="ProjectName" type="xsd:string" />
      <xsd:element name="CustomerId" type="xsd:positiveInteger" />
      <xsd:element name="CustomerName" type="xsd:string" />
      <xsd:element name="Date" type="xsd:dateTime" />
      <xsd:element name="Note" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="DepartmentID" type="xsd:int" />
      <xsd:element name="AdditionalTextField" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="RegHours" type="xsd:decimal" />
      <xsd:element name="RegHourlyRate" type="xsd:decimal" />
      <xsd:element name="RegAmount" type="xsd:decimal" />
      <xsd:element name="EstimatedHours" type="xsd:decimal" />
      <xsd:element name="EstimatedHourlyRate" type="xsd:decimal" />
      <xsd:element name="EstimatedAmount" type="xsd:decimal" />
      <xsd:element name="BARHours" type="xsd:decimal" /><!-- BAR: Booked as revenue -->
      <xsd:element name="BARHourlyRate" type="xsd:decimal" />
      <xsd:element name="BARAmount" type="xsd:decimal" />
      <xsd:element name="InvoicedHours" type="xsd:decimal" />
      <xsd:element name="InvoicedHourlyRate" type="xsd:decimal" />
      <xsd:element name="InvoicedAmount" type="xsd:decimal" />
      <xsd:element name="InvHours" type="xsd:decimal" /><!-- InvHours deprecated, use BARHours instead -->
      <xsd:element name="InvAmount" type="xsd:decimal" /><!-- InvAmount deprecated, use BARAmount instead -->
      <xsd:element name="CostAmount" type="xsd:decimal" />
      <xsd:element name="IsBillable" type="xsd:boolean" />
      <xsd:element name="ApprovedStatus" type="xsd:short" />
      <xsd:element name="CreatedAt" type="xsd:dateTime" />
      <xsd:element name="CreatedByEmployeeId" type="xsd:positiveInteger" />
      <xsd:element name="CreatedBy" type="xsd:string" />
      <xsd:element name="LastModifiedAt" type="xsd:dateTime" />
      <xsd:element name="LastModifiedByEmployeeId" type="xsd:positiveInteger" />
      <xsd:element name="LastModifiedBy" type="xsd:string" />
	  <xsd:element name="UserID" type="xsd:positiveInteger" />
    </xsd:sequence>
    <xsd:attribute name="ID" type="xsd:positiveInteger" use="required" />
  </xsd:complexType>

</xsd:schema>

Download the XSD