Back to Service

Method Details for GetCustomersRaw.

Gets a list of customers

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 customers
  • customerStatusID Integer ID of specific Customer Status. Set to -1 to get all customers
  • accountManagerID Integer ID of an Employee. Set to 0 to get all customers

Returns

A list of customer objects in XML

Result Example

<?xml version="1.0" encoding="utf-8" ?>
<tlp:Customers 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/CustomersRaw.xsd">
  <tlp:Customer ID="1933" GUID="b86f7c33-f6a8-41a3-a5db-05422ae34e43">
    <tlp:Name>Microsoft</tlp:Name>
    <tlp:NickName>Microsoft</tlp:NickName>
    <tlp:No>05.1309</tlp:No>
    <tlp:CustomerStatusID>12</tlp:CustomerStatusID>
    <tlp:CustomerStatus>New lead</tlp:CustomerStatus>
    <tlp:Address1>One Microsoft Way</tlp:Address1>
    <tlp:Address2></tlp:Address2>
    <tlp:Address3></tlp:Address3>
    <tlp:ZipCode>WA 98052-6399</tlp:ZipCode>
    <tlp:City>Redmond</tlp:City>
    <tlp:State>Washington</tlp:State>
    <tlp:CountryID>218</tlp:CountryID>
    <tlp:Country>USA</tlp:Country>
    <tlp:Phone>+1 999 9999 9999</tlp:Phone>
    <tlp:Fax>+1 999 9999 9999</tlp:Fax>
    <tlp:Email>info@microsoft.com</tlp:Email>
    <tlp:WebPage>www.microsoft.com</tlp:WebPage>
    <tlp:EanNo>1234567890123</tlp:EanNo>
    <tlp:InvoiceTemplateID>0</tlp:InvoiceTemplateID>
    <tlp:VATNo>812780570</tlp:VATNo>
    <tlp:Comment>Contacts need data</tlp:Comment>
    <tlp:AccountManagerID>10</tlp:AccountManagerID>
    <tlp:AccountManagerFullName>Paul M Weiss</tlp:AccountManagerFullName>
    <tlp:AccountManagerInitials>PMW</tlp:AccountManagerInitials>
    <tlp:SecondaryAccountManagerID>12</tlp:SecondaryAccountManagerID>
    <tlp:SecondaryAccountManagerFullName>Paul Summerson</tlp:SecondaryAccountManagerFullName>
    <tlp:SecondaryAccountManagerInitials>PS</tlp:SecondaryAccountManagerInitials>
    <tlp:IndustryID>6</tlp:IndustryID>
    <tlp:IndustryName>Software Company</tlp:IndustryName>
    <tlp:CustomerSince>2011-08-12</tlp:CustomerSince>
    <tlp:CreatedAt>2010-04-16T09:35:59</tlp:CreatedAt>
    <tlp:CreatedByEmployeeId>417</tlp:CreatedByEmployeeId>
    <tlp:CreatedBy>Peter Nielsen</tlp:CreatedBy>
    <tlp:LastModifiedAt>2010-04-16T09:35:59</tlp:LastModifiedAt>
    <tlp:LastModifiedByEmployeeId>417</tlp:LastModifiedByEmployeeId>
    <tlp:LastModifiedBy>Peter Nielsen</tlp:LastModifiedBy>
  </tlp:Customer>
</tlp:Customers>

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="Customers" >
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Customer" type="tlp:CustomerRaw_Type" minOccurs="0" maxOccurs="unbounded" />
      </xsd:sequence>
    </xsd:complexType>
    <xsd:key name="Customer_Key">
      <xsd:selector xpath=".//tlp:Customer" />
      <xsd:field xpath="@ID" />
    </xsd:key>
  </xsd:element>

  <xsd:complexType name="CustomerRaw_Type">
    <xsd:sequence>
      <xsd:element name="Name" type="xsd:string" />
      <xsd:element name="NickName" type="xsd:string" />
      <xsd:element name="No" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CustomerStatusID" type="xsd:integer" />
      <xsd:element name="CustomerStatus" type="xsd:string" />
      <xsd:element name="Address1" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Address2" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Address3" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ZipCode" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="City" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="State" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CountryID" type="xsd:integer" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Country" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Phone" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Fax" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Email" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="WebPage" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="EanNo" type="xsd:integer" minOccurs="0" maxOccurs="1" />
      <xsd:element name="InvoiceTemplateID" type="xsd:integer" minOccurs="0" maxOccurs="1" />
      <xsd:element name="VATNo" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Comment" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="AccountManagerID" type="xsd:integer" minOccurs="0" maxOccurs="1"  />
      <xsd:element name="AccountManagerFullName" type="xsd:string" minOccurs="0" maxOccurs="1"  />
      <xsd:element name="AccountManagerInitials" type="xsd:string" minOccurs="0" maxOccurs="1"  />
      <xsd:element name="SecondaryAccountManagerID" type="xsd:integer" minOccurs="0" maxOccurs="1"  />
      <xsd:element name="SecondaryAccountManagerFullName" type="xsd:string" minOccurs="0" maxOccurs="1"  />
      <xsd:element name="SecondaryAccountManagerInitials" type="xsd:string" minOccurs="0" maxOccurs="1"  />
      <xsd:element name="IndustryID" type="xsd:integer" minOccurs="0" maxOccurs="1"  />
      <xsd:element name="IndustryName" type="xsd:string" minOccurs="0" maxOccurs="1"  />
      <xsd:element name="CustomerSince" type="xsd:date" minOccurs="0" maxOccurs="1" />
      <xsd:element name="CreatedAt" type="xsd:dateTime" />
      <xsd:element name="CreatedByEmployeeId" type="xsd:positiveInteger" />
      <xsd:element name="CreatedBy" type="xsd:string" />
      <xsd:element name="LastModifiedAt" type="xsd:dateTime" />
      <xsd:element name="LastModifiedByEmployeeId" type="xsd:positiveInteger" />
      <xsd:element name="LastModifiedBy" type="xsd:string" />
    </xsd:sequence>
    <xsd:attribute name="ID" type="xsd:positiveInteger" use="required" />
    <xsd:attribute name="GUID" type="xsd:string" use="required" />
  </xsd:complexType>

</xsd:schema>

Download the XSD