Skip to main content

Get GPS Coords

Trip Management’s Get GPS Coords API gets all of the GPS coordinates that have been recorded by calling the Update Positions API for your previously generated route.

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

GET /gpsCoords/{tripId}

Resource URL

https://tripmanagement.alk.com/api/gpsCoords/{tripId}

Request Fields

FieldDescriptionTypeRequired
tripIdThe alkTripId returned when the trip was planned.
integer
Yes

GET /gpsCoords?tripId={tripId}

Resource URL

https://tripmanagement.alk.com/api/gpsCoords?tripId={tmsTripId}

Request Fields

FieldDescriptionTypeRequired
tmsTripIdThe tmsTripId in your planning system.
Note: This API will only work with the integrator determined tmsTripId string
string
Yes

Response Fields

Same response for both the types of requests

FieldDescriptionType
coordsThe object containing the latitude/longitude of the GPS.
Coords object
coords/latThe GPS latitude.
string
coords/lonThe GPS longitude.
string
SpeedThe Speed recorded from the GPS.
integer
HeadingThe Heading of the GPS.
integer
AltitudeThe Altitude of the GPS.
integer
DeviceDTThe device’s timestamp of the GPS position. The value must be in ISO-8601 format.
string
idThe unique identifier of the GPS position.
integer

Sample Response

[
  {
    coords: {
      lat: "40.452627",
      lon: "-79.141919"
    },
    speed: 0,
    heading: 0,
    altitude: null,
    deviceDT: "2017-09-19T16:48:48",
    id: 87173528
  },
  {
    coords: {
      lat: "40.12345",
      lon: "-79.12345"
    },
    speed: 30,
    heading: 20,
    altitude: 1000,
    deviceDT: "2017-09-19T19:19:19",
    id: 87173529
  }
];
Last updated November 23, 2021.