| POST,OPTIONS | /v1/worker/dispatch/od/{Code}/deliver |
|---|
"use strict";
export class CourierVanView {
/** @param {{State?:string,LeaveByUtc?:string,LeaveByText?:string,SlackMin?:number,InVan?:number,Committed?:number,Cap?:number,CapUnit?:string,VehicleUnit?:string,CriticalCode?:string,DriveMin?:number,FacilityName?:string,SendNote?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
State;
/** @type {?string} */
LeaveByUtc;
/** @type {string} */
LeaveByText;
/** @type {?number} */
SlackMin;
/** @type {number} */
InVan;
/** @type {number} */
Committed;
/** @type {?number} */
Cap;
/** @type {string} */
CapUnit;
/** @type {string} */
VehicleUnit;
/** @type {string} */
CriticalCode;
/** @type {number} */
DriveMin;
/** @type {string} */
FacilityName;
/** @type {string} */
SendNote;
}
export class CourierItemView {
/** @param {{CourierItemID?:number,DispatchOdRequestID?:number,Seq?:number,TagCode?:string,Custody?:string,IsOpen?:boolean,IsMissing?:boolean,MissingReason?:string,IsManual?:boolean,ReTagFlag?:boolean,Scanned?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
CourierItemID;
/** @type {number} */
DispatchOdRequestID;
/** @type {number} */
Seq;
/** @type {string} */
TagCode;
/** @type {string} */
Custody;
/** @type {boolean} */
IsOpen;
/** @type {boolean} */
IsMissing;
/** @type {string} */
MissingReason;
/** @type {boolean} */
IsManual;
/** @type {boolean} */
ReTagFlag;
/** @type {boolean} */
Scanned;
}
export class CourierDriverOrder {
/** @param {{Code?:string,CourierStep?:string,RouteShape?:string,ProfileName?:string,UnitOne?:string,UnitMany?:string,FacilityNoun?:string,FacilityName?:string,LevelName?:string,DueUtc?:string,DueText?:string,Units?:number,UnitsFound?:number,Area?:string,Minutes?:number,Address?:string,Unit?:string,City?:string,Lat?:number,Lng?:number,CustomerName?:string,CustomerPhone?:string,Handoff?:string,GateCode?:string,Instructions?:string,DropoffAddress?:string,DropoffContactName?:string,DropLat?:number,DropLng?:number,ArrivedUtc?:string,Tags?:CourierItemView[],Proof?:{ [index:string]: string; },Photos?:{ [index:string]: number; },Needs?:string[],MissedWaitMin?:number,MissedRequireContact?:boolean,MissedRequirePhoto?:boolean,MissedFee?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Code;
/** @type {string} */
CourierStep;
/** @type {string} */
RouteShape;
/** @type {string} */
ProfileName;
/** @type {string} */
UnitOne;
/** @type {string} */
UnitMany;
/** @type {string} */
FacilityNoun;
/** @type {string} */
FacilityName;
/** @type {string} */
LevelName;
/** @type {?string} */
DueUtc;
/** @type {string} */
DueText;
/** @type {number} */
Units;
/** @type {?number} */
UnitsFound;
/** @type {string} */
Area;
/** @type {?number} */
Minutes;
/** @type {string} */
Address;
/** @type {string} */
Unit;
/** @type {string} */
City;
/** @type {?number} */
Lat;
/** @type {?number} */
Lng;
/** @type {string} */
CustomerName;
/** @type {string} */
CustomerPhone;
/** @type {string} */
Handoff;
/** @type {string} */
GateCode;
/** @type {string} */
Instructions;
/** @type {string} */
DropoffAddress;
/** @type {string} */
DropoffContactName;
/** @type {?number} */
DropLat;
/** @type {?number} */
DropLng;
/** @type {?string} */
ArrivedUtc;
/** @type {CourierItemView[]} */
Tags = [];
/** @type {{ [index:string]: string; }} */
Proof = {};
/** @type {{ [index:string]: number; }} */
Photos = {};
/** @type {string[]} */
Needs = [];
/** @type {number} */
MissedWaitMin;
/** @type {boolean} */
MissedRequireContact;
/** @type {boolean} */
MissedRequirePhoto;
/** @type {number} */
MissedFee;
}
export class CourierStopView {
/** @param {{Sequence?:number,Status?:string,DispatchOdRequestID?:number,Code?:string,CourierStep?:string,Address?:string,Unit?:string,City?:string,Zip?:string,Lat?:number,Lng?:number,CustomerName?:string,CustomerPhone?:string,Handoff?:string,GateCode?:string,Instructions?:string,Units?:number,DueText?:string,Note?:string,Needs?:string[],Items?:CourierItemView[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Sequence;
/** @type {string} */
Status;
/** @type {number} */
DispatchOdRequestID;
/** @type {string} */
Code;
/** @type {string} */
CourierStep;
/** @type {string} */
Address;
/** @type {string} */
Unit;
/** @type {string} */
City;
/** @type {string} */
Zip;
/** @type {?number} */
Lat;
/** @type {?number} */
Lng;
/** @type {string} */
CustomerName;
/** @type {string} */
CustomerPhone;
/** @type {string} */
Handoff;
/** @type {string} */
GateCode;
/** @type {string} */
Instructions;
/** @type {number} */
Units;
/** @type {string} */
DueText;
/** @type {string} */
Note;
/** @type {string[]} */
Needs = [];
/** @type {CourierItemView[]} */
Items = [];
}
export class CourierRunView {
/** @param {{CourierRunID?:number,Code?:string,Status?:string,CourierProfileId?:number,ProfileName?:string,CourierFacilityId?:number,FacilityName?:string,FacilityAddress?:string,DriverContactId?:number,DriverName?:string,EquipmentID?:number,VehicleUnit?:string,UnitOne?:string,UnitMany?:string,Units?:number,StopCount?:number,StopsDone?:number,Pay?:number,BuiltUtc?:string,StartedUtc?:string,CompletedUtc?:string,ToLoad?:number,ToReturn?:number,Stops?:CourierStopView[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
CourierRunID;
/** @type {string} */
Code;
/** @type {string} */
Status;
/** @type {number} */
CourierProfileId;
/** @type {string} */
ProfileName;
/** @type {number} */
CourierFacilityId;
/** @type {string} */
FacilityName;
/** @type {string} */
FacilityAddress;
/** @type {?number} */
DriverContactId;
/** @type {string} */
DriverName;
/** @type {?number} */
EquipmentID;
/** @type {string} */
VehicleUnit;
/** @type {string} */
UnitOne;
/** @type {string} */
UnitMany;
/** @type {number} */
Units;
/** @type {number} */
StopCount;
/** @type {number} */
StopsDone;
/** @type {?number} */
Pay;
/** @type {?string} */
BuiltUtc;
/** @type {?string} */
StartedUtc;
/** @type {?string} */
CompletedUtc;
/** @type {number} */
ToLoad;
/** @type {number} */
ToReturn;
/** @type {CourierStopView[]} */
Stops = [];
}
export class CourierDriverView {
/** @param {{DriverCode?:string,Name?:string,Online?:boolean,OnRoster?:boolean,Van?:CourierVanView,Current?:CourierDriverOrder,Queue?:CourierDriverOrder[],Aboard?:CourierDriverOrder[],Runs?:CourierRunView[],UpNext?:CourierDriverOrder}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
DriverCode;
/** @type {string} */
Name;
/** @type {boolean} */
Online;
/** @type {boolean} */
OnRoster;
/** @type {CourierVanView} */
Van;
/** @type {CourierDriverOrder} */
Current;
/** @type {CourierDriverOrder[]} */
Queue = [];
/** @type {CourierDriverOrder[]} */
Aboard = [];
/** @type {CourierRunView[]} */
Runs = [];
/** @type {CourierDriverOrder} */
UpNext;
}
export class CourierDriverResponse {
/** @param {{Courier?:CourierDriverView,Result?:string,Detail?:string,Message?:string,ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {CourierDriverView} */
Courier;
/** @type {string} */
Result;
/** @type {string} */
Detail;
/** @type {string} */
Message;
/** @type {ResponseStatus} */
ResponseStatus;
}
export class CourierDeliveryProof {
/** @param {{HandToName?:string,Signature?:string,CodeOk?:boolean,IdOk?:boolean,TempF?:number,Seal?:string,Collected?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
HandToName;
/** @type {string} */
Signature;
/** @type {boolean} */
CodeOk;
/** @type {boolean} */
IdOk;
/** @type {?number} */
TempF;
/** @type {string} */
Seal;
/** @type {?number} */
Collected;
}
export class CourierDeliverRequest {
/** @param {{Code?:string,Proof?:CourierDeliveryProof}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Code;
/** @type {CourierDeliveryProof} */
Proof;
}
JavaScript CourierDeliverRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/worker/dispatch/od/{Code}/deliver HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Code":"String","Proof":{"HandToName":"String","Signature":"String","CodeOk":false,"IdOk":false,"TempF":0,"Seal":"String","Collected":0}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Courier":{"DriverCode":"String","Name":"String","Online":false,"OnRoster":false,"Van":{"State":"String","LeaveByUtc":"0001-01-01T00:00:00.0000000","LeaveByText":"String","SlackMin":0,"InVan":0,"Committed":0,"Cap":0,"CapUnit":"String","VehicleUnit":"String","CriticalCode":"String","DriveMin":0,"FacilityName":"String","SendNote":"String"},"Current":{"Code":"String","CourierStep":"String","RouteShape":"String","ProfileName":"String","UnitOne":"String","UnitMany":"String","FacilityNoun":"String","FacilityName":"String","LevelName":"String","DueUtc":"0001-01-01T00:00:00.0000000","DueText":"String","Units":0,"UnitsFound":0,"Area":"String","Minutes":0,"Address":"String","Unit":"String","City":"String","Lat":0,"Lng":0,"CustomerName":"String","CustomerPhone":"String","Handoff":"String","GateCode":"String","Instructions":"String","DropoffAddress":"String","DropoffContactName":"String","DropLat":0,"DropLng":0,"ArrivedUtc":"0001-01-01T00:00:00.0000000","Tags":[{"CourierItemID":0,"DispatchOdRequestID":0,"Seq":0,"TagCode":"String","Custody":"String","IsOpen":false,"IsMissing":false,"MissingReason":"String","IsManual":false,"ReTagFlag":false,"Scanned":false}],"Proof":{"String":"String"},"Photos":{"String":0},"Needs":["String"],"MissedWaitMin":0,"MissedRequireContact":false,"MissedRequirePhoto":false,"MissedFee":0},"Queue":[{"Code":"String","CourierStep":"String","RouteShape":"String","ProfileName":"String","UnitOne":"String","UnitMany":"String","FacilityNoun":"String","FacilityName":"String","LevelName":"String","DueUtc":"0001-01-01T00:00:00.0000000","DueText":"String","Units":0,"UnitsFound":0,"Area":"String","Minutes":0,"Address":"String","Unit":"String","City":"String","Lat":0,"Lng":0,"CustomerName":"String","CustomerPhone":"String","Handoff":"String","GateCode":"String","Instructions":"String","DropoffAddress":"String","DropoffContactName":"String","DropLat":0,"DropLng":0,"ArrivedUtc":"0001-01-01T00:00:00.0000000","Tags":[{"CourierItemID":0,"DispatchOdRequestID":0,"Seq":0,"TagCode":"String","Custody":"String","IsOpen":false,"IsMissing":false,"MissingReason":"String","IsManual":false,"ReTagFlag":false,"Scanned":false}],"Proof":{"String":"String"},"Photos":{"String":0},"Needs":["String"],"MissedWaitMin":0,"MissedRequireContact":false,"MissedRequirePhoto":false,"MissedFee":0}],"Aboard":[{"Code":"String","CourierStep":"String","RouteShape":"String","ProfileName":"String","UnitOne":"String","UnitMany":"String","FacilityNoun":"String","FacilityName":"String","LevelName":"String","DueUtc":"0001-01-01T00:00:00.0000000","DueText":"String","Units":0,"UnitsFound":0,"Area":"String","Minutes":0,"Address":"String","Unit":"String","City":"String","Lat":0,"Lng":0,"CustomerName":"String","CustomerPhone":"String","Handoff":"String","GateCode":"String","Instructions":"String","DropoffAddress":"String","DropoffContactName":"String","DropLat":0,"DropLng":0,"ArrivedUtc":"0001-01-01T00:00:00.0000000","Tags":[{"CourierItemID":0,"DispatchOdRequestID":0,"Seq":0,"TagCode":"String","Custody":"String","IsOpen":false,"IsMissing":false,"MissingReason":"String","IsManual":false,"ReTagFlag":false,"Scanned":false}],"Proof":{"String":"String"},"Photos":{"String":0},"Needs":["String"],"MissedWaitMin":0,"MissedRequireContact":false,"MissedRequirePhoto":false,"MissedFee":0}],"Runs":[{"CourierRunID":0,"Code":"String","Status":"String","CourierProfileId":0,"ProfileName":"String","CourierFacilityId":0,"FacilityName":"String","FacilityAddress":"String","DriverContactId":0,"DriverName":"String","EquipmentID":0,"VehicleUnit":"String","UnitOne":"String","UnitMany":"String","Units":0,"StopCount":0,"StopsDone":0,"Pay":0,"BuiltUtc":"0001-01-01T00:00:00.0000000","StartedUtc":"0001-01-01T00:00:00.0000000","CompletedUtc":"0001-01-01T00:00:00.0000000","ToLoad":0,"ToReturn":0,"Stops":[{"Sequence":0,"Status":"String","DispatchOdRequestID":0,"Code":"String","CourierStep":"String","Address":"String","Unit":"String","City":"String","Zip":"String","Lat":0,"Lng":0,"CustomerName":"String","CustomerPhone":"String","Handoff":"String","GateCode":"String","Instructions":"String","Units":0,"DueText":"String","Note":"String","Needs":["String"],"Items":[{"CourierItemID":0,"DispatchOdRequestID":0,"Seq":0,"TagCode":"String","Custody":"String","IsOpen":false,"IsMissing":false,"MissingReason":"String","IsManual":false,"ReTagFlag":false,"Scanned":false}]}]}],"UpNext":{"Code":"String","CourierStep":"String","RouteShape":"String","ProfileName":"String","UnitOne":"String","UnitMany":"String","FacilityNoun":"String","FacilityName":"String","LevelName":"String","DueUtc":"0001-01-01T00:00:00.0000000","DueText":"String","Units":0,"UnitsFound":0,"Area":"String","Minutes":0,"Address":"String","Unit":"String","City":"String","Lat":0,"Lng":0,"CustomerName":"String","CustomerPhone":"String","Handoff":"String","GateCode":"String","Instructions":"String","DropoffAddress":"String","DropoffContactName":"String","DropLat":0,"DropLng":0,"ArrivedUtc":"0001-01-01T00:00:00.0000000","Tags":[{"CourierItemID":0,"DispatchOdRequestID":0,"Seq":0,"TagCode":"String","Custody":"String","IsOpen":false,"IsMissing":false,"MissingReason":"String","IsManual":false,"ReTagFlag":false,"Scanned":false}],"Proof":{"String":"String"},"Photos":{"String":0},"Needs":["String"],"MissedWaitMin":0,"MissedRequireContact":false,"MissedRequirePhoto":false,"MissedFee":0}},"Result":"String","Detail":"String","Message":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}