Vehicle Information
This API is meant to return Vehicle internal information for live data and for specified date it return vehicle info like lat, long, odometer detail, etc based on user with it
Request Parameters
Parameter | Type | Value | Description |
---|---|---|---|
username | String | Account Username | |
vehicle_no | String | Vehicle Number | |
duration | String | Duration | |
token_id | String | Token ID |
Description
Method Name
getVehicleInformation
Acceptance Criteria
User License is not expired
API is specific for project VTS
Date diffrence must not be more than 10 min.
URL
URL With Duration
http:domain.com/webservice?token=getVehicleInformation&username=XXX&vehicle_no=YYY&duration=yyyy-MM-dd HH:mm:ss~yyyy-MM-dd HH:mm:ss
URL Without Duration (For Live Data)
http:domain.com/webservice?token=getVehicleInformation&username=XXX&vehicle_no=YYY
Response Description
Response Description for specified date
Key | Format | Description |
prev_ign | String | Last Day Ignition status |
prev_cdrt | String | Continue Data Receiving Time |
prev_drt | String | Data Received Time |
prev_odm | String | Odometer value |
prev_speed | String | Vehicle Speed value |
prev_smode | String | Sleep Mode Value |
prev_lat | String | Vehicle Data Received Time Latitude |
prev_lng | String | Vehicle Data Received Time Longitude |
prev_can_odometer | String | Canodometer value |
prev_loc | String | Vehicle Location |
Response Description for Vehicle Live Information
Key | Format | Description |
serverTimeStamp | String | Data Inserted Time |
odometer | String | Odometer value |
latitude | Double | Vehicle Latitude |
internalBatteryVoltage | Double | Internal Battery Voltage |
deviceImeiNo | String | Vehicle IMEI No |
AssetCode | String | Asset Code |
speed | Integer | Vehicle Speed |
companyId | String | Company ID |
engine | String | Engine |
assetId | String | Asset ID |
externalBatteryVoltage | Double | External Battery Voltage |
eventTimeStamp | String | Data Inserted Time |
vehicleType | String | Vehicle Type |
status | String | Vehicle Status |
longitude | Double | Vehicle Longitude |
direction | Integer | Direction |
Error Code | Status |
0 | Fail |
1 | Success |
Sample Response
Success message{
"result": 1,
"data": [
{
"serverTimeStamp": "2023-03-18 18:36:36",
"odometer": "0.0",
"latitude": 35.7628315,
"internalBatteryVoltage": 4.2,
"deviceImeiNo": "XXXXXX",
"AssetCode": "XXX",
"speed": 14,
"companyId": "X",
"engine": "--",
"assetId": "XXX",
"externalBatteryVoltage": XXXXX,
"eventTimeStamp": "2023-03-18 18:36:36",
"vehicleType": "XXX",
"status": "Not Reporting",
"longitude": -5.8408395,
"direction": 40
}
],
"message": ""
}
FAIL
{
"result": 0,
"message": "Invalid parameter."
}
FAIL
{
"result": 0,
"message": "Error in service : Data not found !"
}
FAIL
{
"result": 0,
"message": "No user found."
}
FAIL
{
"result": 0,
"message": "You can request after X Min"
}
FAIL
{
"result": 0,
"message": "Incorrect username / password."
}
FAIL
{
"result": 0,
"message": "Licence expired for user."
}
FAIL
{
"result": 0,
"message": "No vehicle found."
}
FAIL
{
"result": 0,
"message": "Licence expired for vehicle."
}
FAIL
{
"result": 0,
"message": "GPS device not found for vehicle(s)."
}
FAIL
{
"result": 0,
"message": "No data found."
}
FAIL
{
"result": 0,
"message": "Please provide proper duration parameter."
}
FAIL
{
"result": 0,
"message": "Please give date in \"yyyy-mm-dd hh:mm\" format"
}
FAIL
{
"result": 0,
"message": "From date is less than To date of duration parameter."
}
FAIL
{
"result": 0,
"message": "Date diffrence not allowed more than 10 min."
}
FAIL
{
"result": 0,
"message": "Invalid duration parameter."
}
Response codes
Code | Description |
---|
Error codes
Code | Name | Description |
---|