Route Reports
Contents
With our Route Reports APIs, you can retrieve report data for a route, customizing the route with a wide range of settings to fit your vehicles and business needs. For each route, a minimum of two stops and a report type are required. The report response returns a list of reports in JSON format. Below are descriptions of the parameters that can be used to generate reports.
Tip: To apply Route Modifiers (avoids and favors), select your sets using afSetIDs
or afSetNames
.
GET /route/routeReports
POST /route/routeReports
Resource URL
https://pcmiler.alk.com/apis/rest/v1.0/Service.svc/route/routeReports
Report Request Parameters
(Some parameters have slightly different names for POST requests, as noted below. Read more about POST requests for route reports.)
Report Options
Data Element | Description | Data Type | Value/Example | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
inclTollData POST: UseTollData | Indicates whether or not toll data should be used. |
boolean | True False (Default) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
POST only: IncludeRoadClass | Indicates whether or not to return RoadClass in Detailed and Directions reports. |
boolean | True False (Default) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fuelUnits | Fuel Units. |
Enum | 0 - Gallons 1 - Liters | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fuelEconLoad POST: FuelEconomyLoaded | The fuel efficiency (distance units per fuel units) when loaded. |
double | value is decimal such as 11.9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fuelEconEmpty POST: FuelEconomyEmpty | The fuel efficiency (distance units per fuel units) when empty. |
double | value is decimal such as 11.9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
costPerFuelUnit POST: PricePerFuelUnit | The cost per fuel unit of fuel. |
double | value is decimal such as 4.15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
costGHG POST: GreenHouseGas | Greenhouse gas emissions in pounds or kilograms of carbon dioxide (CO2) per gallon. |
double | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
costMaintLoad POST: OtherCostPerDistUnitLoaded | The maintenance cost per distance unit when loaded. |
double | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
costMaintEmpty POST: OtherCostPerDistanceUnitEmpty | The maintenance cost per distance unit when empty. |
double | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
costTimeLoad POST: CostTimeLoaded | The labor cost per hour when the vehicle is loaded. |
double | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
costTimeEmpty POST: CostTimeEmpty | The labor cost per hour when the vehicle is empty. |
double | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stopCosts POST: CostOfStop | Specifies a flat monetary cost for each stop on the route, which is added to the total cost of the trip. It is required to have an entry for each pair of coordinates in the stops query parameter. |
Complex | The format is a list delimited by a vertical bar (|) of StopCosts for each stop that is supplied in the stops query parameter, respectively. It has the following format: CostOfStop ',' HoursPerStop ',' Loaded' ,' OnDuty' ,' UseOrigin CostOfStop - Float HoursPerStop - Float Loaded - boolean OnDuty - boolean UseOrigin - boolean Example: 0.0,0.0,true,true,true|1.0,0.2,false,true,true |
Stop Details
Data Element | Description | Data Type | Value/Example | ||||
---|---|---|---|---|---|---|---|
stops | The coordinates that make up the stops of the route. Each stop is specified as a comma-separated pair of floating point numbers, representing longitude and latitude respectively. There must be at least two pairs of coordinates. In POST requests, stops can be entered as an address or as coordinates. | List of comma-separated long/lat pairs, separated by semi-colons | -76.123456,42.123456;-76.123126,42.123126 | ||||
assetId | The ID of the asset (device, vehicle or driver) associated with this request. |
string | abc1234 | ||||
PlaceId | The ID of the Place to be added as a stop on a route. If PlaceId is included, other location attributes included in the request are ignored, including an address or coordinates. The PlaceId for a location can be retrieved using our Places API. Available in dataVersion PCM35 and higher. |
string | 0xXBS0oPl3cEyBAGYYwU10_g | ||||
region | The data region in which stop coordinates lie. Required to specify regions outside of NA.
| Enum
0 - Unknown | 1 - AF 2 - AS 3 - EU 4 - NA (Default) 5 - OC 6 - SA 7 - ME ID | The user created stop ID. |
| String Stop_1 | |
Route Options
Data Element | Description | Data Type | Value/Example | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
profileName | The name of the vehicle routing profile to be used in calculations. A vehicle routing profile is a preset collection of vehicle dimensions and other routing options that ensure the routing algorithm knows the type of vehicle being driven so it can generate a safe, efficient, and legal route. |
String | Default is null. Read more about selecting a vehicle routing profile. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
POST: EstimatedTimeOptions |
Estimated time options allow you to set a departure or arrival time. This time will be reflected in mileage and detailed reports and can also affect routing with roads that have time-based restrictions. In a POST route reports call, EstimatedTimeOptions is an object with the following values:
|
object |
Example: "EstimatedTimeOptions": { "ETAETD": 1, "DateOption": 1, "DateAndTime": { "CalendarDate": "11/21/2021", "DayOfWeek": 0, "TimeOfDay": "6:00 AM", "TimeZone": 0 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GET only: estimatedTimeOpts |
Estimated time options allow you to set a departure or arrival time. This time will be reflected in mileage and
detailed reports and can also affect routing with roads that have time-based restrictions. Format: Depart(Arrive)|[DayOfWeek]|[TimeOfDay] or Depart(Arrive)|[SpecificDateTime]|[TimeZone] Supported time zones can be found here. When setting a departure time, if the request is sent in the same time zone as the first stop (origin of the trip), within 15 minutes of the current time, the current time will be returned in the response. |
string |
Examples: Depart|Monday|18:30 Arrive|2014-03-04T08:15:30|Local | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
useTraffic | Indicates whether or not to use traffic data. Traffic data is only used to select the route path when the routing algorithm (routeType ) is set to Fastest . For Practical and Shortest routes, traffic data is used to calculate ETAs and transit times. (Fastest routing is recommended for auto and van vehicle routing profiles only.) |
boolean | True False (Default) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
vehType POST: VehicleType | Restricts the route to roads that are accessible by the selected vehicle type. |
Enum | 0 - Truck (Default) 1 - LightTruck 2 - Auto 3 - Midsize Truck 4 - School Bus | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
routeType POST: RoutingType | The type of route you want to calculate. |
Enum | 0 - Practical (Default) 1 - Shortest 2 - Fastest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hwyOnly POST: HighwayOnly | Indicates whether to use highways only for routing. This setting is intended only for generating distances between cities or postal codes. The default is false for GET calls to route reports, which means local streets may be used in routing. For POST calls, the default is true. |
boolean | True (Default for POST calls) False (Default for GET calls) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
overrideClass POST: ClassOverrides |
A comma separated list of class overrides. This allows you to select whether a truck with a 48' or shorter trailer should still adhere to routing for larger (53') trucks along the National Network. (U.S. Only) Note that if vehLength is larger than 48' (e.g. 48.1') and/or vehWidth is larger than 96"
(e.g. 96.1"), then overrideClass is set to 3(National Network + FiftyThreeFoot) without an option to
turn it off; if vehLength is smaller than 48' and vehWidth is smaller than 96", then
overrideClass is set to 0(None) by default. However, you can still provide overrideClass
param to override it.
|
Enum | 0 - None (Default) 1 - FiftyThreeFoot 2 - NationalNetwork 3 - NationalNetwork and FiftyThreeFoot | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
distUnits POST: DistanceUnits | Sets whether to use miles or kilometers in distance and speed measurements. |
Enum | 0 - Miles (Default) 1 - Km | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
avoidTolls POST: TollDiscourage | Indicates whether or not to avoid tolls. This parameter has been deprecated. Use tollRoads instead. |
boolean | True False (Default) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tollRoads POST: TollRoads | Indicates whether or not to avoid toll roads when generating a route. If this parameter is specified, the value in avoidTolls will be ignored. If this parameter is null, the value in avoidTolls will be used. Available in dataVersion PCM34 and higher. Use avoidTolls for older versions. |
int | 1 - Always Avoid 2 - Avoid if Possible 3 - Use Default is null. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
avoidCountry | A comma-separated list of ISO2 codes for countries that should be avoided when generating a route. Default is an empty list. Available in dataVersion PCM34 and higher. |
string | BE, LU | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
avoidState | A comma-separated list of ISO2 codes for states that should be avoided when generating a route. Default is an empty list. North America only. Available in dataVersion PCM34 and higher. |
string | DE, RI | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
favorCountry | A comma-separated list of ISO2 codes for countries that should be favored when generating a route. Default is an empty list. For regions outside of North America. Available in dataVersion PCM34 and higher. |
string | DE, FR | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
favorState | A comma-separated list of ISO2 codes for states that should be favored when generating a route. Default is an empty list. North America only. Available in dataVersion PCM34 and higher. |
string | PA, CT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
openBorders POST: BordersOpen | Sets whether or not international borders are open to travel. Set to false to minimize the
number of international border crossings, unless they are necessary to reach all of the stops on a route. For
example, if all your stops are in the “lower 48” United States, the resulting route will stay in the United States
even if the most practical or shortest route would normally involve some Canadian mileage. The true option ignores international boundaries in generating the best route. |
boolean | True (Default) False | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
restrOverrides POST: OverrideRestrict | Indicates whether or not to override truck restrictions pertaining to specific sizes and weights when generating a route. |
boolean | True False (Default) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hazMat POST: HazMatType | Indicates the hazardous material type. Read more about hazmat routing. |
Enum | 0 - None (Default) 1 - General 2 - Caustic 3 - Explosives 4 - Flammable 5 - Inhalants 6 - Radioactive 7 - HarmfulToWater 8 - Tunnel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hazMatTypes | An array of hazardous material types to apply when generating a route. Read more about hazmat routing. |
Array of HazMatType | 0 - None (Default) 1 - General 2 - Caustic 3 - Explosives 4 - Flammable 5 - Inhalants 6 - Radioactive 7 - HarmfulToWater 8 - Tunnel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tunnelCategory | The tunnel category to apply when generating a route. (Europe only)
| Enum 0 - None (Default) | 1 - TunnelBCDE 2 - TunnelCDE 3 - TunnelDE 4 - TunnelE tunnelCategories | An array of tunnel categories to apply when generating a route. (Europe only) |
| Array of TunnelCategory 0 - None (Default) | 1 - TunnelBCDE 2 - TunnelCDE 3 - TunnelDE 4 - TunnelE routeOpt | POST: RouteOptimization Indicates the method by which to optimize route stops. |
| Enum 0 - None (Default) | 1 - ThruAll 2 - DestinationFixed hubRouting | Indicates whether or not to enable hub routing. Hub Routing generates routes from a single starting place (origin) to multiple destinations. |
| boolean True | False (Default) vehDimUnits | POST: Units Vehicle dimension units |
| Enum 0 - English (Default) | 1 - Metric vehHeight | POST: Height
The height of the truck in feet and inches or meters depending on | vehDimUnits .
Valid range is between 5' and 15' in North America, or between 2 and 5 meters in Europe.
| string Read more about setting vehicle dimensions. | vehLength | POST: Length
The length of a straight truck/van or combined vehicle’s trailer in feet and inches or meters depending on | vehDimUnits . You do not need to include the tractor's length in this value for a tractor/trailer. If you have tandem trailers that don't articulate (rigid connection) then it would be the combined length of the trailers. More than just a legal setting, vehLength is used to calculate turning radius using the maximum straight length to see if the driver can make the turn.
Valid range is between 8' and 70' in North America, or between 5 and 25 meters in Europe.
| string Read more about setting vehicle dimensions. | vehWidth | POST: Width
The width of the truck in inches or meters depending on | vehDimUnits .
Valid range is between 60" and 102" in North America, or between 2 and 3 meters in Europe.
| string Read more about setting vehicle dimensions. | vehWeight | POST: Weight
The weight of the truck in pounds or kilograms depending on | vehDimUnits .
Valid range is between 1500 and 156470 lbs in North America, or between 680.39 and 60000 kgs in Europe.
| string Read more about setting vehicle dimensions. | axles | The number of axles on the truck |
| Int Acceptable values are 2 through 14 and the default value is 5 | trkMaxWeightPerAxleGroup | POST: MaxWeightPerAxleGroup The maximum weight per axle group in pounds or kilograms depending on | vehDimUnits .Acceptable values are 800 to 45,000 pounds in North America and 1 tonne to 20 tonnes in Europe.
| double Read more about setting vehicle dimensions. | LCV | Indicates whether the truck is a multi-trailer or longer combination vehicle. |
| boolean True | False (Default) refrigerated | Indicates whether the truck trailer is refrigerated. This parameter is used in State and Mileage reports to
calculate "Tank-To-Wheel" (TTW) greenhouse gas (GHG) emissions. (Europe only) |
| boolean True | False (Default) fuelConsumption | The amount of fuel a vehicle consumes in liters per 100 km. The format of this value is a floating point number (for example, 23.5). | This individual value overrides the default fuel consumption values which are used when this parameter is set to 0. The default values for fuel consumption are based on UK DEFRA 2018. It provides average fuel consumption by weight class and vehicle setup, which are calculated automatically based on the dimension settings in the vehicle routing profile. This parameter is used in State and Mileage reports to calculate "Tank-To-Wheel" (TTW) greenhouse gas (GHG) emissions. It is not used for fuel cost calculations. (Europe only)
| double Default is 0 | fuelType | Indicates the type of fuel used. This parameter is used in State and Mileage reports to calculate
"Tank-To-Wheel" (TTW) greenhouse gas (GHG) emissions. Default is Diesel. (Europe only) |
| EnumFuelType 0 - FuelType_Petrol | 1 - FuelType_Petrol_E5 (5% ethanol by vol) 2 - FuelType_Petrol_E10 (10% ethanol by vol) 3 - FuelType_Ethanol 4 - FuelType_Diesel (Default) 5 - FuelType_Biodiesel 6 - FuelType_Diesel_D5 (5% biodiesel by vol) 7 - FuelType_Diesel_D7 (7% biodiesel by vol) hosEnabled | Indicates whether or not to enable Hour of Service option. |
| boolean True | False (Default) hosRemDriveTimeUntilBreak | The available driving hours at origin before the driver needs to take a rest break. |
| double The format is in seconds. | hosRemDriveTime | The available driving hours at origin until the end of work day. |
| double The format is in seconds. | hosRemOnDutyTime | The available On-Duty hours available at origin until the end of work day. |
| double The format is in seconds. | hosRuleType | The hours of service rule to use. |
| Enum Valid values are USFed607LH - 0, USFed708LH - 1, CanadaCycle1 - 2, CanadaCycle2 - 3, California808 - 4, Texas707 - 5, USShortHaul - 6, Europe - 7 | hosRemCycleDutyTime | The available Cycle time duty hours at origin until Cycle reset. |
| double The format is in seconds. | sideOfStreetAdherence | How strict to be in order to avoid the destination being on the opposite side of the street. |
| Enum
0 - Off (Default)
| 1- Minimal 2 - Moderate 3 - Average 4 - Strict 5 - Adhere 6 - StronglyAdhere useCrossStreetTurnAvoidance | When set to true, it reduces the chances the route generated includes turns that go across the street in front of oncoming traffic. These turns will still be included if there is no reasonable alternative. (For auto and van Vehicle Routing Profiles only) |
| boolean True | False (Default). governorSpeedLimit | Maximum average road speed to use in route calculations that overrides all other road speeds when they are above
this value. Default is disabled and valid value is between 1 and 100 mph. |
| double The format is in mph or kph based on | distUnits .condenseDirs | Flag indicating whether or not to condense the directions report. |
| boolean True | False (Default) elevLimit |
Indicates the elevation limit when generating a route. Default value is null. Elevation unit can be either meters
or feet is determined by the | distUnits parameter. Miles = feet, Kilometers = meters.
Available for dataVersion Current, PCM_NA, and PCM29 and higher. Limit will be ignored if: Routing is deemed impractical with
the limit, or a stop is located at an elevation higher than the limit. (North America only)
| Int 3000 | ferryDiscourage | Indicates whether or not to discourage the use of ferries when creating the route. |
| boolean True | False (Default) useSites | POST: UseSites
Indicates whether the stops are on Sites or not and accordingly considers Site Gates in Routing. The default value
is false.
|
| boolean True | False (Default) afSetIDs | POST: AFSetIDs The IDs of the Route Modifier (avoid/favor) sets that should be applied to the route. The format is comma separated IDs. The IDs are integers. Set to [-1] to select all sets. | List of comma separated IDs | 24,133,204 | afSetNames | POST: AFSetNames The names of the Route Modifier (avoid/favor) sets that should be applied to the route. Default is an empty set. | List of comma separated names. | Highways,TollRoads,Malls | trlType | The type of trailer. This and all trailer related information below is used for Toll Detail reports in Europe
|
| Enum
1 - None (Default) | 2 - Caravan 3 - Trailer trlCount | The number of trailers and semi-trailers. Default is 0. For Toll Detail reports in Europe. |
| Int 0 | trlMaxHt | Do not use. |
| string 20' | trlMaxWt | Do not use. |
| Int 30000 | trlMaxAxles | The maximum number of axles on the trailer. Acceptable values are 1 through 8. The default value is 1. |
| Int 1 | isHybrid | POST: Hybrid Indicates whether the vehicle has a hybrid engine. Default is false. For Toll Detail reports in Europe. |
| boolean True | False (Default) emiType | POST: EmissionType The emission type of the engine. For Toll Detail reports in Europe. |
| Enum 2 - Euro0 | 3 - EuroI 4 - EuroII 5 - EuroIII 6 - EuroIV 7 - EuroV 8 - EuroVI (Default) 9 - EuroEEV minPoll | POST: MinPollutionVeh Indicates whether vehicle is a minimum vehicle pollution. Default is false. For Toll Detail reports in Europe.
|
| boolean True | False (Default) POST: RestrictionZones (Europe Only) | An object that sets whether the route can pass through a | CongestionZone , a LowEmissionZone , or an UltraLowEmissionZone . For each type of zone, three settings are available:
| boolean "RestrictionZones": { |  "CongestionZone": Avoid,  "LowEmissionZone": Allow,  "UltraLowEmissionZone": Warn } |