I am using PC*MILER Web Services REST service route reports, but avoids and favors are both being ignored.
URL:
https://pcmiler.alk.com/apis/rest/v1.0/Service.svc/route/routeReports?dataVersion=PCM30
Body:
{
"ReportRoutes": [{
"RouteId": "562595",
"Stops": [{
"Coords": {
"Lat": "41.483611",
"Lon": "-83.354120"
}
},
{
"Coords": {
"Lat": "41.326000",
"Lon": "-82.622300"
}
}],
"Options": {
"UseAvoidsAndFavors": true,
"AFSetIDs": [-1],
"BordersOpen": false,
"DistanceUnits": 0,
"FerryDiscourage": true,
"HighwayOnly": true,
"OverrideRestrict": false,
"RouteOpt": 0,
"RoutingType": 1
},
"ReportTypes": [{
"__type": "CalculateMilesReportType:http:\/\/pcmiler.alk.com\/APIs\/v1.0"
}]
}]
}
Note that this returning a warning: "Warning: 199 Route at index 0: RouteOptions.AFSetIDs is unavailable in previous versions of PCMiler Web Services.,199 Route at index 0: Unlicensed for Avoids & Favors"
This is due to passing the parameter "useAvoidFavors", which is the former legacy PC*MILER Web Service. Removing that resolves the issue. Only the following parameter is required: AFSetIDs": [-1]