| Requires any of the permissions: | DISPATCH:HAUL:MANAGE, DISPATCH:JOB:MANAGE, DISPATCH:ONDEMAND:MANAGE |
| POST,OPTIONS | /v1/dispatch/incidents/{IncidentId}/truck |
|---|
"use strict";
export class DispatchIncidentMessageView {
/** @param {{MessageId?:number,Who?:string,Role?:string,Msg?:string,AtUtc?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
MessageId;
/** @type {string} */
Who;
/** @type {string} */
Role;
/** @type {string} */
Msg;
/** @type {string} */
AtUtc;
}
export class DispatchIncidentView {
/** @param {{IncidentId?:number,Code?:string,Kind?:string,KindDetail?:string,LoadId?:number,LoadCode?:string,LoadStatus?:string,SourceLabel?:string,DestinationLabel?:string,QtyText?:string,TruckCode?:string,TruckLabel?:string,LocationText?:string,Lat?:number,Lng?:number,DriverPref?:string,OpenedBy?:string,OpenedVia?:string,Resolver?:string,Status?:string,TruckRecovery?:string,TruckRecoveredUtc?:string,LoadRecovery?:string,LoadRecoveredUtc?:string,TransloadTruckCode?:string,HoldId?:number,HoldCode?:string,PhotoCount?:number,OpenedUtc?:string,ResolvedUtc?:string,ResolvedBy?:string,ReopenedUtc?:string,Messages?:DispatchIncidentMessageView[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
IncidentId;
/** @type {string} */
Code;
/** @type {string} */
Kind;
/** @type {string} */
KindDetail;
/** @type {?number} */
LoadId;
/** @type {string} */
LoadCode;
/** @type {string} */
LoadStatus;
/** @type {string} */
SourceLabel;
/** @type {string} */
DestinationLabel;
/** @type {string} */
QtyText;
/** @type {string} */
TruckCode;
/** @type {string} */
TruckLabel;
/** @type {string} */
LocationText;
/** @type {?number} */
Lat;
/** @type {?number} */
Lng;
/** @type {string} */
DriverPref;
/** @type {string} */
OpenedBy;
/** @type {string} */
OpenedVia;
/** @type {string} */
Resolver;
/** @type {string} */
Status;
/** @type {string} */
TruckRecovery;
/** @type {?string} */
TruckRecoveredUtc;
/** @type {string} */
LoadRecovery;
/** @type {?string} */
LoadRecoveredUtc;
/** @type {string} */
TransloadTruckCode;
/** @type {?number} */
HoldId;
/** @type {string} */
HoldCode;
/** @type {number} */
PhotoCount;
/** @type {string} */
OpenedUtc;
/** @type {?string} */
ResolvedUtc;
/** @type {string} */
ResolvedBy;
/** @type {?string} */
ReopenedUtc;
/** @type {DispatchIncidentMessageView[]} */
Messages = [];
}
export class DispatchIncidentTruckView {
/** @param {{Code?:string,DriverName?:string,Stage?:string,OpenLoadCode?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Code;
/** @type {string} */
DriverName;
/** @type {string} */
Stage;
/** @type {string} */
OpenLoadCode;
}
export class DispatchIncidentsResponse {
/** @param {{Incidents?:DispatchIncidentView[],EmptyTrucks?:DispatchIncidentTruckView[],Trucks?:DispatchIncidentTruckView[],TransloadTruckCode?:string,ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {DispatchIncidentView[]} */
Incidents = [];
/** @type {DispatchIncidentTruckView[]} */
EmptyTrucks = [];
/** @type {DispatchIncidentTruckView[]} */
Trucks = [];
/** @type {string} */
TransloadTruckCode;
/** @type {ResponseStatus} */
ResponseStatus;
}
export class DispatchIncidentTruckRequest {
/** @param {{IncidentId?:number,Action?:string,EtaText?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
IncidentId;
/** @type {string} */
Action;
/** @type {string} */
EtaText;
}
JavaScript DispatchIncidentTruckRequest 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/incidents/{IncidentId}/truck HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"IncidentId":0,"Action":"String","EtaText":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Incidents":[{"IncidentId":0,"Code":"String","Kind":"String","KindDetail":"String","LoadId":0,"LoadCode":"String","LoadStatus":"String","SourceLabel":"String","DestinationLabel":"String","QtyText":"String","TruckCode":"String","TruckLabel":"String","LocationText":"String","Lat":0,"Lng":0,"DriverPref":"String","OpenedBy":"String","OpenedVia":"String","Resolver":"String","Status":"String","TruckRecovery":"String","TruckRecoveredUtc":"0001-01-01T00:00:00.0000000","LoadRecovery":"String","LoadRecoveredUtc":"0001-01-01T00:00:00.0000000","TransloadTruckCode":"String","HoldId":0,"HoldCode":"String","PhotoCount":0,"OpenedUtc":"0001-01-01T00:00:00.0000000","ResolvedUtc":"0001-01-01T00:00:00.0000000","ResolvedBy":"String","ReopenedUtc":"0001-01-01T00:00:00.0000000","Messages":[{"MessageId":0,"Who":"String","Role":"String","Msg":"String","AtUtc":"0001-01-01T00:00:00.0000000"}]}],"EmptyTrucks":[{"Code":"String","DriverName":"String","Stage":"String","OpenLoadCode":"String"}],"Trucks":[{"Code":"String","DriverName":"String","Stage":"String","OpenLoadCode":"String"}],"TransloadTruckCode":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}