Get Route Path

Trip Management’s Get Route Path API gets the Lat/Lon coordinates that a Planned, InProgress or Completed route takes from origin to destination.

The following two variations of requests are supported for this functionality:

GET /trip/{tripId}/routePath

Resource URL

https://tripmanagement.alk.com/api/trip/{tripId}/routePath

Request Fields

Field Description Type Required
tripId The alkTripId returned when you planned the trip.
integer
Yes

GET /trip/routePath?tripId={tripId}

Resource URL

https://tripmanagement.alk.com/api/trip/routePath?tripId={tripId}

Request Fields

Field Description Type Required
tripId The alkTripId returned when you planned the trip or the tmsTripId in your planning system.
Note: Only one can be used when making a request through the URL. The search logic will check for the user’s trips with matching tmsTripId. If no trips are found with provided tmsTripId, then the check will continue for trips with matching alkTripId. If no trip is found matching with either of the Trip IDs, then no trip found response will be returned.
integer
or
string
Yes

Response Fields

Same response for both the types of requests

Field Description Type
Type The type of the GetRoutePath response.
string
TMinutes The total duration of the trip, in minutes
integer
TDistance The total distance of the trip in the distance units specified by the trip’s options (Miles or KM).
integer
Geometry Contains the Coordinate points along the route.
GeoJsonGeometry object
Geometry/type The type of the geometric object.
string
Geometry/coordinates An array of latitude and longitude coordinates along the route.
Array <double>

Example

Sample Response

{
  "type": "Feature",
  "geometry": {
    "type": "MultiLineString",
    "coordinates": [
      [
        [-74.59927, 40.360399],
        [-74.599225, 40.360364],
        [-74.599295, 40.36029],
        [-74.599365, 40.363488]
      ]
    ]
  },
  "tMinutes": 1,
  "tDistance": 0.905
}