The PostRouteReports resource allows a user to retrieve a report data for a route by POST request. In Post body, for each route, a minimum of two stops and report type is required. The report response returns a list of reports in JSON format. The type of report that was requested will define the content of the reported response.
POST https://pcmiler.alk.com/apis/rest/v1.0/Service.svc/route/routeReports?dataVersion={dataVersion}
The PostRouteReports operation wraps the ReportRequestBody and form a JSON format data in the POST body. See details in ReportRequestBody and Report Request. You will be redirected to the SOAP Service page since REST and SOAP Requests use the same class object.
Element | Definition | Required |
---|---|---|
ReportRequestBody |
A ReportRequestBody System Object. It contains list of ReportRoutes System Object.
|
Y |
DataVersion |
Data version: Current (default), PCM_EU, PCM_OC, PCM_SA, PCM_AF, PCM_AS, PCM_ME, PCM_GT, PCM_WW, PCM_NA or PCM18 through PCM30 (for access to prior versions).
|
N |
{ "ReportRoutes": [ { "ReportingOptions": { "UseTollData": true, "FuelUnits": 0, "RouteCosts": { "FuelEconomyLoaded": 8.5, "FuelEconomyEmpty": 11.9, "PricePerFuelUnit": 13, "TruckStyle": 0, "GreenHouseGas": 5.2, "OtherCostPerDistUnitLoaded": 12.2, "OtherCostPerDistanceUnitEmpty": 8.9, "CostTimeLoaded": 15.5, "CostTimeEmpty": 12.6 }, "TimeCosts": { "DepartTime": null, "BreakInterval": 0, "BreakLength": 0, "BorderWait": 0, "RemainingHoursOfService": 0 }, "TollCurrency": 0, "ExchangeRate": 1.01, "TollDiscount": "ezpass", "IncludeFerryDistance": true, "UseCustomRoadSpeeds": false, "Language": 0, "EstimatedTimeOptions": null, "UseTraffic": false, "TruckStyle": 0 }, "ReportTypes": [ { "__type": "DirectionsReportType:http:\/\/pcmiler.alk.com\/APIs\/v1.0", "CondenseDirections": false }, { "__type": "MileageReportType:http://pcmiler.alk.com/APIs/v1.0", "THoursWithSeconds": false }, { "__type": "DetailReportType:http:\/\/pcmiler.alk.com\/APIs\/v1.0", "SeparateHeadingFromRoute": false, "SegmentEndpoints": false }, { "__type": "StateReportType:http:\/\/pcmiler.alk.com\/APIs\/v1.0", "SortByRoute": false }, { "__type": "GeoTunnelReportType:http:\/\/pcmiler.alk.com\/APIs\/v1.0", "CiteInterval": 10 }, { "__type": "CalculateMilesReportType:http:\/\/pcmiler.alk.com\/APIs\/v1.0" } ], "RouteId": null, "Stops": [ { "Costs": { "CostOfStop": 0.0, "HoursPerStop": 0.0, "Loaded": true, "OnDuty": true, "UseOrigin": true }, "IsViaPoint": false, "Address":{ "StreetAddress": "457 N Harrison St", "City": "Princeton", "State": "NJ", "Zip":08540, "County":null, "Country":null, "SPLC":null, "CountryPostalFilter":0, "AbbreviationFormat":0 }, "Coords": null, "Region": 4, "Label": "Princeton address", "PlaceName": null }, { "Costs": { "CostOfStop": 1.0, "HoursPerStop": 0.2, "Loaded": false, "OnDuty": true, "UseOrigin": true }, "IsViaPoint": false, "Address": null, "Coords": { "Lat": "42.123120", "Lon": "-76.123120" }, "Region": 4, "Label": "first stop", "PlaceName": null }, { "Costs": { "CostOfStop": 5.0, "HoursPerStop": 5.0, "Loaded": true, "OnDuty": false, "UseOrigin": true }, "IsViaPoint": false, "Address": null, "Coords": { "Lat": "42.124560", "Lon": "-76.124560" }, "Region": 4, "Label": null, "PlaceName": null } ], "Options": { "VehicleType": 0, "RoutingType": 1, "HighwayOnly": true, "FuelRoute": false, "UseAvoidsAndFavors": false, "ClassOverrides": 1, "CustomRoadSpeeds": [ { "RoadCategory": 1, "Speed": 5 }, { "RoadCategory": 3, "Speed": 5 }, { "RoadCategory": 4, "Speed": 5 }, { "RoadCategory": 5, "Speed": 5 }, { "RoadCategory": 6, "Speed": 5 }, { "RoadCategory": 7, "Speed": 5 }, { "RoadCategory": 8, "Speed": 5 }, { "RoadCategory": 10, "Speed": 5 }, { "RoadCategory": 12, "Speed": 5 }, { "RoadCategory": 13, "Speed": 5 }, { "RoadCategory": 14, "Speed": 5 }, { "RoadCategory": 15, "Speed": 5 }, { "RoadCategory": 16, "Speed": 5 }, { "RoadCategory": 17, "Speed": 5 } ], "DistanceUnits": 0, "TollDiscourage": true, "BordersOpen": true, "OverrideRestrict": false, "HazMatType": 3, "RouteOptimization": 2, "TruckCfg": { "Units": 0, "Height": "13'6\"", "Length": "53'", "Width": "96\"", "Weight": "14000", "Axles": 8, "LCV": false }, "HubRouting": false, "AFSetIDs": null, "ElevLimit": null, "FerryDiscourage": false, "HoSOptions": { "Enabled": false, "RemainingDriveTime": null, "RemainingOnDutyTime": null, "RemainingDriveTimeUntilBreak": null, "RemainingCycleDutyTime": null, "HoSRuleType": null, "CycleTimeGains": null, "LastCycleResetDateTime": null, "Last24HourBreakDateTime": null, "UseCycleReset": null, "TerminalDayStartTime": null, "UseCustomPlaces": null, "TeamDriving": null, "CustomBreakDurations": { "ShortBreakDuration": null, "EndOfDutyBreakDuration": null, "CycleResetBreakDuration": null }, "AlternateHoSRuleType": null }, "SideOfStreetAdherence":0 }, "FuelOptions": null } ] }
[ { "__type": "DirectionsReport:http://pcmiler.alk.com/APIs/v1.0", "RouteID": null, "Origin": { "Address": { "StreetAddress": "509 Walker Road", "City": "Endicott", "State": "NY", "Zip": "13760", "County": "Broome", "Country": "United States", "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": "US" }, "Coords": { "Lat": "42.123450", "Lon": "-76.123450" }, "Region": 4, "Label": "", "PlaceName": "", "TimeZone": "EDT", "Errors": [], "SpeedLimitInfo": null, "ConfidenceLevel": "Exact", "DistanceFromRoad": 0.1 }, "Destination": { "Address": { "StreetAddress": "543 Walker Road", "City": "Endicott", "State": "NY", "Zip": "13760", "County": "Broome", "Country": "United States", "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": "US" }, "Coords": { "Lat": "42.124560", "Lon": "-76.124560" }, "Region": 4, "Label": "", "PlaceName": "", "TimeZone": "EDT", "Errors": [], "SpeedLimitInfo": null, "ConfidenceLevel": "Exact", "DistanceFromRoad": 0.183 }, "ReportLegs": [ { "Origin": { "Address": { "StreetAddress": "509 Walker Road", "City": "Endicott", "State": "NY", "Zip": "13760", "County": "Broome", "Country": "United States", "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": "US" }, "Coords": { "Lat": "42.123450", "Lon": "-76.123450" }, "Region": 4, "Label": "", "PlaceName": "", "TimeZone": "EDT", "Errors": [], "SpeedLimitInfo": null, "ConfidenceLevel": "Exact", "DistanceFromRoad": 0.1 }, "ReportLines": [ { "Warn": null, "Direction": "509 Walker Road, Endicott, NY 13760", "Dist": null, "Time": null, "InterCh": null, "Delay": null }, { "Warn": null, "Direction": "Go south on Local", "Dist": null, "Time": null, "InterCh": null, "Delay": null }, { "Warn": null, "Direction": "Drive less than 0.1 miles", "Dist": "0.0", "Time": "0:00", "InterCh": null, "Delay": null } ], "Dest": { "Address": { "StreetAddress": "499 Walker Road", "City": "Endicott", "State": "NY", "Zip": "13760", "County": "Broome", "Country": "United States", "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": "US" }, "Coords": { "Lat": "42.123120", "Lon": "-76.123120" }, "Region": 4, "Label": "", "PlaceName": "", "TimeZone": "EDT", "Errors": [], "SpeedLimitInfo": null, "ConfidenceLevel": "Exact", "DistanceFromRoad": 0.077 } }, { "Origin": { "Address": { "StreetAddress": "499 Walker Road", "City": "Endicott", "State": "NY", "Zip": "13760", "County": "Broome", "Country": "United States", "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": "US" }, "Coords": { "Lat": "42.123120", "Lon": "-76.123120" }, "Region": 4, "Label": "", "PlaceName": "", "TimeZone": "EDT", "Errors": [], "SpeedLimitInfo": null, "ConfidenceLevel": "Exact", "DistanceFromRoad": 0.077 }, "ReportLines": [ { "Warn": null, "Direction": "499 Walker Road, Endicott, NY 13760 (0:00)", "Dist": "0.0", "Time": "0:00", "InterCh": null, "Delay": null }, { "Warn": null, "Direction": "Go north on Local", "Dist": null, "Time": null, "InterCh": null, "Delay": null }, { "Warn": null, "Direction": "Drive 0.1 miles", "Dist": "0.2", "Time": "0:01", "InterCh": null, "Delay": null }, { "Warn": null, "Direction": "543 Walker Road, Endicott, NY 13760 (0:00)", "Dist": "0.2", "Time": "0:01", "InterCh": null, "Delay": null }, { "Warn": null, "Direction": " 1986-2016 ALK Technologies.", "Dist": null, "Time": null, "InterCh": null, "Delay": null }, { "Warn": null, "Direction": "All drive times are approximate. ", "Dist": null, "Time": null, "InterCh": null, "Delay": null }, { "Warn": null, "Direction": "('~5 mins' indicates you should be on this segment for 'about 5 minutes'. )", "Dist": null, "Time": null, "InterCh": null, "Delay": null }, { "Warn": null, "Direction": "This suggested route is based on various data sources and may be incomplete or", "Dist": null, "Time": null, "InterCh": null, "Delay": null }, { "Warn": null, "Direction": "inaccurate in some cases. The user assumes full liability for any delay, loss", "Dist": null, "Time": null, "InterCh": null, "Delay": null }, { "Warn": null, "Direction": "or damage which may occur as a result of its use. Please obey local traffic laws.", "Dist": null, "Time": null, "InterCh": null, "Delay": null } ], "Dest": { "Address": { "StreetAddress": "543 Walker Road", "City": "Endicott", "State": "NY", "Zip": "13760", "County": "Broome", "Country": "United States", "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": "US" }, "Coords": { "Lat": "42.124560", "Lon": "-76.124560" }, "Region": 4, "Label": "", "PlaceName": "", "TimeZone": "EDT", "Errors": [], "SpeedLimitInfo": null, "ConfidenceLevel": "Exact", "DistanceFromRoad": 0.183 } } ] } ]