Back to Service

Method Details for GetInvoicesRaw.

Gets a list of invoices

Parameters

  • siteCode String Unique identification for your TimeLog account
  • apiID String The API ID
  • apiPassword String The API password
  • invoiceID Integer ID of specific invoice. Set to 0 to get all invoices
  • customerID Integer ID of specific customer. Set to 0 to get all invoices
  • status Integer 0 for draft invoice; 1 for booked, checked and overdue invoices; 2 for overdue invoices; 3 for checked invoices; -1 for all invoices
  • startDate String Limits result to invoices with invoice date on or later than this date
  • endDate String Limits result to invoices with invoice date on or prior to this date

Returns

A list of invoice objects in XML format

Result Example

<?xml version="1.0" encoding="utf-8"?>
<tlp:Invoices
	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/InvoicesRaw.xsd" >
  <tlp:Invoice ID="277" GUID="795A4082-66A9-E511-80DA-005056B220E2">
    <tlp:InvoiceNumber>2004-0206</tlp:InvoiceNumber>
    <tlp:Header>Invoice layout</tlp:Header>
    <tlp:Text></tlp:Text>
    <tlp:InvoiceDate>2004-12-03T00:00:00</tlp:InvoiceDate>
    <tlp:DueDate>2004-12-17T00:00:00</tlp:DueDate>
    <tlp:Amount>39037.5000</tlp:Amount>
    <tlp:AmountSystemCurrency>245920.6350</tlp:AmountSystemCurrency>
    <tlp:Status>3</tlp:Status>
    <tlp:Type>0</tlp:Type>
    <tlp:CustomerID>333</tlp:CustomerID>
    <tlp:CustomerName>Microsoft</tlp:CustomerName>
    <tlp:CustomerNo>03-0376</tlp:CustomerNo>
    <tlp:CustomerAddress1>Kullerod</tlp:CustomerAddress1>
    <tlp:CustomerAddress2></tlp:CustomerAddress2>
    <tlp:CustomerAddress3></tlp:CustomerAddress3>
    <tlp:CustomerZipCode>N-0032</tlp:CustomerZipCode>
    <tlp:CustomerCity>HASLE</tlp:CustomerCity>
    <tlp:CustomerState></tlp:CustomerState>
    <tlp:CustomerCountry>Norway</tlp:CustomerCountry>
    <tlp:CustomerCountryID>156</tlp:CustomerCountryID>
    <tlp:PaymentTermID>1</tlp:PaymentTermID>
    <tlp:PaymentTermText>Payment terms: 30 days net
      If you miss a due date interests pursuant to applicable laws are added.</tlp:PaymentTermText>
    <tlp:CurrencyAbb>USD</tlp:CurrencyAbb>
    <tlp:CurrencyRate>629.9600</tlp:CurrencyRate>
    <tlp:DefaultVAT>25.0000</tlp:DefaultVAT>
    <tlp:AddVAT>1</tlp:AddVAT>
    <tlp:NetAmount>31230.0000</tlp:NetAmount>
    <tlp:NetAmountSystemCurrency>196736.5080</tlp:NetAmountSystemCurrency>
    <tlp:VATIncluded>7807.5000</tlp:VATIncluded>
    <tlp:VATIncludedSystemCurrency>49184.1270</tlp:VATIncludedSystemCurrency>
    <tlp:ProjectID>73</tlp:ProjectID>
    <tlp:ProjectNo>0069</tlp:ProjectNo>
    <tlp:PurchaseNo></tlp:PurchaseNo>
    <tlp:ContactFullName></tlp:ContactFullName>
    <tlp:DepartmentID>1</tlp:DepartmentID>
    <tlp:DepartmentTree>TimeLog A/S</tlp:DepartmentTree>
    <tlp:ExternalInvoiceNo></tlp:ExternalInvoiceNo>
    <tlp:CustomerReference></tlp:CustomerReference>
    <tlp:ExternalInvoiceStatus>Draft</tlp:ExternalInvoiceStatus>
    <tlp:RelatesToInvoiceID>276</tlp:RelatesToInvoiceID>
    <tlp:LegalEntityID>1</tlp:LegalEntityID>
    <tlp:InvoiceTemplateID>1</tlp:InvoiceTemplateID>
    <tlp:IsIgnoredWhenTransfer>0</tlp:IsIgnoredWhenTransfer>
    <tlp:IsReadyForInvoicing>0</tlp:IsReadyForInvoicing>
  </tlp:Invoice>
</tlp:Invoices>

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="Invoices">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Invoice" type="tlp:InvoiceRaw_Type" minOccurs="0" maxOccurs="unbounded" />
			</xsd:sequence>
		</xsd:complexType>
    <xsd:key name="Invoice_Key">
      <xsd:selector xpath=".//tlp:Invoice" />
      <xsd:field xpath="@ID" />
    </xsd:key>
  </xsd:element>

	<xsd:complexType name="InvoiceRaw_Type">
		<xsd:sequence>
			<xsd:element name="InvoiceNumber" type="xsd:string" minOccurs="0" maxOccurs="1" />
			<xsd:element name="Header" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Text" type="xsd:string" minOccurs="0" maxOccurs="1"/>
      <xsd:element name="InvoiceDate" type="xsd:dateTime" />
      <xsd:element name="DueDate" type="xsd:dateTime" minOccurs="0" maxOccurs="1"/>
      <xsd:element name="Amount" type="xsd:decimal" />
      <xsd:element name="AmountSystemCurrency" type="xsd:decimal" />
      <xsd:element name="Status" type="xsd:unsignedByte" />
      <xsd:element name="Type" type="xsd:unsignedByte" />
      <xsd:element name="CustomerID" type="xsd:positiveInteger" />
      <xsd:element name="CustomerName" type="xsd:string" />
      <xsd:element name="CustomerNo" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CustomerAddress1" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CustomerAddress2" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CustomerAddress3" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CustomerZipCode" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CustomerCity" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CustomerState" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CustomerCountry" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CustomerCountryID" type="xsd:positiveInteger" />
      <xsd:element name="PaymentTermID" type="xsd:positiveInteger" />
      <xsd:element name="PaymentTermText" type="xsd:string" />
      <xsd:element name="CurrencyAbb" type="xsd:string" />
      <xsd:element name="CurrencyRate" type="xsd:decimal" />
      <xsd:element name="DefaultVAT" type="xsd:decimal" />
      <xsd:element name="AddVAT" type="xsd:boolean" />
      <xsd:element name="NetAmount" type="xsd:decimal" />
      <xsd:element name="NetAmountSystemCurrency" type="xsd:decimal" />
      <xsd:element name="VATIncluded" type="xsd:decimal" />
      <xsd:element name="VATIncludedSystemCurrency" type="xsd:decimal" />
      <xsd:element name="ProjectID" type="xsd:positiveInteger" />
      <xsd:element name="ProjectNo" type="xsd:string" />
      <xsd:element name="PurchaseNo" type="xsd:string" />
      <xsd:element name="ContactFullName" type="xsd:string" />
      <xsd:element name="DepartmentID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="DepartmentTree" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ExternalInvoiceNo" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CustomerReference" type="xsd:string" minOccurs="0" maxOccurs="1"/>
      <xsd:element name="ExternalInvoiceStatus" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="RelatesToInvoiceID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" /><!-- Voucher reference for invoice -->
      <xsd:element name="InternalNote" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="LegalEntityID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="InvoiceTemplateID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="IsIgnoredWhenTransfer" type="xsd:boolean" />
      <xsd:element name="IsReadyForInvoicing" type="xsd:boolean" />
    </xsd:sequence>
		<xsd:attribute name="ID" type="xsd:positiveInteger" use="required"></xsd:attribute>
	</xsd:complexType>
  
</xsd:schema>

Download the XSD