Tracking API
We are providing additional support to track your vehicle and get easy update on the status of your vehicle. Providing access to our API which provide data and you can use it in your system.
Parts of API
- Access code - This is provided inside your profile account. You can find it inside your profile details. Use this Access code to get response from server. This is encrypted end to end encryption. It is reliable and secure.
- Method - Provide the name of the valid method what type of data retrieve from the server. Invalid method name can result failed call to server
- Input JSON - Few methods required some input which needs to be provide in input. Ex. If you want to get data for specific vehicle then you have to give vehicle_no parameter.
We are providing an option to customise your output JSON. For that you have to give key called parameters and give the data key which you want in particular output. - Access Time - we are restricting our API for duration between two request otherwise it will give you respecting error.
How to use
1 Use the provided URL to access the API. Your_URL/tracking
HttpPost request = new HttpPost(baseUrl + “/tracking);
2 Set the Headers for given URL. Here two parameters are mandatory which is required to access the API
auth_code
method
Sample for JAVA
request.setHeader("auth_code", “Ey-8dwdhiushduhsdb”);
request.setHeader("method", “getLocation”);
3 Set INPUT JSON for the given URL.
Sample for JAVA
request.setEntity(JSONData);
4 Set the content type.
Our API supports content type : application/json
Sample for JAVA
request.setHeader("Content-type", "application/json");
Sample response
Failed response
{
“success”:false,
“status”:{
“code”:100,
“message”:”Given Token is invalid”
}
}
Success response
{
“success”:true,
“vehicles”:{
“object”:”GJ-15-AD-2959”,
“status”:”running”,
“fuel”:12 ltrs
}
}
Error codes
Apart from HTTP standard error code we provide our custom error code to make the experience richer than before.
Use those error code to understand your request and correct it easily
Code | Name | Description |
---|
Our Services
In all service there is an option for customisation. If you provide parameters then it returns only that parameters in JSON response. Give single or multiple parameters in key. Set the parameters in given format:
“parameters”: “object,duration”
Duration
- It supports two duration
start_date
andend_date
Keys. start_date
is start time for the period andend_date
is the end time for the period.- All the dates support given format. Our API follow
dd-MM-yyyy HH:mm
pattern. The hours should be in 24 hours format. - Minimum time duration can be 15 minutes.
- If there is no parameters of
start_date
andend_date
then it returns data of current day. - Give both
start_date
andend_date
together if one is not available the it returns the default which is current day. Ex. “start_date”:”12-04-2020 09:10” , “end_date”:”12-04-2020 18:50”.