Back to Service

Method Details for GetEventsRaw.

Gets a list of events

Parameters

  • siteCode String Unique identification for your TimeLog account
  • apiID String The API ID
  • apiPassword String The API password
  • eventID Integer ID of specific event. Set to 0 to get all events
  • eventTypeID Integer ID of specific eventType. Set to 0 to get all events
  • customerID Integer ID of specific customer. Set to 0 to get all events
  • employeeID Integer ID of the employee in charge of the event. Set to 0 to get all events
  • status Integer ID of the event status. Set to 0 to get all. Planned = 1, Postponed = 2, Finished = 3, Cancelled = 4
  • startDate String Limits result to events with date on or later than this date
  • endDate String Limits result to events with date on or prior to this date

Returns

A list of events objects in XML format

Result Example

<?xml version="1.0" encoding="utf-8"?>
<tlp:Events 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/EventsRaw.xsd">
  <tlp:Event ID="1">
    <tlp:EmployeeID>3</tlp:EmployeeID>
    <tlp:CustomerID>26</tlp:CustomerID>
    <tlp:EventTypeID>7</tlp:EventTypeID>
    <tlp:ContactID>448</tlp:ContactID>
    <tlp:OpportunityID>12</tlp:OpportunityID>
    <tlp:OpportunitySubject>Hello World</tlp:OpportunitySubject>
    <tlp:Subject>Presentation of version 2.6</tlp:Subject>
    <tlp:Description>Goal to get a meeting</tlp:Description>
    <tlp:Date>2002-09-04T00:00:00</tlp:Date>
    <tlp:Status>3</tlp:Status>
  </tlp:Event>
</tlp:Events>

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="EventTypes" >
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="EventType" type="tlp:EventsRaw_Type" minOccurs="0" maxOccurs="unbounded" />
			</xsd:sequence>
		</xsd:complexType>
		<xsd:key name="Event_Key">
			<xsd:selector xpath=".//tlp:Event" />
			<xsd:field xpath="@ID" />
		</xsd:key>
	</xsd:element>

	<xsd:complexType name="EventTypesRaw_Type">
		<xsd:sequence>
      <xsd:element name="EmployeeID" type="xsd:positiveInteger" minOccurs="1" maxOccurs="1" />
      <xsd:element name="CustomerID" type="xsd:positiveInteger" minOccurs="1" maxOccurs="1" />
      <xsd:element name="EventTypeID" type="xsd:positiveInteger" minOccurs="1" maxOccurs="1" />
      <xsd:element name="ContactID" type="xsd:positiveInteger" minOccurs="1" maxOccurs="1" />
      <xsd:element name="OpportunityID" type="xsd:positiveInteger" minOccurs="0" maxOccurs="1" />
      <xsd:element name="OpportunitySubject" type="xsd:string" minOccurs="0" maxOccurs="1" />
      <xsd:element name="Subject" type="xsd:string" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Description" type="xsd:string" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Date" type="xsd:dateTime" minOccurs="1" maxOccurs="1" />
      <xsd:element name="Status" type="xsd:positiveInteger" minOccurs="1" maxOccurs="1" />
      </xsd:sequence>
		<xsd:attribute name="ID" type="xsd:positiveInteger" use="required" />
	</xsd:complexType>

</xsd:schema>

Download the XSD