| POST,OPTIONS | /v1/dispatch/requests/{RequestId}/accept |
|---|
"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 DispatchRequestAcceptRequest {
/** @param {{RequestId?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
RequestId;
}
JavaScript DispatchRequestAcceptRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/dispatch/requests/{RequestId}/accept HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"RequestId":0}
HTTP/1.1 200 OK
Content-Type: text/csv
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-01T00:00:00.0000000","QuotedBy":"String","AcceptTokenExpiresUtc":"0001-01-01T00:00:00.0000000","AcceptedUtc":"0001-01-01T00:00:00.0000000","AcceptedVia":"String","DeclinedUtc":"0001-01-01T00:00:00.0000000","DeclinedBy":"String","DeclineReason":"String","JobsCreated":0,"JobsDone":0,"JobsNeedDriver":0,"CreatedUtc":"0001-01-01T00:00:00.0000000","CreatedBy":"String","Events":[{"EventId":0,"Kind":"String","Detail":"String","AtUtc":"0001-01-01T00:00:00.0000000","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-01T00:00:00.0000000","QuotedBy":"String","AcceptTokenExpiresUtc":"0001-01-01T00:00:00.0000000","AcceptedUtc":"0001-01-01T00:00:00.0000000","AcceptedVia":"String","DeclinedUtc":"0001-01-01T00:00:00.0000000","DeclinedBy":"String","DeclineReason":"String","JobsCreated":0,"JobsDone":0,"JobsNeedDriver":0,"CreatedUtc":"0001-01-01T00:00:00.0000000","CreatedBy":"String","Events":[{"EventId":0,"Kind":"String","Detail":"String","AtUtc":"0001-01-01T00:00:00.0000000","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"}}}