Back to Service

Method Details for GetInvoicesRaw.

Gets a list of invoices

Definition

TimeLog.TLP.WebAppCode.Service.GetInvoicesRaw(System.String,System.String,System.String,System.Int32,System.Int32,System.Int32,System.String,System.String)

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">
    <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>3200.0000</tlp:Amount>
    <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>One Microsoft Way</tlp:CustomerAddress1>
    <tlp:CustomerZipCode>WA 98052-6399</tlp:CustomerZipCode>
    <tlp:CustomerCity>Redmond</tlp:CustomerCity>
    <tlp:CustomerState>Washington</tlp:CustomerState>
    <tlp:CustomerCountry>USA</tlp:CustomerCountry>
    <tlp:PaymentTermID>1</tlp:PaymentTermID>
    <tlp:PaymentTermText>Terms: NET 14 days</tlp:PaymentTermText>
    <tlp:CurrencyAbb>USD</tlp:CurrencyAbb>
    <tlp:CurrencyRate>100.0000</tlp:CurrencyRate>
    <tlp:DefaultVAT>25.0000</tlp:DefaultVAT>
    <tlp:AddVAT>1</tlp:AddVAT>
    <tlp:NetAmount>3200.0000</tlp:NetAmount>
    <tlp:NetAmountSystemCurrency>3200.0000</tlp:NetAmountSystemCurrency>
    <tlp:VATIncluded>0.0000</tlp:VATIncluded>
    <tlp:VATIncludedSystemCurrency>0.0000</tlp:VATIncludedSystemCurrency>
    <tlp:ProjectNo>P34</tlp:ProjectNo>
    <tlp:PurchaseNo>134-2016</tlp:PurchaseNo>
    <tlp:ContactFullName>Peter Olsen</tlp:ContactFullName>
    <tlp:DepartmentID>34</tlp:DepartmentID>
    <tlp:DepartmentTree>TimeLog A/S » Consultancy</tlp:DepartmentTree>
    <tlp:ExternalInvoiceNo>23411</tlp:ExternalInvoiceNo>
    <tlp:CustomerReference>Peter Smith</tlp:CustomerReference>
    <tlp:ExternalInvoiceStatus>Booked</tlp:ExternalInvoiceStatus>
  </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="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="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="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:sequence>
		<xsd:attribute name="ID" type="xsd:positiveInteger" use="required"></xsd:attribute>
	</xsd:complexType>
  
</xsd:schema>

Download the XSD