GetExpensesRaw
Reporting API: Returns the account's project expenses in a purchase-date range, with amounts, VAT, supplier, payment method and approval / payment / invoicing flags.
| 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/GetExpensesRaw |
| 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
Receipts are NOT returned. 9999-12-31).
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.
Customer of the expense's PROJECT. 0 = no filter.
0 = no filter.
Supplier. 0 = no filter.
Employee who registered the expense. 0 = no filter.
Department of the employee's CURRENT user profile, INCLUDING its sub-departments: matches when the given ID is in the department's ancestor path. The department at the time of the expense is not considered. 0 = no filter.
0 = no filter.
0 = no filter.
Purchase date >= value. ALWAYS applied - there is no 'no limit' value. An invalid value -> ASMX fault.
Purchase date <= value. Same rules 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/GetExpensesRaw"
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tlp="http://www.timelog.com/ws/tlp/v4_4">
<soap:Body>
<tlp:GetExpensesRaw>
<tlp:siteCode>{siteCode}</tlp:siteCode>
<tlp:apiID>{apiID}</tlp:apiID>
<tlp:apiPassword>{apiPassword}</tlp:apiPassword>
<tlp:customerID>0</tlp:customerID>
<tlp:projectID>0</tlp:projectID>
<tlp:supplierCustomerID>0</tlp:supplierCustomerID>
<tlp:employeeID>0</tlp:employeeID>
<tlp:employeeDepartmentID>0</tlp:employeeDepartmentID>
<tlp:expenseTypeID>0</tlp:expenseTypeID>
<tlp:paymentMethodID>0</tlp:paymentMethodID>
<tlp:startDate>{startDate}</tlp:startDate>
<tlp:endDate>{endDate}</tlp:endDate>
</tlp:GetExpensesRaw>
</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/GetExpensesRaw"' \
--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/GetExpensesRaw"'
envelope = """<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tlp="http://www.timelog.com/ws/tlp/v4_4">
<soap:Body>
<tlp:GetExpensesRaw>
<tlp:siteCode>{siteCode}</tlp:siteCode>
<tlp:apiID>{apiID}</tlp:apiID>
<tlp:apiPassword>{apiPassword}</tlp:apiPassword>
<tlp:customerID>0</tlp:customerID>
<tlp:projectID>0</tlp:projectID>
<tlp:supplierCustomerID>0</tlp:supplierCustomerID>
<tlp:employeeID>0</tlp:employeeID>
<tlp:employeeDepartmentID>0</tlp:employeeDepartmentID>
<tlp:expenseTypeID>0</tlp:expenseTypeID>
<tlp:paymentMethodID>0</tlp:paymentMethodID>
<tlp:startDate>{startDate}</tlp:startDate>
<tlp:endDate>{endDate}</tlp:endDate>
</tlp:GetExpensesRaw>
</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 GetExpensesRawResult: a tlp:Expenses root with one tlp:Expense element per record. Check the response format first: the same slot also carries the empty result and errors.
Order: Purchase date DESCENDING; ties in no defined order.
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>
<GetExpensesRawResponse xmlns="http://www.timelog.com/ws/tlp/v4_4">
<GetExpensesRawResult>
<tlp:Expenses xmlns:tlp="http://www.timelog.com/XML/Schema/tlp/v4_4">
<tlp:Expense ID="1001">
<tlp:CustomerName>Example Customer A/S</tlp:CustomerName>
<tlp:CustomerNo>1001</tlp:CustomerNo>
<tlp:CustomerID>12</tlp:CustomerID>
<tlp:ProjectName>Example project</tlp:ProjectName>
<tlp:ProjectNo>1001</tlp:ProjectNo>
<tlp:ProjectID>12</tlp:ProjectID>
<tlp:ContractName>Example contract</tlp:ContractName>
<tlp:ContractID>12</tlp:ContractID>
<tlp:ExpenseType>Example text</tlp:ExpenseType>
<tlp:ExpenseTypeID>12</tlp:ExpenseTypeID>
<tlp:SupplierCustomerName>Example Customer A/S</tlp:SupplierCustomerName>
<tlp:SupplierCustomerID>12</tlp:SupplierCustomerID>
<tlp:Date>2026-10-01T00:00:00</tlp:Date>
<tlp:Amount>950.0000</tlp:Amount>
<tlp:AmountSystemCurrency>950.0000</tlp:AmountSystemCurrency>
<tlp:VAT>0.0000</tlp:VAT>
<tlp:CurrencyABB>DKK</tlp:CurrencyABB>
<tlp:CurrencyRate>950.0000</tlp:CurrencyRate>
<tlp:PaymentMethod>Example text</tlp:PaymentMethod>
<tlp:PaymentMethodID>12</tlp:PaymentMethodID>
<tlp:Comment>Example text</tlp:Comment>
<tlp:ApprovedStatus>1</tlp:ApprovedStatus>
<tlp:IsControlled>0</tlp:IsControlled>
<tlp:IsPaid>0</tlp:IsPaid>
<tlp:Billable>0</tlp:Billable>
<tlp:EmployeeFirstName>Anna</tlp:EmployeeFirstName>
<tlp:EmployeeLastName>Example</tlp:EmployeeLastName>
<tlp:EmployeeInitials>ABC</tlp:EmployeeInitials>
<tlp:EmployeeID>12</tlp:EmployeeID>
<tlp:UserID>12</tlp:UserID>
<tlp:RegAmount>950.0000</tlp:RegAmount>
<tlp:RegAmountCurrency>950.0000</tlp:RegAmountCurrency>
<tlp:EstimatedAmount>950.0000</tlp:EstimatedAmount>
<tlp:EstimatedAmountCurrency>950.0000</tlp:EstimatedAmountCurrency>
<tlp:InvAmount>950.0000</tlp:InvAmount>
<tlp:InvAmountCurrency>950.0000</tlp:InvAmountCurrency>
<tlp:ProfitRatio>0.0000</tlp:ProfitRatio>
<tlp:InvoiceLineID>12</tlp:InvoiceLineID>
<tlp:SupplierInvoiceNo>1001</tlp:SupplierInvoiceNo>
<tlp:Created>2026-10-01T00:00:00</tlp:Created>
<tlp:ExpenseIsBooked>0</tlp:ExpenseIsBooked>
</tlp:Expense>
</tlp:Expenses>
</GetExpensesRawResult>
</GetExpensesRawResponse>
</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>
<GetExpensesRawResponse xmlns="http://www.timelog.com/ws/tlp/v4_4">
<GetExpensesRawResult>
<tlp:Expenses resultEmpty="true" xmlns:tlp="http://www.timelog.com/XML/Schema/tlp/v4_4"></tlp:Expenses>
</GetExpensesRawResult>
</GetExpensesRawResponse>
</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>
<GetExpensesRawResponse xmlns="http://www.timelog.com/ws/tlp/v4_4">
<GetExpensesRawResult>
<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>
</GetExpensesRawResult>
</GetExpensesRawResponse>
</soap:Body>
</soap:Envelope>
Errors
The errors every method can return (access denied, operation failed, invalid request) are listed once in Responses and errors.
This method has no errors of its own beyond the shared ones.