Trendsic Platform Service

<back to all web services

CourierStopReturnRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/worker/dispatch/od/runs/{RunId}/stops/{Seq}/return
"use strict";
export class CourierVanView {
    /** @param {{State?:string,LeaveByUtc?:string,LeaveByText?:string,SlackMin?:number,InVan?:number,Committed?:number,Delivery?:number,Cap?:number,CapUnit?:string,VehicleUnit?:string,CriticalCode?:string,DriveMin?:number,FacilityName?:string,SendNote?:string,GoMin?:number,LastMin?:number,NearFull?:number,MarginMin?:number,IntakeMin?:number,FacilityAddress?:string,FacilityLat?:number,FacilityLng?:number}} [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} */
    Delivery;
    /** @type {?number} */
    Cap;
    /** @type {string} */
    CapUnit;
    /** @type {string} */
    VehicleUnit;
    /** @type {string} */
    CriticalCode;
    /** @type {number} */
    DriveMin;
    /** @type {string} */
    FacilityName;
    /** @type {string} */
    SendNote;
    /** @type {number} */
    GoMin;
    /** @type {number} */
    LastMin;
    /** @type {number} */
    NearFull;
    /** @type {number} */
    MarginMin;
    /** @type {number} */
    IntakeMin;
    /** @type {string} */
    FacilityAddress;
    /** @type {?number} */
    FacilityLat;
    /** @type {?number} */
    FacilityLng;
}
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 CourierPhotoView {
    /** @param {{PhotoId?:number,Kind?:string,FileName?:string,Url?:string,TakenUtc?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    PhotoId;
    /** @type {string} */
    Kind;
    /** @type {string} */
    FileName;
    /** @type {string} */
    Url;
    /** @type {?string} */
    TakenUtc;
}
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,Zip?:string,CourierFacilityId?:number,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,DispatchOdRequestID?:number,UnitOneEs?:string,UnitManyEs?:string,FacilityNounEs?:string,PerPickup?:number,WaitAfterMin?:number,WaitPerMin?:number,DropoffZip?:string,DamageNote?:string,PickedUpUtc?:string,PhotoList?:CourierPhotoView[]}} [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 {string} */
    Zip;
    /** @type {?number} */
    CourierFacilityId;
    /** @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;
    /** @type {number} */
    DispatchOdRequestID;
    /** @type {string} */
    UnitOneEs;
    /** @type {string} */
    UnitManyEs;
    /** @type {string} */
    FacilityNounEs;
    /** @type {?number} */
    PerPickup;
    /** @type {?number} */
    WaitAfterMin;
    /** @type {?number} */
    WaitPerMin;
    /** @type {string} */
    DropoffZip;
    /** @type {string} */
    DamageNote;
    /** @type {?string} */
    PickedUpUtc;
    /** @type {CourierPhotoView[]} */
    PhotoList = [];
}
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[],Proof?:{ [index:string]: string; },Photos?:number,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 {{ [index:string]: string; }} */
    Proof = {};
    /** @type {number} */
    Photos;
    /** @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,UnitOneEs?:string,UnitManyEs?:string,FacilityNoun?:string,FacilityNounEs?:string,FacilityLat?:number,FacilityLng?:number,Units?:number,StopCount?:number,StopsDone?:number,Pay?:number,BuiltUtc?:string,StartedUtc?:string,CompletedUtc?:string,ToLoad?:number,ToReturn?:number,Shelf?:string,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 {string} */
    UnitOneEs;
    /** @type {string} */
    UnitManyEs;
    /** @type {string} */
    FacilityNoun;
    /** @type {string} */
    FacilityNounEs;
    /** @type {?number} */
    FacilityLat;
    /** @type {?number} */
    FacilityLng;
    /** @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 {string} */
    Shelf;
    /** @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,RadiusMi?:number,PingRadiusMi?:number,PingRadiusUntilUtc?:string,HideAddressesInHistory?:boolean}} [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;
    /** @type {?number} */
    RadiusMi;
    /** @type {?number} */
    PingRadiusMi;
    /** @type {?string} */
    PingRadiusUntilUtc;
    /** @type {boolean} */
    HideAddressesInHistory;
}
export class CourierDriverResponse {
    /** @param {{Courier?:CourierDriverView,ServerUtc?:string,Result?:string,Detail?:string,Message?:string,PhotoId?:number,ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {CourierDriverView} */
    Courier;
    /** @type {string} */
    ServerUtc;
    /** @type {string} */
    Result;
    /** @type {string} */
    Detail;
    /** @type {string} */
    Message;
    /** @type {?number} */
    PhotoId;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class CourierStopReturnRequest {
    /** @param {{RunId?:number,Seq?:number,Reason?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    RunId;
    /** @type {number} */
    Seq;
    /** @type {string} */
    Reason;
}

JavaScript CourierStopReturnRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/worker/dispatch/od/runs/{RunId}/stops/{Seq}/return HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"RunId":0,"Seq":0,"Reason":"String"}
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,"Delivery":0,"Cap":0,"CapUnit":"String","VehicleUnit":"String","CriticalCode":"String","DriveMin":0,"FacilityName":"String","SendNote":"String","GoMin":0,"LastMin":0,"NearFull":0,"MarginMin":0,"IntakeMin":0,"FacilityAddress":"String","FacilityLat":0,"FacilityLng":0},"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","Zip":"String","CourierFacilityId":0,"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,"DispatchOdRequestID":0,"UnitOneEs":"String","UnitManyEs":"String","FacilityNounEs":"String","PerPickup":0,"WaitAfterMin":0,"WaitPerMin":0,"DropoffZip":"String","DamageNote":"String","PickedUpUtc":"0001-01-01T00:00:00.0000000","PhotoList":[{"PhotoId":0,"Kind":"String","FileName":"String","Url":"String","TakenUtc":"0001-01-01T00:00:00.0000000"}]},"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","Zip":"String","CourierFacilityId":0,"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,"DispatchOdRequestID":0,"UnitOneEs":"String","UnitManyEs":"String","FacilityNounEs":"String","PerPickup":0,"WaitAfterMin":0,"WaitPerMin":0,"DropoffZip":"String","DamageNote":"String","PickedUpUtc":"0001-01-01T00:00:00.0000000","PhotoList":[{"PhotoId":0,"Kind":"String","FileName":"String","Url":"String","TakenUtc":"0001-01-01T00:00:00.0000000"}]}],"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","Zip":"String","CourierFacilityId":0,"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,"DispatchOdRequestID":0,"UnitOneEs":"String","UnitManyEs":"String","FacilityNounEs":"String","PerPickup":0,"WaitAfterMin":0,"WaitPerMin":0,"DropoffZip":"String","DamageNote":"String","PickedUpUtc":"0001-01-01T00:00:00.0000000","PhotoList":[{"PhotoId":0,"Kind":"String","FileName":"String","Url":"String","TakenUtc":"0001-01-01T00:00:00.0000000"}]}],"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","UnitOneEs":"String","UnitManyEs":"String","FacilityNoun":"String","FacilityNounEs":"String","FacilityLat":0,"FacilityLng":0,"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,"Shelf":"String","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"],"Proof":{"String":"String"},"Photos":0,"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","Zip":"String","CourierFacilityId":0,"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,"DispatchOdRequestID":0,"UnitOneEs":"String","UnitManyEs":"String","FacilityNounEs":"String","PerPickup":0,"WaitAfterMin":0,"WaitPerMin":0,"DropoffZip":"String","DamageNote":"String","PickedUpUtc":"0001-01-01T00:00:00.0000000","PhotoList":[{"PhotoId":0,"Kind":"String","FileName":"String","Url":"String","TakenUtc":"0001-01-01T00:00:00.0000000"}]},"RadiusMi":0,"PingRadiusMi":0,"PingRadiusUntilUtc":"0001-01-01T00:00:00.0000000","HideAddressesInHistory":false},"ServerUtc":"0001-01-01T00:00:00.0000000","Result":"String","Detail":"String","Message":"String","PhotoId":0,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}