Trendsic Platform Service

<back to all web services

JobRequest

Requires Authentication
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/Job
GET,POST,PUT,DELETE,OPTIONS/v1/Job/{JobID}
"use strict";
export class CalendarEvent {
    /** @param {{CalendarEventId?:number,CalendarId?:string,EventStart?:string,EventEnd?:string,Location?:string,Summary?:string,Description?:string,EventTypeId?:number,Recurrence?:boolean,RecurrenceFrequency?:string,RecurrenceBy?:string,RecurrenceByValue?:string,RecurrenceUntil?:string,CreatedBy?:string,CreatedByName?:string,DateCreated?:string,ModifiedBy?:string,DateModified?:string,Deleted?:boolean,TimeZone?:string,Offset?:number,TextReminderSentDate?:string,Confirmed?:boolean,ConfirmationTextId?:string,FirstTextReminderId?:string,SecondTextReminderId?:string,LocationUID?:string,AgentReminderSentDate?:string,ContactId?:number,IsPrivate?:boolean,ProjectID?:number,JobID?:number,ProjectStartDate?:string,ProjectEndDate?:string,MaxCrewEndDate?:string,MaxEquipmentEndDate?:string,CheckInId?:string,AllDay?:boolean,JobName?:string,JobStatusName?:string,JobStatusId?:number,ProjectName?:string,ResourceId?:number,ResourceName?:string,Original_EventStart?:string,Original_Recurrence?:boolean,Original_RecurrenceFrequency?:string,Original_RecurrenceBy?:string,Original_RecurrenceByValue?:string,Original_RecurrenceUntil?:string,Checksum?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    CalendarEventId;
    /** @type {string} */
    CalendarId;
    /** @type {string} */
    EventStart;
    /** @type {string} */
    EventEnd;
    /** @type {string} */
    Location;
    /** @type {string} */
    Summary;
    /** @type {string} */
    Description;
    /** @type {number} */
    EventTypeId;
    /** @type {boolean} */
    Recurrence;
    /** @type {string} */
    RecurrenceFrequency;
    /** @type {string} */
    RecurrenceBy;
    /** @type {string} */
    RecurrenceByValue;
    /** @type {string} */
    RecurrenceUntil;
    /** @type {string} */
    CreatedBy;
    /** @type {string} */
    CreatedByName;
    /** @type {string} */
    DateCreated;
    /** @type {string} */
    ModifiedBy;
    /** @type {string} */
    DateModified;
    /** @type {boolean} */
    Deleted;
    /** @type {string} */
    TimeZone;
    /** @type {number} */
    Offset;
    /** @type {string} */
    TextReminderSentDate;
    /** @type {boolean} */
    Confirmed;
    /** @type {string} */
    ConfirmationTextId;
    /** @type {string} */
    FirstTextReminderId;
    /** @type {string} */
    SecondTextReminderId;
    /** @type {?string} */
    LocationUID;
    /** @type {string} */
    AgentReminderSentDate;
    /** @type {number} */
    ContactId;
    /** @type {boolean} */
    IsPrivate;
    /** @type {number} */
    ProjectID;
    /** @type {number} */
    JobID;
    /** @type {string} */
    ProjectStartDate;
    /** @type {string} */
    ProjectEndDate;
    /** @type {string} */
    MaxCrewEndDate;
    /** @type {string} */
    MaxEquipmentEndDate;
    /** @type {string} */
    CheckInId;
    /** @type {boolean} */
    AllDay;
    /** @type {string} */
    JobName;
    /** @type {string} */
    JobStatusName;
    /** @type {number} */
    JobStatusId;
    /** @type {string} */
    ProjectName;
    /** @type {number} */
    ResourceId;
    /** @type {string} */
    ResourceName;
    /** @type {string} */
    Original_EventStart;
    /** @type {boolean} */
    Original_Recurrence;
    /** @type {string} */
    Original_RecurrenceFrequency;
    /** @type {string} */
    Original_RecurrenceBy;
    /** @type {string} */
    Original_RecurrenceByValue;
    /** @type {string} */
    Original_RecurrenceUntil;
    /** @type {string} */
    Checksum;
}
export class Location {
    /** @param {{Id?:string,ClientId?:string,Name?:string,Address1?:string,Address2?:string,City?:string,State?:string,Zip?:string,Phone?:string,Fax?:string,URL?:string,Email?:string,TimeZone?:string,Active?:boolean,EntDate?:string,ModDate?:string,LocationImage?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Id;
    /** @type {string} */
    ClientId;
    /** @type {string} */
    Name;
    /** @type {string} */
    Address1;
    /** @type {string} */
    Address2;
    /** @type {string} */
    City;
    /** @type {string} */
    State;
    /** @type {string} */
    Zip;
    /** @type {string} */
    Phone;
    /** @type {string} */
    Fax;
    /** @type {string} */
    URL;
    /** @type {string} */
    Email;
    /** @type {string} */
    TimeZone;
    /** @type {boolean} */
    Active;
    /** @type {string} */
    EntDate;
    /** @type {string} */
    ModDate;
    /** @type {string} */
    LocationImage;
}
export class Job {
    /** @param {{JobID?:number,JobName?:string,Description?:string,JobTypeID?:number,ExpectedStartDate?:string,ActualStartDate?:string,ExpectedCompletionDate?:string,ActualEndDate?:string,Active?:boolean,CreatedByUID?:string,ProjectID?:number,StatusId?:number,AdvancedScheduling?:boolean,ShowTimes?:boolean,Schedule?:CalendarEvent[],HasScheduledWorkers?:boolean,HasScheduledPlaceholders?:boolean,ClientApprovalStatus?:string,InternalCost?:number,CostToClient?:number,Location?:Location,ProjectLocationID?:number,ProjectLocationAreaID?:number,ProjectLocationName?:string,ProjectLocationAddress1?:string,ProjectLocationAddress2?:string,ProjectLocationCity?:string,ProjectLocationState?:string,ProjectLocationZip?:string,ProjectLocationAreaName?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    JobID;
    /** @type {string} */
    JobName;
    /** @type {string} */
    Description;
    /** @type {number} */
    JobTypeID;
    /** @type {string} */
    ExpectedStartDate;
    /** @type {string} */
    ActualStartDate;
    /** @type {string} */
    ExpectedCompletionDate;
    /** @type {string} */
    ActualEndDate;
    /** @type {boolean} */
    Active;
    /** @type {string} */
    CreatedByUID;
    /** @type {number} */
    ProjectID;
    /** @type {number} */
    StatusId;
    /** @type {boolean} */
    AdvancedScheduling;
    /** @type {boolean} */
    ShowTimes;
    /** @type {CalendarEvent[]} */
    Schedule = [];
    /** @type {boolean} */
    HasScheduledWorkers;
    /** @type {boolean} */
    HasScheduledPlaceholders;
    /** @type {string} */
    ClientApprovalStatus;
    /** @type {number} */
    InternalCost;
    /** @type {number} */
    CostToClient;
    /** @type {Location} */
    Location;
    /** @type {?number} */
    ProjectLocationID;
    /** @type {?number} */
    ProjectLocationAreaID;
    /** @type {string} */
    ProjectLocationName;
    /** @type {string} */
    ProjectLocationAddress1;
    /** @type {string} */
    ProjectLocationAddress2;
    /** @type {string} */
    ProjectLocationCity;
    /** @type {string} */
    ProjectLocationState;
    /** @type {string} */
    ProjectLocationZip;
    /** @type {string} */
    ProjectLocationAreaName;
}
export class JobResponse {
    /** @param {{ResponseStatus?:ResponseStatus,Job?:Job[],RequiresConfirm?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ResponseStatus} */
    ResponseStatus;
    /** @type {Job[]} */
    Job = [];
    /** @type {boolean} */
    RequiresConfirm;
}
export class JobRequest {
    /** @param {{JobID?:number,Accept?:boolean,UpdateJobOnly?:boolean,Job?:Job[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    JobID;
    /** @type {boolean} */
    Accept;
    /** @type {boolean} */
    UpdateJobOnly;
    /** @type {Job[]} */
    Job = [];
}

JavaScript JobRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/Job HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	JobID: 0,
	Accept: False,
	UpdateJobOnly: False,
	Job: 
	[
		{
			JobID: 0,
			JobName: String,
			Description: String,
			JobTypeID: 0,
			ExpectedStartDate: 0001-01-01,
			ActualStartDate: 0001-01-01,
			ExpectedCompletionDate: 0001-01-01,
			ActualEndDate: 0001-01-01,
			Active: False,
			CreatedByUID: 00000000000000000000000000000000,
			ProjectID: 0,
			StatusId: 0,
			AdvancedScheduling: False,
			ShowTimes: False,
			Schedule: 
			[
				{
					CalendarEventId: 0,
					CalendarId: 00000000000000000000000000000000,
					EventStart: 0001-01-01,
					EventEnd: 0001-01-01,
					Location: String,
					Summary: String,
					Description: String,
					EventTypeId: 0,
					Recurrence: False,
					RecurrenceFrequency: String,
					RecurrenceBy: String,
					RecurrenceByValue: String,
					RecurrenceUntil: 0001-01-01,
					CreatedBy: String,
					CreatedByName: String,
					DateCreated: 0001-01-01,
					ModifiedBy: String,
					DateModified: 0001-01-01,
					Deleted: False,
					TimeZone: String,
					Offset: 0,
					TextReminderSentDate: 0001-01-01,
					Confirmed: False,
					ConfirmationTextId: String,
					FirstTextReminderId: String,
					SecondTextReminderId: String,
					LocationUID: 00000000000000000000000000000000,
					AgentReminderSentDate: 0001-01-01,
					ContactId: 0,
					IsPrivate: False,
					ProjectID: 0,
					JobID: 0,
					ProjectStartDate: 0001-01-01,
					ProjectEndDate: 0001-01-01,
					MaxCrewEndDate: 0001-01-01,
					MaxEquipmentEndDate: 0001-01-01,
					CheckInId: 00000000000000000000000000000000,
					AllDay: False,
					JobName: String,
					JobStatusName: String,
					JobStatusId: 0,
					ProjectName: String,
					ResourceId: 0,
					ResourceName: String,
					Original_EventStart: 0001-01-01,
					Original_Recurrence: False,
					Original_RecurrenceFrequency: String,
					Original_RecurrenceBy: String,
					Original_RecurrenceByValue: String,
					Original_RecurrenceUntil: 0001-01-01,
					Checksum: String
				}
			],
			HasScheduledWorkers: False,
			HasScheduledPlaceholders: False,
			ClientApprovalStatus: String,
			InternalCost: 0,
			CostToClient: 0,
			Location: 
			{
				Id: 00000000000000000000000000000000,
				ClientId: 00000000000000000000000000000000,
				Name: String,
				Address1: String,
				Address2: String,
				City: String,
				State: String,
				Zip: String,
				Phone: String,
				Fax: String,
				URL: String,
				Email: String,
				TimeZone: String,
				Active: False,
				EntDate: 0001-01-01,
				ModDate: 0001-01-01,
				LocationImage: String
			},
			ProjectLocationID: 0,
			ProjectLocationAreaID: 0,
			ProjectLocationName: String,
			ProjectLocationAddress1: String,
			ProjectLocationAddress2: String,
			ProjectLocationCity: String,
			ProjectLocationState: String,
			ProjectLocationZip: String,
			ProjectLocationAreaName: String
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Job: 
	[
		{
			JobID: 0,
			JobName: String,
			Description: String,
			JobTypeID: 0,
			ExpectedStartDate: 0001-01-01,
			ActualStartDate: 0001-01-01,
			ExpectedCompletionDate: 0001-01-01,
			ActualEndDate: 0001-01-01,
			Active: False,
			CreatedByUID: 00000000000000000000000000000000,
			ProjectID: 0,
			StatusId: 0,
			AdvancedScheduling: False,
			ShowTimes: False,
			Schedule: 
			[
				{
					CalendarEventId: 0,
					CalendarId: 00000000000000000000000000000000,
					EventStart: 0001-01-01,
					EventEnd: 0001-01-01,
					Location: String,
					Summary: String,
					Description: String,
					EventTypeId: 0,
					Recurrence: False,
					RecurrenceFrequency: String,
					RecurrenceBy: String,
					RecurrenceByValue: String,
					RecurrenceUntil: 0001-01-01,
					CreatedBy: String,
					CreatedByName: String,
					DateCreated: 0001-01-01,
					ModifiedBy: String,
					DateModified: 0001-01-01,
					Deleted: False,
					TimeZone: String,
					Offset: 0,
					TextReminderSentDate: 0001-01-01,
					Confirmed: False,
					ConfirmationTextId: String,
					FirstTextReminderId: String,
					SecondTextReminderId: String,
					LocationUID: 00000000000000000000000000000000,
					AgentReminderSentDate: 0001-01-01,
					ContactId: 0,
					IsPrivate: False,
					ProjectID: 0,
					JobID: 0,
					ProjectStartDate: 0001-01-01,
					ProjectEndDate: 0001-01-01,
					MaxCrewEndDate: 0001-01-01,
					MaxEquipmentEndDate: 0001-01-01,
					CheckInId: 00000000000000000000000000000000,
					AllDay: False,
					JobName: String,
					JobStatusName: String,
					JobStatusId: 0,
					ProjectName: String,
					ResourceId: 0,
					ResourceName: String,
					Original_EventStart: 0001-01-01,
					Original_Recurrence: False,
					Original_RecurrenceFrequency: String,
					Original_RecurrenceBy: String,
					Original_RecurrenceByValue: String,
					Original_RecurrenceUntil: 0001-01-01,
					Checksum: String
				}
			],
			HasScheduledWorkers: False,
			HasScheduledPlaceholders: False,
			ClientApprovalStatus: String,
			InternalCost: 0,
			CostToClient: 0,
			Location: 
			{
				Id: 00000000000000000000000000000000,
				ClientId: 00000000000000000000000000000000,
				Name: String,
				Address1: String,
				Address2: String,
				City: String,
				State: String,
				Zip: String,
				Phone: String,
				Fax: String,
				URL: String,
				Email: String,
				TimeZone: String,
				Active: False,
				EntDate: 0001-01-01,
				ModDate: 0001-01-01,
				LocationImage: String
			},
			ProjectLocationID: 0,
			ProjectLocationAreaID: 0,
			ProjectLocationName: String,
			ProjectLocationAddress1: String,
			ProjectLocationAddress2: String,
			ProjectLocationCity: String,
			ProjectLocationState: String,
			ProjectLocationZip: String,
			ProjectLocationAreaName: String
		}
	],
	RequiresConfirm: False
}