Raw extractsGetExpensesRaw

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.

APIReporting API (raw extracts)
EndpointPOST https://app{server-number}.timelog.com/{account}/Service.asmx
SOAPActionhttp://www.timelog.com/ws/tlp/v4_4/GetExpensesRaw
Content-Typetext/xml; charset=utf-8
AuthenticationsiteCode, apiID and apiPassword as the first three parameters. See Authentication
Changes dataNo. Safe to retry.
PagingNo: 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.

siteCodestring
Required

Your account's site code, from the Reporting API settings.

apiIDstring
Required

The Reporting API ID, from the Reporting API settings.

apiPasswordstring
Required

The Reporting API password, from the Reporting API settings.

customerIDinteger
Required

Customer of the expense's PROJECT. 0 = no filter.

projectIDinteger
Required

0 = no filter.

supplierCustomerIDinteger
Required

Supplier. 0 = no filter.

employeeIDinteger
Required

Employee who registered the expense. 0 = no filter.

employeeDepartmentIDinteger
Required

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.

expenseTypeIDinteger
Required

0 = no filter.

paymentMethodIDinteger
Required

0 = no filter.

startDatedateTime
Required

Purchase date >= value. ALWAYS applied - there is no 'no limit' value. An invalid value -> ASMX fault.

endDatedateTime
Required

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>
Replace every {…} 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.

tlp:ExpenseExpense[]

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>

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>
Data and No rows are illustrative examples: the format follows the service's documented output, with made-up values (only one record shown). Access denied was recorded from a real call with wrong credentials (to GetCustomersShortList; every data method answers the same way).

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.