Back to Service

Method Details for GetMileageRaw.

Gets a list of mileage

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.
  • projectID Integer ID of specific project. Set to 0 to get all.
  • employeeID Integer ID of specific employee. Set to 0 to get all.
  • departmentID Integer ID of specific department. Set to 0 to get all.
  • startDate String Limits result to all mileages registered on or later than this date
  • endDate String Limits result to all mileages registered on or prior to this date
  • selfPayment Integer Self-paid mileage (1). Company-paid mileage (0). Set to -1 to get all.
  • travelCarID Integer ID of specific car. Set to 0 to get all.
  • transportRateID Integer ID of specific transport rate. Set to 0 to get all.

Returns

A list of mileage objects in XML format

Result Example

<?xml version="1.0" encoding="utf-8"?>
<tlp:Mileages 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/MileagesRaw.xsd">
  <tlp:Mileage ID="1499">
    <CustomerName>TimeLog A/S</CustomerName>
    <CustomerNo>102</CustomerNo>
    <CustomerID>4312</CustomerID>
    <ProjectName>EMI - Presale (leads)</ProjectName>
    <ProjectNo>800</ProjectNo>
    <ProjectID>123</ProjectID>
    <EmployeeFirstName>Peter</EmployeeFirstName>
    <EmployeeLastName>Andersen</EmployeeLastName>
    <EmployeeFullName>Peter Andersen</EmployeeFullName>
    <EmployeeInitials>PAN</EmployeeInitials>
    <EmployeeID>3</EmployeeID>
    <EmployeeUserID>4</EmployeeUserID>
    <TravelStartDate>2015-04-01T00:00:00</TravelStartDate>
    <TravelEndDate>2015-04-01T00:00:00</TravelEndDate>
    <TravelPurpose>Kundebesøg (19/3)</TravelPurpose>
    <TravelDeparture>The office</TravelDeparture>
    <TravelDestination>Vestre Strandallé 103</TravelDestination>
    <TravelCostAmount>4.00</TravelCostAmount>
    <TravelRegAmount>4.00</TravelRegAmount>
    <TravelInvoicedAmount>0.00</TravelInvoicedAmount>
    <TravelTripStart>0</TravelTripStart>
    <TravelTripEnd>0</TravelTripEnd>
    <TravelKM>12</TravelKM>
    <TravelForm>Egen Bil</TravelForm>
    <TravelSelfPayment>1</TravelSelfPayment>
    <TransportRateAmount>3.70</TransportRateAmount>
    <TransportRate>DK-2015</TransportRate>
    <IsBillable>1</IsBillable>
  </tlp:Mileage>
</tlp:Mileages>

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="Mileages">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="Mileage" type="tlp:MileageRaw_Type" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
        </xsd:complexType>
        <xsd:key name="Mileage_Key">
            <xsd:selector xpath=".//tlp:Mileage"/>
            <xsd:field xpath="@ID"/>
        </xsd:key>
    </xsd:element>

    <xsd:complexType name="MileageRaw_Type">
        <xsd:sequence>
            <xsd:element name="CustomerName" type="xsd:string"/>
            <xsd:element name="CustomerNo" type="xsd:string"/>
            <xsd:element name="CustomerID" type="xsd:positiveInteger"/>
            <xsd:element name="ProjectName" type="xsd:string"/>
            <xsd:element name="ProjectNo" type="xsd:string"/>
            <xsd:element name="ProjectID" type="xsd:positiveInteger"/>
            <xsd:element name="EmployeeFirstName" type="xsd:string"/>
            <xsd:element name="EmployeeLastName" type="xsd:string"/>
            <xsd:element name="EmployeeFullName" type="xsd:string"/>
            <xsd:element name="EmployeeInitials" type="xsd:string"/>
            <xsd:element name="EmployeeID" type="xsd:positiveInteger"/><!-- Relates to employee -->
            <xsd:element name="EmployeeUserID" type="xsd:positiveInteger"/><!-- Relates to user -->
            <xsd:element name="TravelStartDate" type="xsd:dateTime"/>
            <xsd:element name="TravelEndDate" type="xsd:dateTime"/>
            <xsd:element name="TravelPurpose" type="xsd:string"/>
            <xsd:element name="TravelDeparture" type="xsd:string"/>
            <xsd:element name="TravelDestination" type="xsd:string"/>
            <xsd:element name="TravelCostAmount" type="xsd:decimal"/>
            <xsd:element name="TravelRegAmount" type="xsd:decimal"/>
            <xsd:element name="TravelInvoicedAmount" type="xsd:decimal"/>
            <xsd:element name="TravelTripStart" type="xsd:positiveInteger"/>
            <xsd:element name="TravelTripEnd" type="xsd:decimal"/>
            <xsd:element name="TravelKM" type="xsd:decimal"/>
            <xsd:element name="TravelCar" type="xsd:string"/>
            <xsd:element name="TravelSelfPayment" type="xsd:boolean"/>
            <xsd:element name="TransportRateAmount" type="xsd:decimal"/>
            <xsd:element name="TransportRate" type="xsd:string"/>
            <xsd:element name="IsBillable" type="xsd:boolean"/>
        </xsd:sequence>
        <xsd:attribute name="ID" type="xsd:positiveInteger" use="required"/>
    </xsd:complexType>

</xsd:schema>

Download the XSD