GetWorkUnitsRaw
Reporting API: Returns the account's project time registrations, with hours, rates, amounts, cost and approval/invoice state, as one streamed XML document.
| API | Reporting API (raw extracts) |
| Endpoint | POST https://app{server-number}.timelog.com/{account}/Service.asmx |
| SOAPAction | http://www.timelog.com/ws/tlp/v4_4/GetWorkUnitsRaw |
| Content-Type | text/xml; charset=utf-8 |
| Authentication | siteCode, apiID and apiPassword as the first three parameters. See Authentication |
| Changes data | No. Safe to retry. |
| Paging | No: the whole result comes in one response. Narrow it with the filters. |
How it works
Filters: one registration, employee, allocation, task, project, registration department and a registration-date range; 0 means "no filter" for every ID.
Parameters
Each parameter has one label: Required, Conditional (required depending on other values) or Optional. Send them in the order shown.
Your account's site code, from the Reporting API settings.
The Reporting API ID, from the Reporting API settings.
The Reporting API password, from the Reporting API settings.
Time registration ID. 0 or negative = no filter.
Employee of the allocation. 0 = no filter.
Allocation. 0 = no filter.
Task. 0 = no filter.
Project of the task. 0 = no filter.
Department STORED ON THE REGISTRATION. 0 = no filter.
Optional. Registration date >= this value. Send ISO yyyy-MM-dd.
Optional. Registration date <= this value. Same parsing as startDate.
Request
POST /{account}/Service.asmx HTTP/1.1
Host: app{server-number}.timelog.com
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.timelog.com/ws/tlp/v4_4/GetWorkUnitsRaw"
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tlp="http://www.timelog.com/ws/tlp/v4_4">
<soap:Body>
<tlp:GetWorkUnitsRaw>
<tlp:siteCode>{siteCode}</tlp:siteCode>
<tlp:apiID>{apiID}</tlp:apiID>
<tlp:apiPassword>{apiPassword}</tlp:apiPassword>
<tlp:workUnitID>0</tlp:workUnitID>
<tlp:employeeID>0</tlp:employeeID>
<tlp:allocationID>0</tlp:allocationID>
<tlp:taskID>0</tlp:taskID>
<tlp:projectID>0</tlp:projectID>
<tlp:departmentID>0</tlp:departmentID>
<tlp:startDate>{startDate}</tlp:startDate>
<tlp:endDate>{endDate}</tlp:endDate>
</tlp:GetWorkUnitsRaw>
</soap:Body>
</soap:Envelope>
curl -X POST "https://app{server-number}.timelog.com/{account}/Service.asmx" \
-H "Content-Type: text/xml; charset=utf-8" \
-H 'SOAPAction: "http://www.timelog.com/ws/tlp/v4_4/GetWorkUnitsRaw"' \
--data-binary @request.xml
import requests
URL = "https://app{server-number}.timelog.com/{account}/Service.asmx"
SOAP_ACTION = '"http://www.timelog.com/ws/tlp/v4_4/GetWorkUnitsRaw"'
envelope = """<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tlp="http://www.timelog.com/ws/tlp/v4_4">
<soap:Body>
<tlp:GetWorkUnitsRaw>
<tlp:siteCode>{siteCode}</tlp:siteCode>
<tlp:apiID>{apiID}</tlp:apiID>
<tlp:apiPassword>{apiPassword}</tlp:apiPassword>
<tlp:workUnitID>0</tlp:workUnitID>
<tlp:employeeID>0</tlp:employeeID>
<tlp:allocationID>0</tlp:allocationID>
<tlp:taskID>0</tlp:taskID>
<tlp:projectID>0</tlp:projectID>
<tlp:departmentID>0</tlp:departmentID>
<tlp:startDate>{startDate}</tlp:startDate>
<tlp:endDate>{endDate}</tlp:endDate>
</tlp:GetWorkUnitsRaw>
</soap:Body>
</soap:Envelope>"""
response = requests.post(
URL,
data=envelope.encode("utf-8"),
headers={"Content-Type": "text/xml; charset=utf-8", "SOAPAction": SOAP_ACTION},
timeout=300,
)
rows = parse_result(response) # see "Responses and errors"
{…} placeholder with your own value.Response
The result is an XML document inside GetWorkUnitsRawResult: a tlp:WorkUnits root with one tlp:WorkUnit element per record. Check the response format first: the same slot also carries the empty result and errors.
One element per record. Fields without a value are left out of the element, so treat every field as optional.
Example response
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetWorkUnitsRawResponse xmlns="http://www.timelog.com/ws/tlp/v4_4">
<GetWorkUnitsRawResult>
<tlp:WorkUnits xmlns:tlp="http://www.timelog.com/XML/Schema/tlp/v4_4">
<tlp:WorkUnit ID="1001" OldID="12">
<tlp:TimeRegistrationGuid>3F2504E0-4F89-41D3-9A0C-0305E82C3321</tlp:TimeRegistrationGuid>
<tlp:WorkUnitGuid>3F2504E0-4F89-41D3-9A0C-0305E82C3322</tlp:WorkUnitGuid>
<tlp:OvertimeFactor>0</tlp:OvertimeFactor>
<tlp:EmployeeID>12</tlp:EmployeeID>
<tlp:EmployeeInitials>ABC</tlp:EmployeeInitials>
<tlp:EmployeeFirstName>Anna</tlp:EmployeeFirstName>
<tlp:EmployeeLastName>Example</tlp:EmployeeLastName>
<tlp:AllocationID>12</tlp:AllocationID>
<tlp:TaskID>12</tlp:TaskID>
<tlp:TaskName>Example task</tlp:TaskName>
<tlp:ProjectID>12</tlp:ProjectID>
<tlp:ProjectName>Example project</tlp:ProjectName>
<tlp:CustomerId>12</tlp:CustomerId>
<tlp:CustomerName>Example Customer A/S</tlp:CustomerName>
<tlp:Date>2026-10-01T00:00:00</tlp:Date>
<tlp:StartTime>2026-10-01T00:00:00</tlp:StartTime>
<tlp:EndTime>2026-12-31T00:00:00</tlp:EndTime>
<tlp:Note>Example text</tlp:Note>
<tlp:DepartmentID>12</tlp:DepartmentID>
<tlp:DepartmentName>Example department</tlp:DepartmentName>
<tlp:AdditionalTextField>Example text</tlp:AdditionalTextField>
<tlp:ActualExchangeRate>950.0000</tlp:ActualExchangeRate>
<tlp:RegHours>7.5000</tlp:RegHours>
<tlp:RegHourlyRate>950.0000</tlp:RegHourlyRate>
<tlp:RegHourlyRateProjectCurrency>950.0000</tlp:RegHourlyRateProjectCurrency>
<tlp:RegAmount>950.0000</tlp:RegAmount>
<tlp:RegAmountProjectCurrency>950.0000</tlp:RegAmountProjectCurrency>
<tlp:EstimatedHours>7.5000</tlp:EstimatedHours>
<tlp:EstimatedHourlyRate>950.0000</tlp:EstimatedHourlyRate>
<tlp:EstimatedHourlyRateProjectCurrency>950.0000</tlp:EstimatedHourlyRateProjectCurrency>
<tlp:EstimatedAmount>950.0000</tlp:EstimatedAmount>
<tlp:EstimatedAmountProjectCurrency>950.0000</tlp:EstimatedAmountProjectCurrency>
<tlp:BARHours>7.5000</tlp:BARHours>
<tlp:BARHourlyRate>950.0000</tlp:BARHourlyRate>
<tlp:BARHourlyRateProjectCurrency>950.0000</tlp:BARHourlyRateProjectCurrency>
<tlp:BARAmount>950.0000</tlp:BARAmount>
<tlp:BARAmountProjectCurrency>950.0000</tlp:BARAmountProjectCurrency>
<tlp:InvoicedHours>7.5000</tlp:InvoicedHours>
<tlp:InvoicedHourlyRate>950.0000</tlp:InvoicedHourlyRate>
<tlp:InvoicedHourlyRateProjectCurrency>950.0000</tlp:InvoicedHourlyRateProjectCurrency>
<tlp:InvoicedAmount>950.0000</tlp:InvoicedAmount>
<tlp:InvoicedAmountProjectCurrency>950.0000</tlp:InvoicedAmountProjectCurrency>
<tlp:InvHours>7.5000</tlp:InvHours>
<tlp:InvAmount>950.0000</tlp:InvAmount>
<tlp:CostAmount>950.0000</tlp:CostAmount>
<tlp:CostAmountCurrency>950.0000</tlp:CostAmountCurrency>
<tlp:HourlyRateId>12</tlp:HourlyRateId>
<tlp:InvoiceStatus>1</tlp:InvoiceStatus>
<tlp:BillableStatus>1</tlp:BillableStatus>
<tlp:IsBillable>1</tlp:IsBillable>
<tlp:ApprovedStatus>1</tlp:ApprovedStatus>
<tlp:MonthlyPeriod>2026-10</tlp:MonthlyPeriod>
<tlp:CreatedAt>2026-10-01T00:00:00</tlp:CreatedAt>
<tlp:CreatedByEmployeeId>12</tlp:CreatedByEmployeeId>
<tlp:CreatedBy>ABC</tlp:CreatedBy>
<tlp:LastModifiedAt>2026-10-01T00:00:00</tlp:LastModifiedAt>
<tlp:LastModifiedByEmployeeId>12</tlp:LastModifiedByEmployeeId>
<tlp:LastModifiedBy>ABC</tlp:LastModifiedBy>
<tlp:UserID>12</tlp:UserID>
</tlp:WorkUnit>
</tlp:WorkUnits>
</GetWorkUnitsRawResult>
</GetWorkUnitsRawResponse>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetWorkUnitsRawResponse xmlns="http://www.timelog.com/ws/tlp/v4_4">
<GetWorkUnitsRawResult>
<tlp:WorkUnits resultEmpty="true" xmlns:tlp="http://www.timelog.com/XML/Schema/tlp/v4_4"></tlp:WorkUnits>
</GetWorkUnitsRawResult>
</GetWorkUnitsRawResponse>
</soap:Body>
</soap:Envelope>
Example error
Wrong credentials, or a call over plain HTTP:
HTTP/1.1 401 Unauthorized
Content-Type: text/xml; charset=utf-8
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetWorkUnitsRawResponse xmlns="http://www.timelog.com/ws/tlp/v4_4">
<GetWorkUnitsRawResult>
<tlp:Errors xmlns:tlp="http://www.timelog.com/XML/Schema/tlp/v4_4">
<tlp:Error>Access denied. Check siteCode, apiID, apiPassword and SSL settings</tlp:Error>
</tlp:Errors>
</GetWorkUnitsRawResult>
</GetWorkUnitsRawResponse>
</soap:Body>
</soap:Envelope>
Errors
The errors every method can return (access denied, operation failed, invalid request) are listed once in Responses and errors.
Errors specific to this method:
| HTTP status | What you get | What it means | What to do |
|---|---|---|---|
| 200 | A document that stops in the middle (does not parse to the end) | The extract is sent row by row; a failure after the first rows were sent cuts the document off. | Treat a document that does not parse as failed and repeat the call with a shorter date range. |