Vehicle Location

This API is meant to return vehicle location data from specific time .

POSThttps://yourdomain.com/webservice?token=getVehicleLocationData&auth-code=XXXXXXXXXXXX
Request Parameters
Parameter Type Value Description
auth-codeStringheader tokenIt is Mandatory and we have to pass Generated token in header of the request
Description

Method Name

getVehicleLocationData


Prerequisites

Before calling this API we need to call generateAccessToken API in order to generate the token.


Acceptance Criteria

  1. API is specific for project VTS


Response Description


Key

Format

Description

location_address

String

Location name

Last_data_update_date_time

String

Last date and time of vehicle

Imei_no

String

Vehicle imei number

vehicle_no

String 

Vehicle number

Latitude

double

Vehicle latitude

Company

String 

Company name

Branch

String 

Branch name

Speed

int

Vehicle speed

Longitude

Double

Vehicle longitude

Status 

String 

ACTIVE/INACTIVE


Error Code

Status

0

Fail

1

Success


Sample Response
Success message
{
  "root": {
    "VehicleData": [
      {
        "location_address": "XXXXX",
        "last_data_update_date_time": "XXXXXXXXXXXXXX",
        "imei_no": "XXXXXXXXXXX",
        "vehicle_no": "XXXXXXXXXX",
        "latitude": "20.22222",
        "company": "uffizio",
        "branch": "XXXXXXXXXXX",
        "speed": "20",
        "vehicle_name": "XXXXX",
        "longitude": "10.255585",
        "status": "ACTIVE"
      }
    ]
  }
}
FAIL
{
         "root":{
          "error":"No Vehicle Found"
        }
}
FAIL
{
          "root":{
          "error":"Invalid Parameter"
        }
}
FAIL
{
         "root":{
          "error":"Refresh Token Expired"
        }
}
FAIL
{
          "root":{
          "Error":"invalid token"
        }
}
FAIL
{
          "root":{
          "Error":"invalid token"
        }
}
FAIL
{
          "root":{
          "Error":"Something went wrong on server"
        }
}
Response codes
Code Description
Error codes
Code Name Description