| GET,OPTIONS | /v1/dispatch/requests |
|---|
"use strict";
export class DispatchRequestEventView {
/** @param {{EventId?:number,Kind?:string,Detail?:string,AtUtc?:string,ByWho?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
EventId;
/** @type {string} */
Kind;
/** @type {string} */
Detail;
/** @type {string} */
AtUtc;
/** @type {string} */
ByWho;
}
export class DispatchRequestView {
/** @param {{RequestId?:number,Code?:string,CustomerName?:string,CustomerPhone?:string,CustomerEmail?:string,Cargo?:string,Units?:number,FromLoc?:string,ToLoc?:string,Miles?:number,WindowText?:string,IsUrgent?:boolean,Notes?:string,Source?:string,Status?:string,RequiredRig?:string,UnitsPerTruck?:number,RatePerLoad?:number,UrgencyPct?:number,CostPerLoad?:number,LoadsNeeded?:number,QuoteTotal?:number,QuoteVersion?:number,QuotedUtc?:string,QuotedBy?:string,AcceptTokenExpiresUtc?:string,AcceptedUtc?:string,AcceptedVia?:string,DeclinedUtc?:string,DeclinedBy?:string,DeclineReason?:string,JobsCreated?:number,JobsDone?:number,JobsNeedDriver?:number,CreatedUtc?:string,CreatedBy?:string,Events?:DispatchRequestEventView[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
RequestId;
/** @type {string} */
Code;
/** @type {string} */
CustomerName;
/** @type {string} */
CustomerPhone;
/** @type {string} */
CustomerEmail;
/** @type {string} */
Cargo;
/** @type {number} */
Units;
/** @type {string} */
FromLoc;
/** @type {string} */
ToLoc;
/** @type {?number} */
Miles;
/** @type {string} */
WindowText;
/** @type {boolean} */
IsUrgent;
/** @type {string} */
Notes;
/** @type {string} */
Source;
/** @type {string} */
Status;
/** @type {string} */
RequiredRig;
/** @type {?number} */
UnitsPerTruck;
/** @type {?number} */
RatePerLoad;
/** @type {number} */
UrgencyPct;
/** @type {?number} */
CostPerLoad;
/** @type {?number} */
LoadsNeeded;
/** @type {?number} */
QuoteTotal;
/** @type {number} */
QuoteVersion;
/** @type {?string} */
QuotedUtc;
/** @type {string} */
QuotedBy;
/** @type {?string} */
AcceptTokenExpiresUtc;
/** @type {?string} */
AcceptedUtc;
/** @type {string} */
AcceptedVia;
/** @type {?string} */
DeclinedUtc;
/** @type {string} */
DeclinedBy;
/** @type {string} */
DeclineReason;
/** @type {number} */
JobsCreated;
/** @type {number} */
JobsDone;
/** @type {number} */
JobsNeedDriver;
/** @type {string} */
CreatedUtc;
/** @type {string} */
CreatedBy;
/** @type {DispatchRequestEventView[]} */
Events = [];
}
export class DispatchRigCountView {
/** @param {{RigType?:string,Rigs?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
RigType;
/** @type {number} */
Rigs;
}
export class DispatchCarrierPickView {
/** @param {{VendorID?:number,VendorName?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
VendorID;
/** @type {string} */
VendorName;
}
export class DispatchRequestsResponse {
/** @param {{Requests?:DispatchRequestView[],Request?:DispatchRequestView,RigCounts?:DispatchRigCountView[],Carriers?:DispatchCarrierPickView[],QuoteLink?:string,Delivery?:string,ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {DispatchRequestView[]} */
Requests = [];
/** @type {DispatchRequestView} */
Request;
/** @type {DispatchRigCountView[]} */
RigCounts = [];
/** @type {DispatchCarrierPickView[]} */
Carriers = [];
/** @type {string} */
QuoteLink;
/** @type {string} */
Delivery;
/** @type {ResponseStatus} */
ResponseStatus;
}
export class DispatchRequestsRequest {
/** @param {{Days?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?number} */
Days;
}
JavaScript DispatchRequestsRequest 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/dispatch/requests HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Requests:
[
{
RequestId: 0,
Code: String,
CustomerName: String,
CustomerPhone: String,
CustomerEmail: String,
Cargo: String,
Units: 0,
FromLoc: String,
ToLoc: String,
Miles: 0,
WindowText: String,
IsUrgent: False,
Notes: String,
Source: String,
Status: String,
RequiredRig: String,
UnitsPerTruck: 0,
RatePerLoad: 0,
UrgencyPct: 0,
CostPerLoad: 0,
LoadsNeeded: 0,
QuoteTotal: 0,
QuoteVersion: 0,
QuotedUtc: 0001-01-01,
QuotedBy: String,
AcceptTokenExpiresUtc: 0001-01-01,
AcceptedUtc: 0001-01-01,
AcceptedVia: String,
DeclinedUtc: 0001-01-01,
DeclinedBy: String,
DeclineReason: String,
JobsCreated: 0,
JobsDone: 0,
JobsNeedDriver: 0,
CreatedUtc: 0001-01-01,
CreatedBy: String,
Events:
[
{
EventId: 0,
Kind: String,
Detail: String,
AtUtc: 0001-01-01,
ByWho: String
}
]
}
],
Request:
{
RequestId: 0,
Code: String,
CustomerName: String,
CustomerPhone: String,
CustomerEmail: String,
Cargo: String,
Units: 0,
FromLoc: String,
ToLoc: String,
Miles: 0,
WindowText: String,
IsUrgent: False,
Notes: String,
Source: String,
Status: String,
RequiredRig: String,
UnitsPerTruck: 0,
RatePerLoad: 0,
UrgencyPct: 0,
CostPerLoad: 0,
LoadsNeeded: 0,
QuoteTotal: 0,
QuoteVersion: 0,
QuotedUtc: 0001-01-01,
QuotedBy: String,
AcceptTokenExpiresUtc: 0001-01-01,
AcceptedUtc: 0001-01-01,
AcceptedVia: String,
DeclinedUtc: 0001-01-01,
DeclinedBy: String,
DeclineReason: String,
JobsCreated: 0,
JobsDone: 0,
JobsNeedDriver: 0,
CreatedUtc: 0001-01-01,
CreatedBy: String,
Events:
[
{
EventId: 0,
Kind: String,
Detail: String,
AtUtc: 0001-01-01,
ByWho: String
}
]
},
RigCounts:
[
{
RigType: String,
Rigs: 0
}
],
Carriers:
[
{
VendorID: 0,
VendorName: String
}
],
QuoteLink: String,
Delivery: String,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}