| POST,OPTIONS | /v1/dispatch/track/{Token}/cancel |
|---|
"use strict";
export class CourierTrackActRequest {
/** @param {{Token?:string,ActToken?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Token;
/** @type {string} */
ActToken;
}
export class DispatchTrackStepView {
/** @param {{Name?:string,At?:string,Done?:boolean,Current?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Name;
/** @type {?string} */
At;
/** @type {boolean} */
Done;
/** @type {boolean} */
Current;
}
export class CourierTrackBusiness {
/** @param {{Name?:string,Phone?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Name;
/** @type {string} */
Phone;
}
export class CourierTrackDriver {
/** @param {{FirstName?:string,Initial?:string,Vehicle?:string,Plate?:string,EtaMin?:number,EtaPct?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
FirstName;
/** @type {string} */
Initial;
/** @type {string} */
Vehicle;
/** @type {string} */
Plate;
/** @type {?number} */
EtaMin;
/** @type {?number} */
EtaPct;
}
export class CourierTrackProof {
/** @param {{Kind?:string,PhotoUrl?:string,AtText?:string,GpsOk?:boolean,Units?:number,DamageNote?:string,DeliveredTo?:string,WaitedMin?:number,Attempts?:number,ContactedText?:string,EachTagged?:boolean,EachScanned?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Kind;
/** @type {string} */
PhotoUrl;
/** @type {string} */
AtText;
/** @type {boolean} */
GpsOk;
/** @type {number} */
Units;
/** @type {string} */
DamageNote;
/** @type {string} */
DeliveredTo;
/** @type {number} */
WaitedMin;
/** @type {number} */
Attempts;
/** @type {string} */
ContactedText;
/** @type {boolean} */
EachTagged;
/** @type {boolean} */
EachScanned;
}
export class CourierTrackRating {
/** @param {{Stars?:number,Tags?:string,Tip?:number,TipStatus?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Stars;
/** @type {string} */
Tags;
/** @type {number} */
Tip;
/** @type {string} */
TipStatus;
}
export class CourierTrackSlot {
/** @param {{Id?:string,Day?:string,DayEs?:string,Win?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
Day;
/** @type {string} */
DayEs;
/** @type {string} */
Win;
}
export class CourierTrackMissed {
/** @param {{Code?:string,Fee?:number,WaitedMin?:number,AutoRebook?:boolean,RebookWindowText?:string,Slots?:CourierTrackSlot[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Code;
/** @type {number} */
Fee;
/** @type {number} */
WaitedMin;
/** @type {boolean} */
AutoRebook;
/** @type {string} */
RebookWindowText;
/** @type {CourierTrackSlot[]} */
Slots = [];
}
export class CourierTrackCan {
/** @param {{EditInstructions?:boolean,ChangeUnits?:boolean,Cancel?:boolean,RescheduleDelivery?:boolean,Rebook?:boolean,Rate?:boolean,Message?:boolean,Report?:boolean,MaxUnits?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
EditInstructions;
/** @type {boolean} */
ChangeUnits;
/** @type {boolean} */
Cancel;
/** @type {boolean} */
RescheduleDelivery;
/** @type {boolean} */
Rebook;
/** @type {boolean} */
Rate;
/** @type {boolean} */
Message;
/** @type {boolean} */
Report;
/** @type {number} */
MaxUnits;
}
export class CourierTrackMessage {
/** @param {{Who?:string,Mine?:boolean,Office?:boolean,AtText?:string,Body?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Who;
/** @type {boolean} */
Mine;
/** @type {boolean} */
Office;
/** @type {string} */
AtText;
/** @type {string} */
Body;
}
export class CourierTrackView {
/** @param {{State?:string,Code?:string,RunCode?:string,Shape?:string,Template?:string,CourierStep?:string,UnitOne?:string,UnitMany?:string,UnitOneEs?:string,UnitManyEs?:string,FacilityNoun?:string,FacilityNounEs?:string,Units?:number,UnitsCounted?:boolean,Address?:string,DropoffAddress?:string,DropoffName?:string,Instructions?:string,GateCode?:string,Handoff?:string,LevelName?:string,ReadyPromise?:string,WindowText?:string,IsAsap?:boolean,Times?:{ [index:string]: string; },StopPosition?:number,StopCount?:number,DeliveryWindowText?:string,Driver?:CourierTrackDriver,Proof?:CourierTrackProof,HandoffCode?:string,Rating?:CourierTrackRating,TipAllowed?:boolean,TipsPct?:number,Missed?:CourierTrackMissed,CancelFee?:number,CancelFeeCharged?:number,CancelledBy?:string,BookUrl?:string,Can?:CourierTrackCan,DeliverySlots?:CourierTrackSlot[],Messages?:CourierTrackMessage[],MessagesOpen?:boolean,CaseCode?:string,CaseStatus?:string,CaseReply?:string,ThreadHrs?:number,ExpiresUtc?:string,LiveEta?:boolean,Live?:boolean,ServerUtc?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
State;
/** @type {string} */
Code;
/** @type {string} */
RunCode;
/** @type {string} */
Shape;
/** @type {string} */
Template;
/** @type {string} */
CourierStep;
/** @type {string} */
UnitOne;
/** @type {string} */
UnitMany;
/** @type {string} */
UnitOneEs;
/** @type {string} */
UnitManyEs;
/** @type {string} */
FacilityNoun;
/** @type {string} */
FacilityNounEs;
/** @type {number} */
Units;
/** @type {boolean} */
UnitsCounted;
/** @type {string} */
Address;
/** @type {string} */
DropoffAddress;
/** @type {string} */
DropoffName;
/** @type {string} */
Instructions;
/** @type {string} */
GateCode;
/** @type {string} */
Handoff;
/** @type {string} */
LevelName;
/** @type {string} */
ReadyPromise;
/** @type {string} */
WindowText;
/** @type {boolean} */
IsAsap;
/** @type {{ [index:string]: string; }} */
Times = {};
/** @type {?number} */
StopPosition;
/** @type {?number} */
StopCount;
/** @type {string} */
DeliveryWindowText;
/** @type {CourierTrackDriver} */
Driver;
/** @type {CourierTrackProof} */
Proof;
/** @type {string} */
HandoffCode;
/** @type {CourierTrackRating} */
Rating;
/** @type {boolean} */
TipAllowed;
/** @type {number} */
TipsPct;
/** @type {CourierTrackMissed} */
Missed;
/** @type {number} */
CancelFee;
/** @type {number} */
CancelFeeCharged;
/** @type {string} */
CancelledBy;
/** @type {string} */
BookUrl;
/** @type {CourierTrackCan} */
Can;
/** @type {CourierTrackSlot[]} */
DeliverySlots = [];
/** @type {CourierTrackMessage[]} */
Messages = [];
/** @type {boolean} */
MessagesOpen;
/** @type {string} */
CaseCode;
/** @type {string} */
CaseStatus;
/** @type {string} */
CaseReply;
/** @type {number} */
ThreadHrs;
/** @type {?string} */
ExpiresUtc;
/** @type {boolean} */
LiveEta;
/** @type {boolean} */
Live;
/** @type {string} */
ServerUtc;
}
export class DispatchTrackResponse {
/** @param {{Kind?:string,Code?:string,What?:string,FromLoc?:string,ToLoc?:string,Bags?:number,Fare?:number,PayMode?:string,CardLast4?:string,Charged?:boolean,Stage?:string,Headline?:string,Sub?:string,IsClosed?:boolean,Eta?:string,DriverName?:string,CustomerName?:string,Steps?:DispatchTrackStepView[],Expired?:boolean,Invalid?:boolean,Business?:CourierTrackBusiness,Courier?:CourierTrackView,Notice?:string,ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Kind;
/** @type {string} */
Code;
/** @type {string} */
What;
/** @type {string} */
FromLoc;
/** @type {string} */
ToLoc;
/** @type {?number} */
Bags;
/** @type {?number} */
Fare;
/** @type {string} */
PayMode;
/** @type {string} */
CardLast4;
/** @type {boolean} */
Charged;
/** @type {string} */
Stage;
/** @type {string} */
Headline;
/** @type {string} */
Sub;
/** @type {boolean} */
IsClosed;
/** @type {string} */
Eta;
/** @type {string} */
DriverName;
/** @type {string} */
CustomerName;
/** @type {DispatchTrackStepView[]} */
Steps = [];
/** @type {boolean} */
Expired;
/** @type {boolean} */
Invalid;
/** @type {CourierTrackBusiness} */
Business;
/** @type {CourierTrackView} */
Courier;
/** @type {string} */
Notice;
/** @type {ResponseStatus} */
ResponseStatus;
}
export class CourierTrackCancelRequest extends CourierTrackActRequest {
/** @param {{ExpectedFee?:number,Token?:string,ActToken?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {?number} */
ExpectedFee;
}
JavaScript CourierTrackCancelRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/dispatch/track/{Token}/cancel HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"ExpectedFee":0,"Token":"String","ActToken":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Kind":"String","Code":"String","What":"String","FromLoc":"String","ToLoc":"String","Bags":0,"Fare":0,"PayMode":"String","CardLast4":"String","Charged":false,"Stage":"String","Headline":"String","Sub":"String","IsClosed":false,"Eta":"String","DriverName":"String","CustomerName":"String","Steps":[{"Name":"String","At":"0001-01-01T00:00:00.0000000","Done":false,"Current":false}],"Expired":false,"Invalid":false,"Business":{"Name":"String","Phone":"String"},"Courier":{"State":"String","Code":"String","RunCode":"String","Shape":"String","Template":"String","CourierStep":"String","UnitOne":"String","UnitMany":"String","UnitOneEs":"String","UnitManyEs":"String","FacilityNoun":"String","FacilityNounEs":"String","Units":0,"UnitsCounted":false,"Address":"String","DropoffAddress":"String","DropoffName":"String","Instructions":"String","GateCode":"String","Handoff":"String","LevelName":"String","ReadyPromise":"String","WindowText":"String","IsAsap":false,"Times":{"String":"String"},"StopPosition":0,"StopCount":0,"DeliveryWindowText":"String","Driver":{"FirstName":"String","Initial":"String","Vehicle":"String","Plate":"String","EtaMin":0,"EtaPct":0},"Proof":{"Kind":"String","PhotoUrl":"String","AtText":"String","GpsOk":false,"Units":0,"DamageNote":"String","DeliveredTo":"String","WaitedMin":0,"Attempts":0,"ContactedText":"String","EachTagged":false,"EachScanned":false},"HandoffCode":"String","Rating":{"Stars":0,"Tags":"String","Tip":0,"TipStatus":"String"},"TipAllowed":false,"TipsPct":0,"Missed":{"Code":"String","Fee":0,"WaitedMin":0,"AutoRebook":false,"RebookWindowText":"String","Slots":[{"Id":"String","Day":"String","DayEs":"String","Win":"String"}]},"CancelFee":0,"CancelFeeCharged":0,"CancelledBy":"String","BookUrl":"String","Can":{"EditInstructions":false,"ChangeUnits":false,"Cancel":false,"RescheduleDelivery":false,"Rebook":false,"Rate":false,"Message":false,"Report":false,"MaxUnits":0},"DeliverySlots":[{"Id":"String","Day":"String","DayEs":"String","Win":"String"}],"Messages":[{"Who":"String","Mine":false,"Office":false,"AtText":"String","Body":"String"}],"MessagesOpen":false,"CaseCode":"String","CaseStatus":"String","CaseReply":"String","ThreadHrs":0,"ExpiresUtc":"0001-01-01T00:00:00.0000000","LiveEta":false,"Live":false,"ServerUtc":"0001-01-01T00:00:00.0000000"},"Notice":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}