Back to Service

Method Details for GetContractsRaw.

Gets a list of contracts

Definition

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

Parameters

  • siteCode String Unique identification for your TimeLog account
  • apiID String The API ID
  • apiPassword String The API password
  • projectID Integer ID of specific project. Set to 0 to get all contracts
  • contractModelType Integer Type of specific contract. Set to 0 to get all contracts; 1 for TimeMaterial; 2 for FixedPrice; 3 = TimeMaterialAccountEndBalancing; 4 = TimeMaterialAccountPeriodicBalancing; 5 for PrepaidServices; 6 for RevenueReqPerTask; 7 for ContinuousService; 8 for ContinuousItemInvoicing

Returns

A list of contract objects in XML format

Result Example

<?xml version="1.0" encoding="utf-8"?>
<tlp:ProjectContracts 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/ContractsRaw.xsd">
   <tlp:ProjectContract ID="1" GUID="947A1255-36A5-4519-BBAE-A5D0BB8FA7BA">
	  <tlp:Name>Time &amp; material - Standard contract</tlp:Name>
	  <tlp:ContractModelType>1</tlp:ContractModelType>
	  <tlp:ProjectID>1</tlp:ProjectID>
	  <tlp:ProjectContractStatus>2</tlp:ProjectContractStatus>
	  <tlp:WorkBudgetHours>8.0000</tlp:WorkBudgetHours>
	  <tlp:WorkBudgetAmount>0.0000</tlp:WorkBudgetAmount>
   </tlp:ProjectContract>
   <tlp:ProjectContract ID="4" GUID="0C44E5BE-2496-4BCA-8949-B4A621DE3870">
	  <tlp:Name>Time &amp; material - Standard contract</tlp:Name>
	  <tlp:ContractModelType>1</tlp:ContractModelType>
	  <tlp:ProjectID>3</tlp:ProjectID>
	  <tlp:ProjectContractStatus>4</tlp:ProjectContractStatus>
	  <tlp:WorkBudgetHours>100.0000</tlp:WorkBudgetHours>
	  <tlp:WorkBudgetAmount>12000.0000</tlp:WorkBudgetAmount>
   </tlp:ProjectContract>
   <tlp:ProjectContract ID="5" GUID="C439F311-4226-4849-8318-C01F1603AAE6">
	  <tlp:Name>Time &amp; material - On account with end-balancing</tlp:Name>
	  <tlp:ContractModelType>3</tlp:ContractModelType>
	  <tlp:ProjectID>3</tlp:ProjectID>
	  <tlp:ProjectContractStatus>3</tlp:ProjectContractStatus>
	  <tlp:WorkBudgetHours>150.0000</tlp:WorkBudgetHours>
	  <tlp:WorkBudgetAmount>15000.0000</tlp:WorkBudgetAmount>
   </tlp:ProjectContract>
   <tlp:ProjectContract ID="6" GUID="D6187B64-7520-4C77-8669-3290E5BD0705">
	  <tlp:Name>Time &amp; material - Prepaid hours</tlp:Name>
	  <tlp:ContractModelType>5</tlp:ContractModelType>
	  <tlp:ProjectID>3</tlp:ProjectID>
	  <tlp:ProjectContractStatus>3</tlp:ProjectContractStatus>
	  <tlp:WorkBudgetHours>100.0000</tlp:WorkBudgetHours>
	  <tlp:WorkBudgetAmount>12000.0000</tlp:WorkBudgetAmount>
   </tlp:ProjectContract>
</tlp:ProjectContracts>

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="Contracts">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Contract" type="tlp:ContractRaw_Type" minOccurs="0" maxOccurs="unbounded" />
      </xsd:sequence>
    </xsd:complexType>
    <xsd:key name="Contract_Key">
      <xsd:selector xpath=".//tlp:Contract" />
      <xsd:field xpath="@ID" />
    </xsd:key>
  </xsd:element>

  <xsd:complexType name="ContractRaw_Type">
    <xsd:sequence>
	  <xsd:element name="Name" type="xsd:string" />
	  <xsd:element name="ContractModelType" type="xsd:positiveInteger" />
	  <xsd:element name="ProjectID" type="xsd:positiveInteger" />
	  <xsd:element name="ProjectContractStatus" type="xsd:positiveInteger" />
	  <xsd:element name="WorkBudgetHours" type="xsd:decimal" />
	  <xsd:element name="WorkBudgetAmount" type="xsd:decimal" />
    </xsd:sequence>
	<xsd:attribute name="ID" type="xsd:positiveInteger" use="optional" />
	<xsd:attribute name="GUID" type="xsd:string" use="optional" />
  </xsd:complexType>

</xsd:schema>

Download the XSD