Back to Service

Method Details for GetExpensesRaw.

Gets a list of expenses

Parameters

  • siteCode String Unique identification for your TimeLog account
  • apiID String The API ID
  • apiPassword String The API password
  • customerID Integer ID of specific customer. Set to 0 to get all expenses
  • projectID Integer ID of specific project. Set to 0 to get all expenses
  • supplierCustomerID Integer ID of specific supplier. Set to 0 to get all expenses
  • employeeID Integer ID of specific employee. Set to 0 to get all expenses
  • employeeDepartmentID Integer ID of specific employee department. Set to 0 to get all expenses
  • expenseTypeID Integer ID of specific expense type. Set to 0 to get all expenses
  • paymentMethodID Integer ID of specific payment method. Set to 0 to get all expenses
  • startDate DateTime (yyyy-MM-dd) Limits result to expenses with purchase date on or later than this date
  • endDate DateTime (yyyy-MM-dd) Limits result to expenses with purchase date on or prior to this date

Returns

A list of expense objects in XML format

Result Example

<?xml version="1.0" encoding="utf-8"?>
<tlp:Expenses 
  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/EventTypesRaw.xsd">
  <tlp:Expense ID="51789">
    <tlp:CustomerName>Name_Customer1614</tlp:CustomerName>
    <tlp:CustomerNo>Number</tlp:CustomerNo>
    <tlp:CustomerID>758</tlp:CustomerID>
    <tlp:ProjectName>My Project</tlp:ProjectName>
    <tlp:ProjectNo>My Number</tlp:ProjectNo>
    <tlp:ProjectID>6462</tlp:ProjectID>
    <tlp:ContractName>Time &amp; material - Standard contract</tlp:ContractName>
    <tlp:ContractID>11163</tlp:ContractID>
    <tlp:ExpenseType>Book</tlp:ExpenseType>
    <tlp:ExpenseTypeID>246</tlp:ExpenseTypeID>
    <tlp:SupplierCustomerName>Name_Customer1291</tlp:SupplierCustomerName>
    <tlp:SupplierCustomerID>3408</tlp:SupplierCustomerID>
    <tlp:Date>2021-06-01T00:00:00</tlp:Date>
    <tlp:Amount>1000.0000</tlp:Amount>
    <tlp:AmountSystemCurrency>97.6800</tlp:AmountSystemCurrency>
    <tlp:VAT>0.0000</tlp:VAT>
    <tlp:CurrencyABB>SEK</tlp:CurrencyABB>
    <tlp:CurrencyRate>100.0000</tlp:CurrencyRate>
    <tlp:PaymentMethod>Company card</tlp:PaymentMethod>
    <tlp:PaymentMethodID>161</tlp:PaymentMethodID>
    <tlp:ApprovedStatus>25</tlp:ApprovedStatus>
    <tlp:Billable>0</tlp:Billable>
    <tlp:EmployeeFirstName>FirstName_Admin1</tlp:EmployeeFirstName>
    <tlp:EmployeeLastName>LastName</tlp:EmployeeLastName>
    <tlp:EmployeeInitials>Initials_Admin1</tlp:EmployeeInitials>
    <tlp:EmployeeID>373</tlp:EmployeeID>
    <tlp:UserID>1</tlp:UserID>
    <tlp:RegAmount>97.6800</tlp:RegAmount>
    <tlp:RegAmountCurrency>1000.0000</tlp:RegAmountCurrency>
    <tlp:EstimatedAmount>0.0000</tlp:EstimatedAmount>
    <tlp:EstimatedAmountCurrency>0.0000</tlp:EstimatedAmountCurrency>
    <tlp:ProfitRatio>0.0000</tlp:ProfitRatio>
    <tlp:Created>2021-06-01T14:26:54.877</tlp:Created>
  </tlp:Expense>
</tlp:Expenses>

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="Expenses" >
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Expense" type="tlp:Expense_Type" minOccurs="0" maxOccurs="unbounded" />
      </xsd:sequence>
    </xsd:complexType>
    <xsd:key name="Expense_Key">
      <xsd:selector xpath=".//tlp:Expense" />
      <xsd:field xpath="@ID" />
    </xsd:key>
  </xsd:element>

  <xsd:complexType name="Expense_Type">
    <xsd:sequence>
      <xsd:element name="CustomerName" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CustomerNo" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CustomerID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ProjectName" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ProjectNo" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ProjectID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ContractName" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ContractID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ExpenseType" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ExpenseTypeID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="SupplierCustomerName" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="SupplierCustomerID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Date" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Amount" type="xsd:decimal" minOccurs="0" maxOccurs="1" />
      <xsd:element name="AmountSystemCurrency" type="xsd:decimal" minOccurs="0" maxOccurs="1" />
      <xsd:element name="VAT" type="xsd:decimal" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CurrencyABB" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CurrencyRate" type="xsd:decimal" minOccurs="0" maxOccurs="1" />
      <xsd:element name="PaymentMethod" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="PaymentMethodID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Comment" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ApprovedStatus" type="xsd:integer" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Billable" type="xsd:unsignedInt" minOccurs="0" maxOccurs="1" />
      <xsd:element name="EmployeeFirstName" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="EmployeeLastName" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="EmployeeInitials" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="EmployeeID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="UserID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="RegAmount" type="xsd:decimal" minOccurs="0" maxOccurs="1" />
      <xsd:element name="RegAmountCurrency" type="xsd:decimal" minOccurs="0" maxOccurs="1" />
      <xsd:element name="EstimatedAmount" type="xsd:decimal" minOccurs="0" maxOccurs="1" />
      <xsd:element name="EstimatedAmountCurrency" type="xsd:decimal" minOccurs="0" maxOccurs="1" />
      <xsd:element name="InvAmount" type="xsd:decimal" minOccurs="0" maxOccurs="1" />
      <xsd:element name="InvAmountCurrency" type="xsd:decimal" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ProfitRatio" type="xsd:decimal" minOccurs="0" maxOccurs="1" />
      <xsd:element name="InvoiceLineId" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="SupplierInvoiceNo" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Created" type="xsd:dateTime" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>

  </xsd:complexType>

</xsd:schema>

Download the XSD