POST Route Path

The /route/routePath POST request retrieves a series of geographic coordinate points that make up a route.

(Note: Requires a license for access to Trimble MAPS JavaScript.)

Request URL

POST https://pcmiler.alk.com/apis/rest/v1.0/Service.svc/route/routePath?dataset={dataset}

Request Element

A POST routePath request requires a JSON formatted RoutePointsRequestBody object in the POST body.

ParameterDefinitionRequired
datasetThe regional dataset. Possible value: Current (default), PCM_EU, PCM_OC, PCM_SA, PCM_AF, PCM_AS, PCM_ME, PCM_GT, PCM_WW, PCM_NA and PCM23-PCM31.N

Sample JSON POST Body

{
  "Route": {
    "Stops": [
      {
        "Coords": {
          "Lat": "42.12345",
          "Lon": "-76.12345"
        },
        "Region": 4
      },
      {
        "Coords": {
          "Lat": "42.12312",
          "Lon": "-76.12312"
        },
        "Region": 4
      },
      {
        "Coords": {
          "Lat": "42.12456",
          "Lon": "-76.12456"
        },
        "Region": 4
      }
    ],
    "Options": {
      "BordersOpen": true,
      "DistanceUnits": 0,
      "HazMatType": 0,
      "HighwayOnly": false,
      "TruckCfg": {
        "Weight": "9000",
        "Axles": 6,
        "Units": 0,
        "LCV": false,
        "Width": "8'0"
      },
      "RouteOptimization": 0,
      "RoutingType": 0,
      "VehicleType": 0,
      "ClassOverrides": 3,
      "OverrideRestrict": false,
      "SideOfStreetAdherence": 0
    }
  }
}

Sample Response

{
  "type": "Feature",
  "geometry": {
    "type": "MultiLineString",
    "coordinates": [
      [[-76.12345, 42.12345], [-76.12312, 42.12312]],
      [[-76.12312, 42.12312], [-76.12456, 42.12456]]
    ]
  },
  "TMinutes": 0,
  "TDistance": 0.183
}