| GET | /v1/workforce/planning |
|---|
"use strict";
export class OtRow {
/** @param {{ContactID?:number,WorkerName?:string,ClassCode?:string,Crew?:string,Job?:string,PatternLabel?:string,ProjHours?:number,OtHours?:number,DtHours?:number,OtCost?:number,State?:string,Tone?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ContactID;
/** @type {string} */
WorkerName;
/** @type {string} */
ClassCode;
/** @type {string} */
Crew;
/** @type {string} */
Job;
/** @type {string} */
PatternLabel;
/** @type {number} */
ProjHours;
/** @type {number} */
OtHours;
/** @type {number} */
DtHours;
/** @type {?number} */
OtCost;
/** @type {string} */
State;
/** @type {string} */
Tone;
}
export class OtExposureBoard {
/** @param {{TotalOtCost?:number,TotalOtHours?:number,OverCount?:number,WorkerCount?:number,Rows?:OtRow[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?number} */
TotalOtCost;
/** @type {number} */
TotalOtHours;
/** @type {number} */
OverCount;
/** @type {number} */
WorkerCount;
/** @type {OtRow[]} */
Rows = [];
}
export class PerDiemJobRow {
/** @param {{Job?:string,Total?:number,NonTax?:number,Tax?:number,Days?:number,AwayCount?:number,DayRateFlag?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Job;
/** @type {number} */
Total;
/** @type {number} */
NonTax;
/** @type {number} */
Tax;
/** @type {number} */
Days;
/** @type {number} */
AwayCount;
/** @type {boolean} */
DayRateFlag;
}
export class PerDiemBoard {
/** @param {{TotalCost?:number,NonTaxable?:number,Taxable?:number,AwayCount?:number,Jobs?:PerDiemJobRow[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
TotalCost;
/** @type {number} */
NonTaxable;
/** @type {number} */
Taxable;
/** @type {number} */
AwayCount;
/** @type {PerDiemJobRow[]} */
Jobs = [];
}
export class MarginJobRow {
/** @param {{Job?:string,BasePct?:number,ProjPct?:number,FadePts?:number,Severity?:string,OtCost?:number,PerDiem?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Job;
/** @type {number} */
BasePct;
/** @type {number} */
ProjPct;
/** @type {number} */
FadePts;
/** @type {string} */
Severity;
/** @type {?number} */
OtCost;
/** @type {number} */
PerDiem;
}
export class MarginBoard {
/** @param {{JobCount?:number,TotalFade?:number,Jobs?:MarginJobRow[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
JobCount;
/** @type {?number} */
TotalFade;
/** @type {MarginJobRow[]} */
Jobs = [];
}
export class UtilRow {
/** @param {{ContactID?:number,WorkerName?:string,Crew?:string,ProjHours?:number,BaselineHours?:number,Pct?:number,Band?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ContactID;
/** @type {string} */
WorkerName;
/** @type {string} */
Crew;
/** @type {number} */
ProjHours;
/** @type {number} */
BaselineHours;
/** @type {number} */
Pct;
/** @type {string} */
Band;
}
export class UtilizationBoard {
/** @param {{UnderCount?:number,OverCount?:number,Rows?:UtilRow[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
UnderCount;
/** @type {number} */
OverCount;
/** @type {UtilRow[]} */
Rows = [];
}
export class PlanningSuggestion {
/** @param {{Id?:string,Kind?:string,Title?:string,Detail?:string,SaveText?:string,Effect?:string,RuleId?:string,LegalNote?:string,ApplyLabel?:string,Severity?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
Kind;
/** @type {string} */
Title;
/** @type {string} */
Detail;
/** @type {string} */
SaveText;
/** @type {string} */
Effect;
/** @type {string} */
RuleId;
/** @type {string} */
LegalNote;
/** @type {string} */
ApplyLabel;
/** @type {string} */
Severity;
}
export class PlanningSurface {
/** @param {{WeekLabel?:string,WeekStart?:string,WorkerCount?:number,Ot?:OtExposureBoard,PerDiem?:PerDiemBoard,Margin?:MarginBoard,Utilization?:UtilizationBoard,Suggestions?:PlanningSuggestion[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
WeekLabel;
/** @type {string} */
WeekStart;
/** @type {number} */
WorkerCount;
/** @type {OtExposureBoard} */
Ot;
/** @type {PerDiemBoard} */
PerDiem;
/** @type {MarginBoard} */
Margin;
/** @type {UtilizationBoard} */
Utilization;
/** @type {PlanningSuggestion[]} */
Suggestions = [];
}
export class PlanningResponse {
/** @param {{Surface?:PlanningSurface,CanSeePay?:boolean,ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {PlanningSurface} */
Surface;
/** @type {boolean} */
CanSeePay;
/** @type {ResponseStatus} */
ResponseStatus;
}
export class PlanningRequest {
/** @param {{AsOf?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
AsOf;
}
JavaScript PlanningRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/workforce/planning HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Surface:
{
WeekLabel: String,
WeekStart: 0001-01-01,
WorkerCount: 0,
Ot:
{
TotalOtCost: 0,
TotalOtHours: 0,
OverCount: 0,
WorkerCount: 0,
Rows:
[
{
ContactID: 0,
WorkerName: String,
ClassCode: String,
Crew: String,
Job: String,
PatternLabel: String,
ProjHours: 0,
OtHours: 0,
DtHours: 0,
OtCost: 0,
State: String,
Tone: String
}
]
},
PerDiem:
{
TotalCost: 0,
NonTaxable: 0,
Taxable: 0,
AwayCount: 0,
Jobs:
[
{
Job: String,
Total: 0,
NonTax: 0,
Tax: 0,
Days: 0,
AwayCount: 0,
DayRateFlag: False
}
]
},
Margin:
{
JobCount: 0,
TotalFade: 0,
Jobs:
[
{
Job: String,
BasePct: 0,
ProjPct: 0,
FadePts: 0,
Severity: String,
OtCost: 0,
PerDiem: 0
}
]
},
Utilization:
{
UnderCount: 0,
OverCount: 0,
Rows:
[
{
ContactID: 0,
WorkerName: String,
Crew: String,
ProjHours: 0,
BaselineHours: 0,
Pct: 0,
Band: String
}
]
},
Suggestions:
[
{
Id: String,
Kind: String,
Title: String,
Detail: String,
SaveText: String,
Effect: String,
RuleId: String,
LegalNote: String,
ApplyLabel: String,
Severity: String
}
]
},
CanSeePay: False,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}