TrackerPro Admin API: Task
September 23, 2024TrackerPro Client API
September 29, 2024TrackerPro Admin API: Vehicles
Vehicle information is generally returned from the API in a VehicleDetailsDataSet Asset table.
To reduce the number of server calls this is an unnormalised view of the current state of the vehicle. It includes information such as the currently assigned driver and tracker as well as some standard vehicle fields.
Note that the unique VehicleId field is important as a number of other calls in the system require this as a parameter.
Calls in this section
GetAllVehiclesForClientID
Retrieve all vehicles for the given client.
Request (Query Parameters)
Parameter | Value | Notes |
op | Vehicle | Required |
subop | GetAllVehiclesForClientID | Required |
company | Client/Account name | Required |
Response
The dataset returned is a VehicleDetailsDataSet. This dataset is returned by a number of other Vehicle calls. This is a wide dataset containing large amount of data related to a vehicle.
{
"version":"0.6",
"reqId":"",
"status":"ok",
"sig":"388421001",
"dataset":{
"datasetname":"VehicleDetailsDataSet",
"tables":[
{
"cols":[
{
"id":"0",
"label":"VehicleID",
"type":"number",
"p":{
"autoincrement":true
}
},
{
"id":"1",
"label":"CurrentUnitID",
"type":"number",
"p":{}
},
{
"id":"2",
"label":"TypeID",
"type":"number",
"p":{}
},
{
"id":"3",
"label":"GroupID",
"type":"number",
"p":{}
},
{
"id":"4",
"label":"Description",
"type":"string",
"p":{}
},
{
"id":"5",
"label":"Registration",
"type":"string",
"p":{}
},
{
"id":"6",
"label":"HourlyCost",
"type":"number",
"p":{}
},
{
"id":"7",
"label":"KMCost",
"type":"number",
"p":{}
},
{
"id":"8",
"label":"DepotID",
"type":"number",
"p":{}
},
{
"id":"9",
"label":"DepotName",
"type":"string",
"p":{}
},
{
"id":"10",
"label":"TimeStamp",
"type":"string",
"p":{}
},
{
"id":"11",
"label":"DriverID",
"type":"number",
"p":{
"autoincrement":true
}
},
{
"id":"12",
"label":"Name",
"type":"string",
"p":{}
},
{
"id":"13",
"label":"DriverStartDate",
"type":"datetime",
"p":{}
},
{
"id":"14",
"label":"DriverEndDate",
"type":"datetime",
"p":{}
},
{
"id":"15",
"label":"UnitStartDate",
"type":"datetime",
"p":{}
},
{
"id":"16",
"label":"UnitEndDate",
"type":"datetime",
"p":{}
},
{
"id":"17",
"label":"CurrentDisplayTerminalID",
"type":"number",
"p":{}
},
{
"id":"18",
"label":"CurrentDisplayTerminalDescription",
"type":"string",
"p":{}
},
{
"id":"19",
"label":"Make",
"type":"string",
"p":{}
},
{
"id":"20",
"label":"Model",
"type":"string",
"p":{}
},
{
"id":"21",
"label":"CurrentOdo",
"type":"number",
"p":{}
},
{
"id":"22",
"label":"CurrentHoursWorked",
"type":"number",
"p":{}
},
{
"id":"23",
"label":"EmsEngineType",
"type":"number",
"p":{}
},
{
"id":"24",
"label":"FreeText",
"type":"string",
"p":{}
},
{
"id":"25",
"label":"EmissionFactorType",
"type":"number",
"p":{}
}
],
"rows":[
],
"p":{
"tablename":"Assets",
"primarykey":[
0
]
}
}
]
}
}
Fields to note include:
- VehicleId – unique internal id of the vehicle
- TypeId – vehicle type id
- CurrentUnitID – currently assigned tracker id (this is *not* the tracker serial number)
- UnitStartDate – CurrentUnitID assignment start in UTC
- UnitEndDate – CurrentUnitID assignment end in UTC
- GroupID – the vehicle group
- Registration – the vehicle registration
- Description – the description
- Make – the vehicle make
- Model – the vehicle model
- FreeText – free text, as displayed in notes field
- DriverId – currently assigned driver (internal id)
- DriverName – currently assigned driver name
- CurrentOdo – kms travelled
- CurrentHoursWorked – hours worked
Back to: Contents