| POST,OPTIONS | /v1/dashboard/dispatch |
|---|
"use strict";
export class DashboardStatTile {
/** @param {{Key?:string,Label?:string,Value?:number,PreviousValue?:number,Unit?:string,DeltaPct?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Key;
/** @type {string} */
Label;
/** @type {number} */
Value;
/** @type {?number} */
PreviousValue;
/** @type {string} */
Unit;
/** @type {?number} */
DeltaPct;
}
export class DispatchReportDayRow {
/** @param {{Label?:string,Loads?:number,Revenue?:number,Pay?:number,Qty?:number,AvgCycleMins?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Label;
/** @type {number} */
Loads;
/** @type {number} */
Revenue;
/** @type {number} */
Pay;
/** @type {number} */
Qty;
/** @type {?number} */
AvgCycleMins;
}
export class DispatchReportModuleRow {
/** @param {{Module?:string,Loads?:number,Qty?:number,Revenue?:number,Pay?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Module;
/** @type {number} */
Loads;
/** @type {number} */
Qty;
/** @type {number} */
Revenue;
/** @type {number} */
Pay;
}
export class DispatchReportLaneRow {
/** @param {{SupplierName?:string,SourceLabel?:string,Loads?:number,Qty?:number,Revenue?:number,AvgCycleMins?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
SupplierName;
/** @type {string} */
SourceLabel;
/** @type {number} */
Loads;
/** @type {number} */
Qty;
/** @type {number} */
Revenue;
/** @type {?number} */
AvgCycleMins;
}
export class DispatchReportTruckRow {
/** @param {{TruckLabel?:string,DriverLabel?:string,Loads?:number,Qty?:number,Revenue?:number,Pay?:number,AvgCycleMins?:number,DaysActive?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
TruckLabel;
/** @type {string} */
DriverLabel;
/** @type {number} */
Loads;
/** @type {number} */
Qty;
/** @type {number} */
Revenue;
/** @type {number} */
Pay;
/** @type {?number} */
AvgCycleMins;
/** @type {number} */
DaysActive;
}
export class DispatchReportDriverRow {
/** @param {{Driver?:string,DriverContactId?:number,Loads?:number,Qty?:number,Pay?:number,DaysActive?:number,Unpriced?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Driver;
/** @type {?number} */
DriverContactId;
/** @type {number} */
Loads;
/** @type {number} */
Qty;
/** @type {number} */
Pay;
/** @type {number} */
DaysActive;
/** @type {number} */
Unpriced;
}
export class DispatchReportJobRow {
/** @param {{JobCode?:string,Customer?:string,Cargo?:string,Route?:string,Miles?:number,Revenue?:number,Pay?:number,MarginPct?:number,ClosedUtc?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
JobCode;
/** @type {string} */
Customer;
/** @type {string} */
Cargo;
/** @type {string} */
Route;
/** @type {number} */
Miles;
/** @type {?number} */
Revenue;
/** @type {?number} */
Pay;
/** @type {?number} */
MarginPct;
/** @type {?string} */
ClosedUtc;
}
export class DispatchReportIncidentRow {
/** @param {{Kind?:string,Opened?:number,Resolved?:number,AvgResolveMins?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Kind;
/** @type {number} */
Opened;
/** @type {number} */
Resolved;
/** @type {?number} */
AvgResolveMins;
}
export class DispatchReportHoldRow {
/** @param {{ScopeKind?:string,Holds?:number,PausedMins?:number,Weather?:number,FromIncidents?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
ScopeKind;
/** @type {number} */
Holds;
/** @type {number} */
PausedMins;
/** @type {number} */
Weather;
/** @type {number} */
FromIncidents;
}
export class DispatchReportResponse {
/** @param {{Stats?:DashboardStatTile[],Unit?:string,Trend?:DispatchReportDayRow[],ByModule?:DispatchReportModuleRow[],ByLane?:DispatchReportLaneRow[],ByTruck?:DispatchReportTruckRow[],ByDriver?:DispatchReportDriverRow[],Jobs?:DispatchReportJobRow[],Incidents?:DispatchReportIncidentRow[],Holds?:DispatchReportHoldRow[],ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {DashboardStatTile[]} */
Stats = [];
/** @type {string} */
Unit;
/** @type {DispatchReportDayRow[]} */
Trend = [];
/** @type {DispatchReportModuleRow[]} */
ByModule = [];
/** @type {DispatchReportLaneRow[]} */
ByLane = [];
/** @type {DispatchReportTruckRow[]} */
ByTruck = [];
/** @type {DispatchReportDriverRow[]} */
ByDriver = [];
/** @type {DispatchReportJobRow[]} */
Jobs = [];
/** @type {DispatchReportIncidentRow[]} */
Incidents = [];
/** @type {DispatchReportHoldRow[]} */
Holds = [];
/** @type {ResponseStatus} */
ResponseStatus;
}
export class DispatchReportRequest {
/** @param {{FromDate?:string,ToDate?:string,LocationIds?:string[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
FromDate;
/** @type {string} */
ToDate;
/** @type {string[]} */
LocationIds = [];
}
JavaScript DispatchReportRequest 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.
POST /v1/dashboard/dispatch HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
FromDate: 0001-01-01,
ToDate: 0001-01-01,
LocationIds:
[
00000000000000000000000000000000
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Stats:
[
{
Key: String,
Label: String,
Value: 0,
PreviousValue: 0,
Unit: String
}
],
Unit: String,
Trend:
[
{
Label: String,
Loads: 0,
Revenue: 0,
Pay: 0,
Qty: 0,
AvgCycleMins: 0
}
],
ByModule:
[
{
Module: String,
Loads: 0,
Qty: 0,
Revenue: 0,
Pay: 0
}
],
ByLane:
[
{
SupplierName: String,
SourceLabel: String,
Loads: 0,
Qty: 0,
Revenue: 0,
AvgCycleMins: 0
}
],
ByTruck:
[
{
TruckLabel: String,
DriverLabel: String,
Loads: 0,
Qty: 0,
Revenue: 0,
Pay: 0,
AvgCycleMins: 0,
DaysActive: 0
}
],
ByDriver:
[
{
Driver: String,
DriverContactId: 0,
Loads: 0,
Qty: 0,
Pay: 0,
DaysActive: 0,
Unpriced: 0
}
],
Jobs:
[
{
JobCode: String,
Customer: String,
Cargo: String,
Route: String,
Miles: 0,
Revenue: 0,
Pay: 0,
MarginPct: 0,
ClosedUtc: 0001-01-01
}
],
Incidents:
[
{
Kind: String,
Opened: 0,
Resolved: 0,
AvgResolveMins: 0
}
],
Holds:
[
{
ScopeKind: String,
Holds: 0,
PausedMins: 0,
Weather: 0,
FromIncidents: 0
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}