| GET,OPTIONS | /v1/routeplan/week |
|---|
"use strict";
export class RoutePlanCrew {
/** @param {{CrewID?:number,CrewName?:string,CrewColor?:string,HomeZip?:string,YardLat?:number,YardLng?:number,DailyCapacityMin?:number,WeeklyCapacityMin?:number,Specialist?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
CrewID;
/** @type {string} */
CrewName;
/** @type {string} */
CrewColor;
/** @type {string} */
HomeZip;
/** @type {?number} */
YardLat;
/** @type {?number} */
YardLng;
/** @type {number} */
DailyCapacityMin;
/** @type {number} */
WeeklyCapacityMin;
/** @type {boolean} */
Specialist;
}
export class RoutePlanVisit {
/** @param {{AgreementID?:number,AgreementJobID?:number,Name?:string,Sub?:string,ServiceType?:string,Zip?:string,Area?:string,Lat?:number,Lng?:number,DurationMin?:number,DueIso?:string,DueLabel?:string,Overdue?:boolean,DefaultCrewID?:number,RouteCrewID?:number,RouteSeq?:number,RouteDateIso?:string,LateDays?:number,AutoPay?:boolean,SkipPolicy?:string,SkipCreditAmount?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
AgreementID;
/** @type {?number} */
AgreementJobID;
/** @type {string} */
Name;
/** @type {string} */
Sub;
/** @type {string} */
ServiceType;
/** @type {string} */
Zip;
/** @type {string} */
Area;
/** @type {?number} */
Lat;
/** @type {?number} */
Lng;
/** @type {number} */
DurationMin;
/** @type {string} */
DueIso;
/** @type {string} */
DueLabel;
/** @type {boolean} */
Overdue;
/** @type {?number} */
DefaultCrewID;
/** @type {?number} */
RouteCrewID;
/** @type {?number} */
RouteSeq;
/** @type {string} */
RouteDateIso;
/** @type {number} */
LateDays;
/** @type {boolean} */
AutoPay;
/** @type {string} */
SkipPolicy;
/** @type {number} */
SkipCreditAmount;
}
export class RoutePlanSkippedVisit {
/** @param {{AgreementJobID?:number,AgreementID?:number,Name?:string,DateIso?:string,Reason?:string,CreditAmount?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
AgreementJobID;
/** @type {number} */
AgreementID;
/** @type {string} */
Name;
/** @type {string} */
DateIso;
/** @type {string} */
Reason;
/** @type {number} */
CreditAmount;
}
export class RoutePlanWeekResponse {
/** @param {{FromIso?:string,ToIso?:string,Crews?:RoutePlanCrew[],Visits?:RoutePlanVisit[],Skipped?:RoutePlanSkippedVisit[],ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
FromIso;
/** @type {string} */
ToIso;
/** @type {RoutePlanCrew[]} */
Crews = [];
/** @type {RoutePlanVisit[]} */
Visits = [];
/** @type {RoutePlanSkippedVisit[]} */
Skipped = [];
/** @type {ResponseStatus} */
ResponseStatus;
}
export class RoutePlanWeekRequest {
/** @param {{From?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
From;
}
JavaScript RoutePlanWeekRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/routeplan/week HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<RoutePlanWeekResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Crews>
<RoutePlanCrew>
<CrewColor>String</CrewColor>
<CrewID>0</CrewID>
<CrewName>String</CrewName>
<DailyCapacityMin>0</DailyCapacityMin>
<HomeZip>String</HomeZip>
<Specialist>false</Specialist>
<WeeklyCapacityMin>0</WeeklyCapacityMin>
<YardLat>0</YardLat>
<YardLng>0</YardLng>
</RoutePlanCrew>
</Crews>
<FromIso>String</FromIso>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Skipped>
<RoutePlanSkippedVisit>
<AgreementID>0</AgreementID>
<AgreementJobID>0</AgreementJobID>
<CreditAmount>0</CreditAmount>
<DateIso>String</DateIso>
<Name>String</Name>
<Reason>String</Reason>
</RoutePlanSkippedVisit>
</Skipped>
<ToIso>String</ToIso>
<Visits>
<RoutePlanVisit>
<AgreementID>0</AgreementID>
<AgreementJobID>0</AgreementJobID>
<Area>String</Area>
<AutoPay>false</AutoPay>
<DefaultCrewID>0</DefaultCrewID>
<DueIso>String</DueIso>
<DueLabel>String</DueLabel>
<DurationMin>0</DurationMin>
<Lat>0</Lat>
<LateDays>0</LateDays>
<Lng>0</Lng>
<Name>String</Name>
<Overdue>false</Overdue>
<RouteCrewID>0</RouteCrewID>
<RouteDateIso>String</RouteDateIso>
<RouteSeq>0</RouteSeq>
<ServiceType>String</ServiceType>
<SkipCreditAmount>0</SkipCreditAmount>
<SkipPolicy>String</SkipPolicy>
<Sub>String</Sub>
<Zip>String</Zip>
</RoutePlanVisit>
</Visits>
</RoutePlanWeekResponse>