API Documentation: Vehicle Tracking by VIN number

GET /api/units/:usdot/:vin

This endpoint provides information about a specific vehicle associated with a specified USDOT number and VIN (Vehicle Identification Number).

URL

https://api.onroadnetworks.com/api/units/:usdot/:vin

Parameters:

  • :usdot (required): The USDOT number associated with the units.
  • :vin (required): The Vehicle Identification Number of the vehicle.

Authentication

To access this endpoint, the following headers must be included in the request:

Key:x-api-key
Value:API key value
Key:provider-token
Value:Provider token value

Example

cURL

curl --location --request GET 'https://api.onroadnetworks.com/api/units/:usdot/:vin' --header 'x-api-key: ${key}' --header 'provider-token: ${token}'

Response format

JSON

{ "truckNumber": "string", "vin": "string", "coordinates": { "lat": 0.0, "lng": 0.0 }, "timestamp": "string date", "licensePlate": { "state": "string", "number": "string" }, "assetType": "string", "unixTimestamp": 0, "deviceId": "string", "make": "string", "model": "string", "year": 0, "fuelType": "string" }

Generating API Key

API keys can be generated by following the steps below:

  1. In the left sidebar, navigate to the “API Keys” section under “More”
  2. Click the “Add a key” button in the top right
  3. Fill in the key name and configure access settings, then submit the form
Step №1
First step
Step №2
Second step
Step №3
Third step
Step №4
Fourth step

Test Data

Endpoint:https://api.onroadnetworks.com/api/units/:usdot/:vin
USDOT:0
VIN Number:3AKJHHDR4PSNH1111
x-api-key:2b2y38VUi9AWSSUQRn5GD8eKLuKFlORBV7rk-8dCmFTAonRoadELD
provider-token:1R8xFqCfchWVnjjQonRoadELD
cURL

curl --location --request GET 'https://api.onroadnetworks.com/api/units/0/3AKJHHDR4PSNH1111' --header 'x-api-key: 2b2y38VUi9AWSSUQRn5GD8eKLuKFlORBV7rk-8dCmFTAonRoadELD' --header 'provider-token: 1R8xFqCfchWVnjjQonRoadELD'

Notes

  • Ensure that the API key and provider token are kept secure and not exposed in client-side code.
  • All timestamps are in ISO 8601 format.