Web Services FAQs
Contents
Getting started
What is PC*Miler Web Services?
PC*Miler Web Services (PCMWS) is a suite of APIs that provides truck routing, mileage calculations, and location services. It lets you integrate these capabilities into your transportation, logistics, or fleet management applications.
What’s the best way to start integrating PC*Miler Web Services into an existing TMS or logistics platform?
- Start with the Route Reports endpoints for simple point-to-point routing.
- Then expand to multi-stop routing and cost calculations.
- Use sandbox credentials during development before moving to production.
- Note: Calling Route Reports requires a PCMWS API key. If you do not have one, you can request a free, limited-time trial key.
How does PC*Miler Web Services handle version control?
- Releases are versioned by PC*Miler data (for example,
PCM38andPCM39) and by API version. - Specify which data version in API calls using the
dataVersionordatasetparameters. Currentis the default and recommended value, but map data updates in the current version may change route mileage compared with a numbered version.
How do I know which API or report type is right for my use case?
- Start with the task you want to accomplish (e.g., determine mileage, get directions, calculate costs, or retrieve location details).
- Choose the endpoint or report type that corresponds to that output.
Custom routing
Can I customize routing preferences per driver or fleet?
Yes. Routing preferences can be configured either per request or through reusable Vehicle Routing Profiles, giving you flexibility at both the individual driver and fleet levels.
Using the Route Reports POST API, you can dynamically control routing behavior by passing parameters in the request body, such as roads to avoid or favor, hazardous materials routing rules, vehicle dimensions, and route type.
What are the differences between avoids and closures and how do they impact my route?
Avoids and closures, which are created in the ContentTools web app, discourage the use of certain roads in routing. They have the exact same influence on routing, but they are applied differently:
- Avoids are grouped in sets that can be specified in a request using
AFSetIDs. They are applied only when explicitly included in the request. - Closures are applied at the account level and are automatically used.
- There is also a third category of closures derived from traffic data (e.g., roads closed due to construction or maintenance). These closures are typically enforced alongside user-defined avoids and closures. (Requires traffic add-on and
UseTrafficmust be set totrue).
How are ETAs calculated and can they adjust dynamically based on traffic?
Standard ETAs are based on historical traffic flow speeds by roadway class. For dynamic ETAs, the Traffic add-on uses real-time and predictive traffic data to update travel times.
Settings
What does ClassOverrides mean in PC*Miler Web Services?
ClassOverrides is a deprecated parameter that previously enabled 53-foot truck routing. Starting with version PCM38, the routing algorithm automatically calculates 53-foot routing based on vehicle dimensions.
For existing customers who need to continue using this parameter, an Enable Class Overrides add-on can be applied to your API key. When enabled, setting ClassOverrides = 1 activates 53-foot truck routing and automatically applies 53-foot truck dimensions (636" length, 102" width), routing through the appropriate state and national truck network.
While we recommend using vehicle routing profiles or passing vehicle dimensions directly in requests instead, you can Contact support to enable this add-on.
What are the differences between Practical, Shortest, and Fastest route types?
- Practical routes prioritize truck-legal, time-efficient roads (like interstates) while minimizing cost. This is the route drivers most likely would take.
- Shortest routes minimize distance regardless of travel time.
- Fastest routes use day of the week or time of day information in conjunction with real-time or historical traffic data to calculate the quickest route to the destination. (This setting is recommended for smaller vehicles only as it may favor lower-class roads.)
Are RouteType and RoutingType the same in PC*Miler Web Services?
Yes, both parameters control the same routing algorithm (such as Practical or Shortest). The parameter name varies based on your request method:
- GET requests: use
routeTypeas a query parameter. - POST requests: use
RoutingTypein the request body underOptions.
How can I validate the speed limit on a road?
If you need to validate the posted speed limit for a specific location, you can use the Reverse Geocoding endpoint with the IncludePostedSpeedLimit parameter enabled. (Requires speed limit add-on)
Example request:
https://pcmiler.alk.com/APIs/REST/v1.0/service.svc/locations/reverse?coords=-75.557931,40.563821&IncludePostedSpeedLimit=true®ion=NA&authToken=<API_KEY>
This request returns location details along with the posted speed limit for the road segment.
Does the useSites parameter in PC*Miler Route Reports default to true or false?
The useSites parameter defaults to false when not explicitly provided. The effective value follows this priority order:
- If
useSitesis specified in the request, that value is used. - If a vehicle routing profile is applied and has
useSitesset, that value is used. - If a default profile by vehicle type has
useSitesset, that value is used. - Otherwise, it defaults to false.
Note: Some preset Vehicle Routing Profiles (VRPs) may enable sites by default, making it appear as though useSites defaults to true in certain scenarios.
Does HighwayOnly avoid ferries?
No. The HighwayOnly option does not avoid ferries. HighwayOnly restricts routing to the highway-level network (major roads and backbone data), but ferries may still be included if they exist within that network. If you need to avoid ferries, you must use a ferry-specific option (e.g., FerryDiscourage or equivalent), not HighwayOnly.
Points of Interest (POI) searches
What is the difference between POIs Along Route and POI Radius Search?
POI Radius Search is part of the Geocoding APIs and finds points of interest around a single location using coordinates or an address. Example use case:
- Find truck stops within 10 miles of a location.
- Find fuel stations near a warehouse.
POIs Along Route is a Routing API feature which requires a license add-on and searches for points of interest along an entire route between two or more locations. Example use case:
- Find truck stops along a route from Princeton to New York.
- Find rest areas along a long-haul trip. Instead of a circle, the system scans along the route corridor.
Version differences
After upgrading to PC*Miler 39, why does our Route Reports response now contain three dictionaries instead of two?
The additional dictionary is a route-level metadata object that contains the RouteID and any route-level Errors. When you submit a request with a RouteID, the response includes that same RouteID so you can easily correlate results back to the original route. This is especially useful when submitting multiple routes in a single request.