POST api/Dispatch

Returns a list of combined Job and Service Ticket Dispatch records filtered by values in the DispatchSearch object

Request Information

URI Parameters

None.

Body Parameters

DispatchSearch
NameDescriptionTypeAdditional information
RowGuid

globally unique identifier

None.

DispatchType

Type of dispatch: TKT for service tickets, JOB for jobs. Text is not case sensitive.

string

None.

Status

Status of either the Job or the Service Ticket the dispatch is associated with

string

None.

DispatchStatus

Status of the dispatch related to the dispatch, arrival, and departure times. Possible values are: undispatched, dispatched, arrived, and departed

string

None.

ServiceTechId

Service_Tech_Id from SV_Service_Tech table

integer

None.

EmployeeId

Foreign Key Employee_Id from SY_Employee table

integer

None.

ServiceTechCode

Employee_Code from SY_Employee table

string

None.

StartTime

Starting schedule time (dates without a specific time will use 12:00 AM for the time)

date

None.

EndTime

Ending schedule time (dates without a specific time will use 12:00 AM for the time)

date

None.

Request Formats

application/json, text/json

Sample:
{
  "RowGuid": "a38c2ddb-fb55-4824-90f9-ab738507e642",
  "DispatchType": "sample string 1",
  "Status": "sample string 2",
  "DispatchStatus": "sample string 3",
  "ServiceTechId": 1,
  "EmployeeId": 1,
  "ServiceTechCode": "sample string 4",
  "StartTime": "2018-07-20T16:00:26.8583713-04:00",
  "EndTime": "2018-07-20T16:00:26.8583713-04:00"
}

application/xml, text/xml

Sample:
<DispatchSearch xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models">
  <DispatchStatus>sample string 3</DispatchStatus>
  <DispatchType>sample string 1</DispatchType>
  <EmployeeId>1</EmployeeId>
  <EndTime>2018-07-20T16:00:26.8583713-04:00</EndTime>
  <RowGuid>a38c2ddb-fb55-4824-90f9-ab738507e642</RowGuid>
  <ServiceTechCode>sample string 4</ServiceTechCode>
  <ServiceTechId>1</ServiceTechId>
  <StartTime>2018-07-20T16:00:26.8583713-04:00</StartTime>
  <Status>sample string 2</Status>
</DispatchSearch>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'DispatchSearch'.

Response Information

Resource Description

Collection of Dispatch
NameDescriptionTypeAdditional information
DispatchId

Sedona internal autonumber for the Dispatch record. This will not be unique becuase it's being pulled from two different tables (OE_JOb_Disaptch and SV_Service)

integer

None.

DispatchType

Type of dispatch: TKT for service tickets, JOB for jobs. Text is not case sensitive. Use in conjunction with DispatchId to create a composite key or use RowGuid instead

string

None.

RowGuid

Unique record identifier. The DispatchId is a combination of two tables (OE_JOb_Disaptch and SV_Service) and will not be unique.

globally unique identifier

None.

Reference

Job_Code from OE_Job table and/or Ticket_Number for SV_Service_Ticket table

string

None.

Status

Status of the dispatch

string

None.

Description

Description

string

None.

ServiceTechCode

Employee_Code from SY_Employee table; cannot change the Service Tech (must cancel and add new)

string

None.

ServiceTechId

EmployeeId from SY_Employee table; cannot change the Service Tech (must cancel and add new)

integer

None.

CompanyCode

string

None.

ScheduleTime

date

None.

ScheduleTimeUtc

Only used when useUtcOffset is set to "1" in the web.config file

date

None.

DispatchTime

date

None.

DispatchTimeUtc

Only used when useUtcOffset is set to "1" in the web.config file

date

None.

ArrivalTime

date

None.

ArrivalTimeUtc

Only used when useUtcOffset is set to "1" in the web.config file

date

None.

DepartureTime

date

None.

DepartureTimeUtc

Only used when useUtcOffset is set to "1" in the web.config file

date

None.

EstimatedLength

integer

None.

SiteName

string

None.

Address1

string

None.

Address2

string

None.

Address3

string

None.

City

string

None.

State

string

None.

ZipCode

string

None.

JobTask

string

None.

Complete

string

None.

TicketPriority

string

None.

TicketGoBack

string

None.

ResolutionCode

string

None.

ResolutionNote

string

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "DispatchId": 1,
    "DispatchType": "sample string 2",
    "RowGuid": "6d6f9a16-f838-48d0-a8ff-5e4b8e1a7ed6",
    "Reference": "sample string 3",
    "Status": "sample string 4",
    "Description": "sample string 5",
    "ServiceTechCode": "sample string 6",
    "ServiceTechId": 7,
    "CompanyCode": "sample string 8",
    "ScheduleTime": "2018-07-20T16:00:26.8739968-04:00",
    "ScheduleTimeUtc": "2018-07-20T16:00:26.8739968-04:00",
    "DispatchTime": "2018-07-20T16:00:26.8739968-04:00",
    "DispatchTimeUtc": "2018-07-20T16:00:26.8739968-04:00",
    "ArrivalTime": "2018-07-20T16:00:26.8739968-04:00",
    "ArrivalTimeUtc": "2018-07-20T16:00:26.8739968-04:00",
    "DepartureTime": "2018-07-20T16:00:26.8739968-04:00",
    "DepartureTimeUtc": "2018-07-20T16:00:26.8739968-04:00",
    "EstimatedLength": 9,
    "SiteName": "sample string 10",
    "Address1": "sample string 11",
    "Address2": "sample string 12",
    "Address3": "sample string 13",
    "City": "sample string 14",
    "State": "sample string 15",
    "ZipCode": "sample string 16",
    "JobTask": "sample string 17",
    "Complete": "sample string 18",
    "TicketPriority": "sample string 19",
    "TicketGoBack": "sample string 20",
    "ResolutionCode": "sample string 21",
    "ResolutionNote": "sample string 22"
  },
  {
    "DispatchId": 1,
    "DispatchType": "sample string 2",
    "RowGuid": "6d6f9a16-f838-48d0-a8ff-5e4b8e1a7ed6",
    "Reference": "sample string 3",
    "Status": "sample string 4",
    "Description": "sample string 5",
    "ServiceTechCode": "sample string 6",
    "ServiceTechId": 7,
    "CompanyCode": "sample string 8",
    "ScheduleTime": "2018-07-20T16:00:26.8739968-04:00",
    "ScheduleTimeUtc": "2018-07-20T16:00:26.8739968-04:00",
    "DispatchTime": "2018-07-20T16:00:26.8739968-04:00",
    "DispatchTimeUtc": "2018-07-20T16:00:26.8739968-04:00",
    "ArrivalTime": "2018-07-20T16:00:26.8739968-04:00",
    "ArrivalTimeUtc": "2018-07-20T16:00:26.8739968-04:00",
    "DepartureTime": "2018-07-20T16:00:26.8739968-04:00",
    "DepartureTimeUtc": "2018-07-20T16:00:26.8739968-04:00",
    "EstimatedLength": 9,
    "SiteName": "sample string 10",
    "Address1": "sample string 11",
    "Address2": "sample string 12",
    "Address3": "sample string 13",
    "City": "sample string 14",
    "State": "sample string 15",
    "ZipCode": "sample string 16",
    "JobTask": "sample string 17",
    "Complete": "sample string 18",
    "TicketPriority": "sample string 19",
    "TicketGoBack": "sample string 20",
    "ResolutionCode": "sample string 21",
    "ResolutionNote": "sample string 22"
  }
]

application/xml, text/xml

Sample:
<ArrayOfDispatch xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models">
  <Dispatch>
    <Address1>sample string 11</Address1>
    <Address2>sample string 12</Address2>
    <Address3>sample string 13</Address3>
    <ArrivalTime>2018-07-20T16:00:26.8739968-04:00</ArrivalTime>
    <ArrivalTimeUtc xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>2018-07-20T20:00:26.8739968Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>-240</d3p1:OffsetMinutes>
    </ArrivalTimeUtc>
    <City>sample string 14</City>
    <CompanyCode>sample string 8</CompanyCode>
    <Complete>sample string 18</Complete>
    <DepartureTime>2018-07-20T16:00:26.8739968-04:00</DepartureTime>
    <DepartureTimeUtc xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>2018-07-20T20:00:26.8739968Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>-240</d3p1:OffsetMinutes>
    </DepartureTimeUtc>
    <Description>sample string 5</Description>
    <DispatchId>1</DispatchId>
    <DispatchTime>2018-07-20T16:00:26.8739968-04:00</DispatchTime>
    <DispatchTimeUtc xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>2018-07-20T20:00:26.8739968Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>-240</d3p1:OffsetMinutes>
    </DispatchTimeUtc>
    <DispatchType>sample string 2</DispatchType>
    <EstimatedLength>9</EstimatedLength>
    <JobTask>sample string 17</JobTask>
    <Reference>sample string 3</Reference>
    <ResolutionCode>sample string 21</ResolutionCode>
    <ResolutionNote>sample string 22</ResolutionNote>
    <RowGuid>6d6f9a16-f838-48d0-a8ff-5e4b8e1a7ed6</RowGuid>
    <ScheduleTime>2018-07-20T16:00:26.8739968-04:00</ScheduleTime>
    <ScheduleTimeUtc xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>2018-07-20T20:00:26.8739968Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>-240</d3p1:OffsetMinutes>
    </ScheduleTimeUtc>
    <ServiceTechCode>sample string 6</ServiceTechCode>
    <ServiceTechId>7</ServiceTechId>
    <SiteName>sample string 10</SiteName>
    <State>sample string 15</State>
    <Status>sample string 4</Status>
    <TicketGoBack>sample string 20</TicketGoBack>
    <TicketPriority>sample string 19</TicketPriority>
    <ZipCode>sample string 16</ZipCode>
  </Dispatch>
  <Dispatch>
    <Address1>sample string 11</Address1>
    <Address2>sample string 12</Address2>
    <Address3>sample string 13</Address3>
    <ArrivalTime>2018-07-20T16:00:26.8739968-04:00</ArrivalTime>
    <ArrivalTimeUtc xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>2018-07-20T20:00:26.8739968Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>-240</d3p1:OffsetMinutes>
    </ArrivalTimeUtc>
    <City>sample string 14</City>
    <CompanyCode>sample string 8</CompanyCode>
    <Complete>sample string 18</Complete>
    <DepartureTime>2018-07-20T16:00:26.8739968-04:00</DepartureTime>
    <DepartureTimeUtc xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>2018-07-20T20:00:26.8739968Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>-240</d3p1:OffsetMinutes>
    </DepartureTimeUtc>
    <Description>sample string 5</Description>
    <DispatchId>1</DispatchId>
    <DispatchTime>2018-07-20T16:00:26.8739968-04:00</DispatchTime>
    <DispatchTimeUtc xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>2018-07-20T20:00:26.8739968Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>-240</d3p1:OffsetMinutes>
    </DispatchTimeUtc>
    <DispatchType>sample string 2</DispatchType>
    <EstimatedLength>9</EstimatedLength>
    <JobTask>sample string 17</JobTask>
    <Reference>sample string 3</Reference>
    <ResolutionCode>sample string 21</ResolutionCode>
    <ResolutionNote>sample string 22</ResolutionNote>
    <RowGuid>6d6f9a16-f838-48d0-a8ff-5e4b8e1a7ed6</RowGuid>
    <ScheduleTime>2018-07-20T16:00:26.8739968-04:00</ScheduleTime>
    <ScheduleTimeUtc xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>2018-07-20T20:00:26.8739968Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>-240</d3p1:OffsetMinutes>
    </ScheduleTimeUtc>
    <ServiceTechCode>sample string 6</ServiceTechCode>
    <ServiceTechId>7</ServiceTechId>
    <SiteName>sample string 10</SiteName>
    <State>sample string 15</State>
    <Status>sample string 4</Status>
    <TicketGoBack>sample string 20</TicketGoBack>
    <TicketPriority>sample string 19</TicketPriority>
    <ZipCode>sample string 16</ZipCode>
  </Dispatch>
</ArrayOfDispatch>