| GET,OPTIONS | /v1/dispatch/courier/profiles/{Id} |
|---|
"use strict";
export class CourierProfileSummary {
/** @param {{CourierProfileID?:number,Code?:string,Name?:string,BusinessName?:string,RouteShape?:string,Enabled?:boolean,TemplateFrom?:string,Drivers?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
CourierProfileID;
/** @type {string} */
Code;
/** @type {string} */
Name;
/** @type {string} */
BusinessName;
/** @type {string} */
RouteShape;
/** @type {boolean} */
Enabled;
/** @type {string} */
TemplateFrom;
/** @type {number} */
Drivers;
}
export class CourierTemplateOption {
/** @param {{Key?:string,Label?:string,Detail?:string,RouteShape?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Key;
/** @type {string} */
Label;
/** @type {string} */
Detail;
/** @type {string} */
RouteShape;
}
export class CourierPay {
/** @param {{WorkerClass?:string,PerPickup?:number,PerStop?:number,PerMissed?:number,PerCancel?:number,WaitAfterMin?:number,WaitPerMin?:number,MileageOn?:boolean,PerMile?:number,MinPerJob?:number,TipsPct?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
WorkerClass;
/** @type {number} */
PerPickup;
/** @type {number} */
PerStop;
/** @type {number} */
PerMissed;
/** @type {number} */
PerCancel;
/** @type {number} */
WaitAfterMin;
/** @type {number} */
WaitPerMin;
/** @type {boolean} */
MileageOn;
/** @type {number} */
PerMile;
/** @type {number} */
MinPerJob;
/** @type {number} */
TipsPct;
}
export class CourierDispatch {
/** @param {{PingSecs?:number,RadiusMi?:number,DeclinePenalty?:boolean,NextRule?:string,GoMin?:number,LastMin?:number,NearFull?:number,MarginMin?:number,TrafficSource?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
PingSecs;
/** @type {number} */
RadiusMi;
/** @type {boolean} */
DeclinePenalty;
/** @type {string} */
NextRule;
/** @type {number} */
GoMin;
/** @type {number} */
LastMin;
/** @type {number} */
NearFull;
/** @type {number} */
MarginMin;
/** @type {string} */
TrafficSource;
}
export class CourierMissed {
/** @param {{WaitMin?:number,Fee?:number,CancelFee?:number,AutoRebook?:boolean,RequireContact?:boolean,RequirePhoto?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
WaitMin;
/** @type {number} */
Fee;
/** @type {number} */
CancelFee;
/** @type {boolean} */
AutoRebook;
/** @type {boolean} */
RequireContact;
/** @type {boolean} */
RequirePhoto;
}
export class CourierPrivacy {
/** @param {{ThreadHrs?:number,PhotoDays?:number,LockNames?:string,HideAddr?:boolean,LiveEta?:boolean,Tipping?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ThreadHrs;
/** @type {number} */
PhotoDays;
/** @type {string} */
LockNames;
/** @type {boolean} */
HideAddr;
/** @type {boolean} */
LiveEta;
/** @type {boolean} */
Tipping;
}
export class CourierPricing {
/** @param {{Base?:number,PerUnit?:number,PerMile?:number,MinOrder?:number,TaxPct?:number,FinalAfterCount?:boolean,ServiceArea?:string[],WindowMin?:number,Surcharges?:{ [index:string]: number; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Base;
/** @type {number} */
PerUnit;
/** @type {number} */
PerMile;
/** @type {number} */
MinOrder;
/** @type {number} */
TaxPct;
/** @type {boolean} */
FinalAfterCount;
/** @type {string[]} */
ServiceArea = [];
/** @type {number} */
WindowMin;
/** @type {{ [index:string]: number; }} */
Surcharges = {};
}
export class CourierBooking {
/** @param {{On?:boolean,Slug?:string,Asap?:boolean,MinLeadMin?:number,Open?:string,Close?:string,DriveBufferMin?:number,Zips?:string[],Recurring?:boolean,PayTiming?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
On;
/** @type {string} */
Slug;
/** @type {boolean} */
Asap;
/** @type {number} */
MinLeadMin;
/** @type {string} */
Open;
/** @type {string} */
Close;
/** @type {number} */
DriveBufferMin;
/** @type {string[]} */
Zips = [];
/** @type {boolean} */
Recurring;
/** @type {string} */
PayTiming;
}
export class CourierLevelView {
/** @param {{Code?:string,Name?:string,InBy?:string,WithinMin?:number,Ready?:string,Days?:number[],IsOn?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Code;
/** @type {string} */
Name;
/** @type {string} */
InBy;
/** @type {number} */
WithinMin;
/** @type {string} */
Ready;
/** @type {number[]} */
Days = [];
/** @type {boolean} */
IsOn;
}
export class CourierFacilityView {
/** @param {{Code?:string,Name?:string,Address?:string,IntakeMin?:number,Levels?:CourierLevelView[],Holidays?:string[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Code;
/** @type {string} */
Name;
/** @type {string} */
Address;
/** @type {number} */
IntakeMin;
/** @type {CourierLevelView[]} */
Levels = [];
/** @type {string[]} */
Holidays = [];
}
export class CourierVehicleView {
/** @param {{EquipmentID?:number,UnitNumber?:string,Name?:string,Unit?:string,Cap?:number,Cold?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
EquipmentID;
/** @type {string} */
UnitNumber;
/** @type {string} */
Name;
/** @type {string} */
Unit;
/** @type {number} */
Cap;
/** @type {boolean} */
Cold;
}
export class CourierProfileContext {
/** @param {{Drivers?:number,ProfileCount?:number,PayPlanId?:number,ZoneMode?:string,ZoneName?:string,ZoneCount?:number,HasBookingPage?:boolean,HasRateConfig?:boolean,VehicleFacts?:{ [index:string]: string; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Drivers;
/** @type {number} */
ProfileCount;
/** @type {?number} */
PayPlanId;
/** @type {string} */
ZoneMode;
/** @type {string} */
ZoneName;
/** @type {number} */
ZoneCount;
/** @type {boolean} */
HasBookingPage;
/** @type {boolean} */
HasRateConfig;
/** @type {{ [index:string]: string; }} */
VehicleFacts = {};
}
export class CourierProfileView {
/** @param {{CourierProfileID?:number,Code?:string,Name?:string,BusinessName?:string,RouteShape?:string,Enabled?:boolean,TemplateFrom?:string,UnitOne?:string,UnitMany?:string,FacilityNoun?:string,UnitOneEs?:string,UnitManyEs?:string,FacilityNounEs?:string,TagMode?:string,TagFormats?:string[],Pay?:CourierPay,Dispatch?:CourierDispatch,Missed?:CourierMissed,Privacy?:CourierPrivacy,Pricing?:CourierPricing,Booking?:CourierBooking,Facilities?:CourierFacilityView[],Vehicles?:CourierVehicleView[],Proof?:{ [index:string]: { [index:string]: string; }; },Context?:CourierProfileContext}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
CourierProfileID;
/** @type {string} */
Code;
/** @type {string} */
Name;
/** @type {string} */
BusinessName;
/** @type {string} */
RouteShape;
/** @type {boolean} */
Enabled;
/** @type {string} */
TemplateFrom;
/** @type {string} */
UnitOne;
/** @type {string} */
UnitMany;
/** @type {string} */
FacilityNoun;
/** @type {string} */
UnitOneEs;
/** @type {string} */
UnitManyEs;
/** @type {string} */
FacilityNounEs;
/** @type {string} */
TagMode;
/** @type {string[]} */
TagFormats = [];
/** @type {CourierPay} */
Pay;
/** @type {CourierDispatch} */
Dispatch;
/** @type {CourierMissed} */
Missed;
/** @type {CourierPrivacy} */
Privacy;
/** @type {CourierPricing} */
Pricing;
/** @type {CourierBooking} */
Booking;
/** @type {CourierFacilityView[]} */
Facilities = [];
/** @type {CourierVehicleView[]} */
Vehicles = [];
/** @type {{ [index:string]: { [index:string]: string; }; }} */
Proof = {};
/** @type {CourierProfileContext} */
Context;
}
export class CourierIssue {
/** @param {{Key?:string,Section?:string,Message?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Key;
/** @type {string} */
Section;
/** @type {string} */
Message;
}
export class CourierChange {
/** @param {{Key?:string,Section?:string,Label?:string,From?:string,To?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Key;
/** @type {string} */
Section;
/** @type {string} */
Label;
/** @type {string} */
From;
/** @type {string} */
To;
}
export class CourierPreviewLine {
/** @param {{K?:string,V?:string,Dot?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
K;
/** @type {string} */
V;
/** @type {string} */
Dot;
}
export class CourierPreview {
/** @param {{DeadlineTitle?:string,DeadlineLead?:string,RoomW?:string,LastW?:string,GoW?:string,Zones?:CourierPreviewLine[],PaySub?:string,PayRows?:CourierPreviewLine[],PayTotal?:string,ProofRows?:CourierPreviewLine[],Ping?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
DeadlineTitle;
/** @type {string} */
DeadlineLead;
/** @type {string} */
RoomW;
/** @type {string} */
LastW;
/** @type {string} */
GoW;
/** @type {CourierPreviewLine[]} */
Zones = [];
/** @type {string} */
PaySub;
/** @type {CourierPreviewLine[]} */
PayRows = [];
/** @type {string} */
PayTotal;
/** @type {CourierPreviewLine[]} */
ProofRows = [];
/** @type {string} */
Ping;
}
export class CourierFleetVehicle {
/** @param {{EquipmentID?:number,UnitNumber?:string,Name?:string,VehicleType?:string,Unit?:string,Cap?:number,Cold?:boolean,Status?:string,Assigned?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
EquipmentID;
/** @type {string} */
UnitNumber;
/** @type {string} */
Name;
/** @type {string} */
VehicleType;
/** @type {string} */
Unit;
/** @type {?number} */
Cap;
/** @type {boolean} */
Cold;
/** @type {string} */
Status;
/** @type {boolean} */
Assigned;
}
export class CourierResponse {
/** @param {{Profiles?:CourierProfileSummary[],Templates?:CourierTemplateOption[],Profile?:CourierProfileView,Issues?:CourierIssue[],Changes?:CourierChange[],Preview?:CourierPreview,Fleet?:CourierFleetVehicle[],ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {CourierProfileSummary[]} */
Profiles = [];
/** @type {CourierTemplateOption[]} */
Templates = [];
/** @type {CourierProfileView} */
Profile;
/** @type {CourierIssue[]} */
Issues = [];
/** @type {CourierChange[]} */
Changes = [];
/** @type {CourierPreview} */
Preview;
/** @type {CourierFleetVehicle[]} */
Fleet = [];
/** @type {ResponseStatus} */
ResponseStatus;
}
export class CourierProfileRequest {
/** @param {{Id?:number,FacilityCode?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
FacilityCode;
}
JavaScript CourierProfileRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/dispatch/courier/profiles/{Id} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Profiles:
[
{
CourierProfileID: 0,
Code: String,
Name: String,
BusinessName: String,
RouteShape: String,
Enabled: False,
TemplateFrom: String,
Drivers: 0
}
],
Templates:
[
{
Key: String,
Label: String,
Detail: String,
RouteShape: String
}
],
Profile:
{
CourierProfileID: 0,
Code: String,
Name: String,
BusinessName: String,
RouteShape: String,
Enabled: False,
TemplateFrom: String,
UnitOne: String,
UnitMany: String,
FacilityNoun: String,
UnitOneEs: String,
UnitManyEs: String,
FacilityNounEs: String,
TagMode: String,
TagFormats:
[
String
],
Pay:
{
WorkerClass: String,
PerPickup: 0,
PerStop: 0,
PerMissed: 0,
PerCancel: 0,
WaitAfterMin: 0,
WaitPerMin: 0,
MileageOn: False,
PerMile: 0,
MinPerJob: 0,
TipsPct: 0
},
Dispatch:
{
PingSecs: 0,
RadiusMi: 0,
DeclinePenalty: False,
NextRule: String,
GoMin: 0,
LastMin: 0,
NearFull: 0,
MarginMin: 0,
TrafficSource: String
},
Missed:
{
WaitMin: 0,
Fee: 0,
CancelFee: 0,
AutoRebook: False,
RequireContact: False,
RequirePhoto: False
},
Privacy:
{
ThreadHrs: 0,
PhotoDays: 0,
LockNames: String,
HideAddr: False,
LiveEta: False,
Tipping: False
},
Pricing:
{
Base: 0,
PerUnit: 0,
PerMile: 0,
MinOrder: 0,
TaxPct: 0,
FinalAfterCount: False,
ServiceArea:
[
String
],
WindowMin: 0,
Surcharges:
{
String: 0
}
},
Booking:
{
On: False,
Slug: String,
Asap: False,
MinLeadMin: 0,
Open: String,
Close: String,
DriveBufferMin: 0,
Zips:
[
String
],
Recurring: False,
PayTiming: String
},
Facilities:
[
{
Code: String,
Name: String,
Address: String,
IntakeMin: 0,
Levels:
[
{
Code: String,
Name: String,
InBy: String,
WithinMin: 0,
Ready: String,
Days:
[
0
],
IsOn: False
}
],
Holidays:
[
String
]
}
],
Vehicles:
[
{
EquipmentID: 0,
UnitNumber: String,
Name: String,
Unit: String,
Cap: 0,
Cold: False
}
],
Proof:
{
String:
{
String: String
}
},
Context:
{
Drivers: 0,
ProfileCount: 0,
PayPlanId: 0,
ZoneMode: String,
ZoneName: String,
ZoneCount: 0,
HasBookingPage: False,
HasRateConfig: False,
VehicleFacts:
{
String: String
}
}
},
Issues:
[
{
Key: String,
Section: String,
Message: String
}
],
Changes:
[
{
Key: String,
Section: String,
Label: String,
From: String,
To: String
}
],
Preview:
{
DeadlineTitle: String,
DeadlineLead: String,
RoomW: String,
LastW: String,
GoW: String,
Zones:
[
{
K: String,
V: String,
Dot: String
}
],
PaySub: String,
PayRows:
[
{
K: String,
V: String,
Dot: String
}
],
PayTotal: String,
ProofRows:
[
{
K: String,
V: String,
Dot: String
}
],
Ping: String
},
Fleet:
[
{
EquipmentID: 0,
UnitNumber: String,
Name: String,
VehicleType: String,
Unit: String,
Cap: 0,
Cold: False,
Status: String,
Assigned: False
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}