Way

General Description

The Way method returns the list of vehicle locations for the period provided as a parameter. It only returns vehicles to which the user has access. The method accepts as parameters a list of up to 10 vehicleId values and a period of up to 31 days.

It is subject to the restrictions described in Rate Limit

⚠️ All requests to this endpoint must include the api-version=2.0 parameter in the URL.
URL: POST https://api.trackgps.ro/api/carriers/way?api-version=2.0

⚠️ Note: All date and time values sent or returned by this endpoint are in the company’s local time zone.


Request Parameters

{
  "vehiclesList": [
    0
  ],
  "startDate": "2024-09-09T09:21:50.133Z",
  "endDate": "2024-09-09T09:21:50.133Z"
}
  • vehiclesList: List of vehicleId values for which you want to obtain locations.
  • startDate: Start date and time of the period for which locations are requested.
  • endDate: End date and time of the period for which locations are requested.

Response Structure

{
  "payload": [
    {
      "vehicleId": 0,
      "gpsDate": "2024-09-09T09:21:50.134",
      "latitude": 0,
      "longitude": 0,
      "speed": 0,
      "course": 0
    }
  ],
  "correlationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "failureReasons": [
    {
      "errorCode": "string",
      "errorParameters": [
        "string"
      ]
    }
  ],
  "isSuccess": true
}

Property Descriptions

  • payload: List of vehicle locations.
    • vehicleId: Unique ID of the vehicle.
    • gpsDate: Date and time of the last GPS update.
    • latitude: Latitude of the vehicle’s location.
    • longitude: Longitude of the vehicle’s location.
    • speed: Speed of the vehicle.
    • course: Direction of vehicle movement.
  • correlationId: Unique ID for correlating the request and response.
  • failureReasons: List of failure reasons, if any.
    • errorCode: Error code.
    • errorParameters: Additional parameters for the error.
  • isSuccess: Indicator if the request was processed successfully.