Vehicle Location API Documentation

01

Authorization

Authenticate every API request using a token provided by the carrier company.

🔐
Bearer Token

Request the carrier company to grant you with the token. The given token should be included in the Authorization header for each request. Full control over the token management is done by the carrier company.

02

List vehicles

Returns current information of the company vehicles.

GET/vehicles/current

Parameters

NameTypeMandatoryDefault
pageIntegerNo0
sizeIntegerNo10

Request Sample

cURL
curl -X 'GET' \
  'https://api.trackproeld.com/logger/external/vehicles/current?page=0&size=10' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer {token}'

Response Structure

JSON
{
  "result": {
    "code": "ok",
    "description": "ok"
  },
  "content": […],
  "pageable": {
    "total": "number of total elements",
    "prev": "the previous page number | null",
    "next": "the next page number | null",
    "current": "current page number"
  }
}
i

pageable is present only if response HTTP status is 200.

200

Success response

{
  "result": {
    "code": "ok",
    "description": "ok"
  },
  "content": [
    {
      "vehicle": {
        "id": 403,
        "make": "Freightliner",
        "model": "TR",
        "vin": "3AKJHHDR5JSHU5802",
        "unit_number": "424"
      },
      "driver": {
        "id": 849,
        "name": "AHADI MALAK"
      },
      "location": {
        "vehicle_coordinates": {
          "latitude": 40.353963,
          "longitude": -76.725971
        },
        "nearby_location_coordinates": {
          "latitude": 40.36351,
          "longitude": -76.74677
        },
        "distance": 1.69,
        "state": "PA",
        "location": "West Hanover Township",
        "time": "2024-04-06T08:53:52",
        "direction": "se"
      },
      "dot": "3666726"
    }
  ],
  "pageable": {
    "total": 140,
    "prev": null,
    "next": 1,
    "current": 0
  }
}
403

Forbidden

{
  "result": {
    "code": "forbidden",
    "description": "forbidden"
  },
  "content": null
}
401

Unauthorized

{
  "result": {
    "code": "invalid_token",
    "description": "Invalid token"
  },
  "content": null
}
03

Get vehicle by unit number

Returns current information of the company vehicle by unit number.

GET/vehicles/{unit_number}

Request Sample

cURL
curl -X 'GET' \
  'https://api.trackproeld.com/logger/external/vehicles/{unit_number}' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer {token}'

Response Sample

JSON
{
  "result": {
    "code": "ok",
    "description": "ok"
  },
  "content": {
    "vehicle": {
      "id": 736,
      "make": "Volvo",
      "model": "VNL",
      "vin": "4V4NC9EJ2PN615282",
      "unit_number": "826"
    },
    "driver": {
      "id": 1487,
      "name": "Mustafa Sahebzada"
    },
    "location": {
      "vehicle_coordinates": {
        "latitude": 42.8255,
        "longitude": -78.8582
      },
      "nearby_location_coordinates": {
        "latitude": 42.819444444,
        "longitude": -78.825555555
      },
      "distance": 1.24,
      "state": "NY",
      "location": "Lackawanna",
      "time": "2024-10-02T13:39:37",
      "direction": "nw"
    },
    "dot": "3666726"
  }
}
04

Get vehicle by VIN

Returns current information of the company vehicle by VIN number.

GET/vehicles/by-vin/{vin_number}

Request Sample

cURL
curl -X 'GET' \
  'https://api.trackproeld.com/logger/external/vehicles/by-vin/{vin_number}' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer {token}'

Response Sample

JSON
{
  "result": {
    "code": "ok",
    "description": "ok"
  },
  "content": {
    "vehicle": {
      "id": 254,
      "make": "Volvo",
      "model": "FT",
      "vin": "3AKJHHDR5JSHU5802",
      "unit_number": "111"
    },
    "driver": {
      "id": 35481,
      "name": "Jeremy Halil"
    },
    "location": {
      "vehicle_coordinates": {
        "latitude": 42.8255,
        "longitude": -78.8582
      },
      "nearby_location_coordinates": {
        "latitude": 42.819444444,
        "longitude": -78.825555555
      },
      "distance": 1.24,
      "state": "NY",
      "location": "Lackawanna",
      "time": "2024-10-02T13:39:37",
      "direction": "nw"
    },
    "dot": "3555547"
  }
}