Skip to content

getJobsByEvent

Supported, no replacement yet

This endpoint remains fully supported. No replacement exists in the new API yet, and no action is needed. When a replacement ships you will get 12 months' notice, and this site will be updated.

Reference

/rest/workflow/job/getJobsByEvent/{startDate}/{endDate}/{clientID}/{eventIdList}


GET
Gets job details for all jobs that have undergone the specified job event IDs (provided in a comma-separated list) within the period specified (start date/time to end date/time inclusive), for the client ID specified.

Parameters

startDate - date to get events from in format dd-mmm-yyyy hh:mm:ss
endDate - date to get events to in format dd-mmm-yyyy hh:mm:ss
clientID - the ID of the client
eventIdList - the ID of the events to include, in a comma-separated list - IF THIS PARAMETER IS NOT SUPPLIED ALL JOBS THAT HAVE HAD AN EVENT OCCUR IN THE SPECIFIED TIME PERIOD WILL BE RETURNED

Note: maximum difference between end and start date is one month

e.g. rest/workflow/job/getJobsByEvent/29-May-2012%2010:30:00/30-May-2012%2000:00:00/1/71,135,326

available response representations:
  • 200 - XML


<root>
  <jobs>
    <job>
      <jobRef>J007TG</jobRef>
      <siteRef>abc123</siteRef>
      <workLogRef>abc123</workLogRef>
      <workLogTypeCode>CYCL</workLogTypeCode>
      <workTypeDescription>CYCL</worTypeDescription>
      <serviceDescription>Plumbing</serviceDescription>
      <priorityDescription>High</priorityDescription>
      <jobDescription>fix tap</jobDescription>
      <jobStatus>Open</jobStatus>
      <jobExportedDate>15/06/2013 10:00:00</jobExportedDate>
      <siteConsiderations>dog</siteConsiderations>
      <contactSal>Mr</contactSal>
      <contactForename>Bob</contactForename>
      <contactSurname>Smith</contactSurname>
      <contactPreferred>078676 787899</contactPreferred>
      <reportedBy>Kelly</reportedBy>
      <reportedDateTime>12/12/2012 12:12:12</reportedDateTime>
      <createdDateTime>12/12/2012 12:12:12</createdDateTime>
      <targetDateTime>12/12/2012 12:12:12</targetDateTime>
      <plannedStartDateTime>12/12/2012 12:12:12</plannedStartDateTime>
      <plannedEndDateTime>12/12/2012 12:12:12</plannedEndDateTime>
      <actualStartDateTime>12/12/2012 12:12:12</actualStartDateTime>
      <actualEndDateTime>12/12/2012 12:12:12</actualEndDateTime>
      <jobVersion>1</jobVersion>
      <damageDescription>test</damageDescription>
      <versionStatus>New</versionStatus>
      <invoiceNumber>23</invoiceNumber>
      <jobEvents>
        <jobEvent>
          <eventRecordedBy>Bill</recordedBy>
          <eventDateTime>12/12/2012 12:12:12</eventDateTime>
          <eventRef>ABC</eventRef>
          <eventDescription>Appointment Created</eventDescription>
          <eventNote>test</eventNote>
          <eventNoteDescription>test</eventNoteDescription>
          <appointmentID>34</appointmentID>
        </jobEvent>
      </jobEvents>
      <activities>
        <activity activityId="15546"                libraryActivityCode="fbfdjj"                description="fix tap"                quantity="2"                completedQuantity="0"               category="Activity category 1"               siteLocation="location"               resourceName="John Doe"               addedBy="itadmin"               addedOn="12/03/2011 12:34:34" />
      </activities>
      <appointments>
        <appointment>
          <appointmentRef>7788</appointmentRef>
          <status>In Progress</status>
          <plannedStartDateTime>12/12/2012 12:12:12</plannedStartDateTime>
          <plannedEndDateTime>12/12/2012 12:12:12</plannedEndDateTime>
          <actualStartDateTime>12/12/2012 12:12:12</actualStartDateTime>
          <actualEndDateTime>12/12/2012 12:12:12</actualEndDateTime>
          <supplier>Test Supplier</supplier>
          <resource>Bruce Wayne</resource>
          <dayDivision>AM</dayDivision>
        </appointment>
      </appointments>
      <costs>
        <cost>
          <id>433</id>
          <ref>Hgddg</ref>
          <description>jkdskd</description>
          <activityId>56</activityId>
          <libraryActivityCode>HGH6</libraryActivityCode>
          <supplier>Bill's Plumbing<supplier>
              <resource>Alan</resource>
              <postingType>Actual</postingType>
              <status>Approved</status>
              <financialDate>12/12/2012</financialDate>
              <quantity>43.00</quantity>
              <cost>223.98</cost>
              <salesCost>567.33</salesCost>
            </cost>
          </costs>
          <attributes>
            <attribute>
              <name>Void Date</name>
              <value>12/12/2012</value>
            </attribute>
          </attributes>
          <resourceTimes>
            <time>
              <resource>Bill</resource>
              <supplier>Plumbers</supplier>
              <workTimeType>Working</workTimeType>
              <workTimeStart>12/12/2012 12:12:12</workTimeStart>
              <workTimeEnd>12/12/2012 12:14:12</workTimeEnd>
              <appointmentID>454</appointmentID>
            </time>
          </resourceTimes>
        </job>
      </jobs>
    </root>

See the Workflow API matrix for the full list of endpoints in this category.