Post Derived Route Path

The POST DerivedRoute operation allows user to retrieve a list of reduce trip coordinates in GeoJson format based on a series of longitude/latitude pings and off route mileages window with POST request. It requires a license for access to ALKMaps application.

Request URL

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

Request Element

The PostDerivedRoutePath operation wraps the ReduceTripRequestBody and form a JSON format data in the POST body. See Details in ReduceTripRequestBody.

Element Definition Required
ReduceTripRequestBody A ReduceTripRequestBody System Object. It contains a collection of trip pings, value for the off route miles, value indicating highway only options, and the report type to return.
Y
RegionalDataSet The regional dataset. Possible value: Current (default), PCM_EU, PCM_OC, PCM_SA, PCM_AF, PCM_AS, PCM_ME, PCM_GT, PCM_WW and PCM_NA.
Y

Sample JSON Post Body

{   
      "ExtendedOptions":{  
         "EstimatedTimeOptions":{  
            "ETAETD":1,
            "DateOption":1,
            "DateAndTime":{  
               "CalendarDate":"4/23/2014",
               "DayOfWeek":0,
               "TimeOfDay":"6:00 AM",
               "TimeZone":0
            }
         },
         "TruckStyle":0,
         "UseTraffic":true
      },
      "HighwayOnly":false,
      "OffRouteMiles":0,
      "Region":4,
      "ReportTypes":null,
      "RoutePings":[  
         {  
            "Lat":"33.714154",
            "Lon":"-118.309434"
         },
         {  
            "Lat":"33.711154",
            "Lon":"-118.304434"
         }
      ],
      "RoutingOptions":{  
         "AFSetIDs":null,
         "BordersOpen":true,
         "ClassOverrides":0,
         "DistanceUnits":0,
         "ElevLimit":null,
         "FerryDiscourage":false,
         "FuelRoute":false,
         "HazMatType":0,
         "HighwayOnly":false,
         "HoSOptions":null,
         "HubRouting":false,
         "OverrideRestrict":false,
         "RouteOptimization":0,
         "RoutingType":0,
         "TollDiscourage":false,
         "TruckCfg":{  
            "Axles":5,
            "Height":"13'6\"",
            "LCV":false,
            "Length":"48'0\"",
            "Units":0,
            "Weight":"80000",
            "Width":"96\""
         },
         "UseAvoidsAndFavors":false,
         "VehicleType":0,
         "SideOfStreetAdherence":0
      }
}
                

Sample Response

{
  "type": "Feature",
  "geometry": {
    "type": "MultiLineString",
    "coordinates": [
      [
        [
          -118.309434,
          33.714154
        ],
        [
          -118.30895,
          33.714017
        ],
        [
          -118.307977,
          33.713744
        ],
        [
          -118.307009,
          33.71347
        ],
        [
          -118.306045,
          33.713216
        ],
        [
          -118.305566,
          33.713081
        ],
        [
          -118.305495,
          33.713057
        ],
        [
          -118.305349,
          33.712976
        ],
        [
          -118.305143,
          33.712807
        ],
        [
          -118.30508,
          33.712769
        ],
        [
          -118.304701,
          33.71257
        ],
        [
          -118.30424,
          33.712379
        ],
        [
          -118.303813,
          33.712205
        ],
        [
          -118.304434,
          33.711154
        ]
      ]
    ]
  },
  "TMinutes": 0,
  "TDistance": 0
}