POST api/JobDispatch

Creates a Job Dispatch record.

Request Information

URI Parameters

None.

Body Parameters

JobDispatch
NameDescriptionTypeAdditional information
DispatchId

Sedona internal autonumber for the Dispatch record

integer

None.

JobCode

Value from OE_Job table; required for POST

string

None.

ServiceTechCode

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

string

Required

ScheduleTime

Scheduled time for the appointment

date

None.

DispatchTime

Actual dispatch time

date

None.

ArrivalTime

Actual arrival time

date

None.

DepartureTime

Actual departure time

date

None.

EstimatedLength

Estimated length of the appointment in minutes (i.e. 30, 60, etc.), zero if not supplied

integer

None.

Completed

Defaults to False if not supplied

boolean

None.

TaskCode

Task_Code from the OE_Task table

string

None.

LaborTaskCode

Task_Code from the OE_Task table; defaults to N/A if not supplied

string

None.

UserCode

the user making this change; defaults to UserCode value from config file if not set explicitly

string

String length: inclusive between 0 and 50

IsFirm

Is the Appointment Time firm?

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "DispatchId": 1,
  "JobCode": "sample string 1",
  "ServiceTechCode": "sample string 2",
  "ScheduleTime": "2018-12-11T11:03:20.5703041-05:00",
  "DispatchTime": "2018-12-11T11:03:20.5703041-05:00",
  "ArrivalTime": "2018-12-11T11:03:20.5703041-05:00",
  "DepartureTime": "2018-12-11T11:03:20.5703041-05:00",
  "EstimatedLength": 1,
  "Completed": true,
  "TaskCode": "sample string 3",
  "LaborTaskCode": "sample string 4",
  "UserCode": "sample string 5",
  "IsFirm": true
}

application/xml, text/xml

Sample:
<JobDispatch xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models">
  <ArrivalTime>2018-12-11T11:03:20.5703041-05:00</ArrivalTime>
  <Completed>true</Completed>
  <DepartureTime>2018-12-11T11:03:20.5703041-05:00</DepartureTime>
  <DispatchId>1</DispatchId>
  <DispatchTime>2018-12-11T11:03:20.5703041-05:00</DispatchTime>
  <EstimatedLength>1</EstimatedLength>
  <IsFirm>true</IsFirm>
  <JobCode>sample string 1</JobCode>
  <LaborTaskCode>sample string 4</LaborTaskCode>
  <ScheduleTime>2018-12-11T11:03:20.5703041-05:00</ScheduleTime>
  <ServiceTechCode>sample string 2</ServiceTechCode>
  <TaskCode>sample string 3</TaskCode>
  <UserCode>sample string 5</UserCode>
</JobDispatch>

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 'JobDispatch'.

Response Information

Resource Description

JobDispatch
NameDescriptionTypeAdditional information
DispatchId

Sedona internal autonumber for the Dispatch record

integer

None.

JobCode

Value from OE_Job table; required for POST

string

None.

ServiceTechCode

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

string

Required

ScheduleTime

Scheduled time for the appointment

date

None.

DispatchTime

Actual dispatch time

date

None.

ArrivalTime

Actual arrival time

date

None.

DepartureTime

Actual departure time

date

None.

EstimatedLength

Estimated length of the appointment in minutes (i.e. 30, 60, etc.), zero if not supplied

integer

None.

Completed

Defaults to False if not supplied

boolean

None.

TaskCode

Task_Code from the OE_Task table

string

None.

LaborTaskCode

Task_Code from the OE_Task table; defaults to N/A if not supplied

string

None.

UserCode

the user making this change; defaults to UserCode value from config file if not set explicitly

string

String length: inclusive between 0 and 50

IsFirm

Is the Appointment Time firm?

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "DispatchId": 1,
  "JobCode": "sample string 1",
  "ServiceTechCode": "sample string 2",
  "ScheduleTime": "2018-12-11T11:03:20.5703041-05:00",
  "DispatchTime": "2018-12-11T11:03:20.5703041-05:00",
  "ArrivalTime": "2018-12-11T11:03:20.5703041-05:00",
  "DepartureTime": "2018-12-11T11:03:20.5703041-05:00",
  "EstimatedLength": 1,
  "Completed": true,
  "TaskCode": "sample string 3",
  "LaborTaskCode": "sample string 4",
  "UserCode": "sample string 5",
  "IsFirm": true
}

application/xml, text/xml

Sample:
<JobDispatch xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models">
  <ArrivalTime>2018-12-11T11:03:20.5703041-05:00</ArrivalTime>
  <Completed>true</Completed>
  <DepartureTime>2018-12-11T11:03:20.5703041-05:00</DepartureTime>
  <DispatchId>1</DispatchId>
  <DispatchTime>2018-12-11T11:03:20.5703041-05:00</DispatchTime>
  <EstimatedLength>1</EstimatedLength>
  <IsFirm>true</IsFirm>
  <JobCode>sample string 1</JobCode>
  <LaborTaskCode>sample string 4</LaborTaskCode>
  <ScheduleTime>2018-12-11T11:03:20.5703041-05:00</ScheduleTime>
  <ServiceTechCode>sample string 2</ServiceTechCode>
  <TaskCode>sample string 3</TaskCode>
  <UserCode>sample string 5</UserCode>
</JobDispatch>