Trendsic Platform Service

<back to all web services

PmJobRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/pm/job/{JobID}
"use strict";
export class PmJobCrew {
    /** @param {{ContactID?:number,Name?:string,Rate?:number,BudgetedHours?:number,IsOpen?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ContactID;
    /** @type {string} */
    Name;
    /** @type {number} */
    Rate;
    /** @type {number} */
    BudgetedHours;
    /** @type {boolean} */
    IsOpen;
}
export class PmJobResource {
    /** @param {{Id?:number,Name?:string,Amount?:number,Qty?:number,Unit?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    Id;
    /** @type {string} */
    Name;
    /** @type {number} */
    Amount;
    /** @type {number} */
    Qty;
    /** @type {string} */
    Unit;
}
export class PmJob {
    /** @param {{JobID?:number,Name?:string,Description?:string,Status?:string,StartDate?:string,EndDate?:string,CrewCount?:number,BudgetedHours?:number,EquipmentCount?:number,MaterialCount?:number,CrewCost?:number,EquipCost?:number,MatCost?:number,Cost?:number,NoCrew?:boolean,EquipConflict?:boolean,MaterialGap?:boolean,ReadyPct?:number,Priority?:string,Tags?:string[],Crew?:PmJobCrew[],Equipment?:PmJobResource[],Materials?:PmJobResource[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    JobID;
    /** @type {string} */
    Name;
    /** @type {string} */
    Description;
    /** @type {string} */
    Status;
    /** @type {string} */
    StartDate;
    /** @type {string} */
    EndDate;
    /** @type {number} */
    CrewCount;
    /** @type {number} */
    BudgetedHours;
    /** @type {number} */
    EquipmentCount;
    /** @type {number} */
    MaterialCount;
    /** @type {number} */
    CrewCost;
    /** @type {number} */
    EquipCost;
    /** @type {number} */
    MatCost;
    /** @type {number} */
    Cost;
    /** @type {boolean} */
    NoCrew;
    /** @type {boolean} */
    EquipConflict;
    /** @type {boolean} */
    MaterialGap;
    /** @type {number} */
    ReadyPct;
    /** @type {string} */
    Priority;
    /** @type {string[]} */
    Tags = [];
    /** @type {PmJobCrew[]} */
    Crew = [];
    /** @type {PmJobResource[]} */
    Equipment = [];
    /** @type {PmJobResource[]} */
    Materials = [];
}
export class PmJobResponse {
    /** @param {{Job?:PmJob,ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {PmJob} */
    Job;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class PmJobRequest {
    /** @param {{JobID?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    JobID;
}

JavaScript PmJobRequest 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.

GET /v1/pm/job/{JobID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Job: 
	{
		JobID: 0,
		Name: String,
		Description: String,
		Status: String,
		StartDate: String,
		EndDate: String,
		CrewCount: 0,
		BudgetedHours: 0,
		EquipmentCount: 0,
		MaterialCount: 0,
		CrewCost: 0,
		EquipCost: 0,
		MatCost: 0,
		Cost: 0,
		NoCrew: False,
		EquipConflict: False,
		MaterialGap: False,
		ReadyPct: 0,
		Priority: String,
		Tags: 
		[
			String
		],
		Crew: 
		[
			{
				ContactID: 0,
				Name: String,
				Rate: 0,
				BudgetedHours: 0,
				IsOpen: False
			}
		],
		Equipment: 
		[
			{
				Id: 0,
				Name: String,
				Amount: 0,
				Qty: 0,
				Unit: String
			}
		],
		Materials: 
		[
			{
				Id: 0,
				Name: String,
				Amount: 0,
				Qty: 0,
				Unit: String
			}
		]
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}