Vehicle Current Location
This API is meant to return current location of a vehicle.
POSThttps://yourdomain.com/webservice?token=getVehicleCurrentLocation
Request Parameters
Parameter | Type | Value | Description |
---|---|---|---|
vehicle_no | String | Vehicle Number | |
auth-code | String | It is Mandatory and we have to pass Generated token in header of the request. |
Description
Method Name
getVehicleCurrentLocation
Request
Request Format | JSON |
Request body
{
"vehicle_no": "XXXXXXXX"
}
Prerequisites
Before calling this API we need to call generateAccessToken API in order to generate the token.
Acceptance Criteria
Verify the authentication token.
Access to specific rights on user.
Response Description
Key | Format | Description |
vehicleNumber | String | Vehicle Number |
latitude | Double | Vehicle Lat |
longitude | Double | Vehicle Long |
location | String | Vehicle Location |
speed | String | Vehicle Speed with scaling value |
signal_strength | String | Vehicle Signal Strength |
main_power | String | Main Power |
timestamp | String | Data Insert time |
Error Code | Status |
0 | Fail |
1 | Success |
Sample Response
Success message{
"status": 1,
"data": [
{
"vehicleNumber": "XXXXXX",
"latitude": 0.0,
"longitude": 0.0,
"location": "--",
"speed": "",
"signal_strength": "NA",
"main_power": "NA",
"timestamp": "--"
}
],
"message": "Vehicle information not found for "
}
FAIL
{
"status": 0,
"data": [],
"message": "Vehicle not found"
}
FAIL
{
"status": 0,
"data": [],
"message": "Multiple application rights found on user."
}
FAIL
{
"status": 0,
"data": [],
"message": "Please wait for 10 Seconds for next API call."
}
FAIL
{
"status": 0,
"data": [],
"message": "Refresh Token Expired"
}
FAIL
{
"status": 0,
"data": [],
"message": "Invalid Token"
}
FAIL
{
"status": 0,
"data": [],
"message": "Something went wrong on server."
}
Response codes
Code | Description |
---|
Error codes
Code | Name | Description |
---|