You are on page 1of 2

API Documentation

Error Handling: ​The general method for error handling will be to make the success
param false and add the error message as shown below.

Sample {
Response "success": false,
"message": "Device is not registered"
}

  Verify Device ID
1.

Description This API receives the devices IMEI number and verifies if it is one of
the registered devices previously given access to the device tracking
app

Endpoint verifyDeviceId

Method GET

Request imei (String)

Sample {
Response "success": true,
"message": ""
}

 
2. Alert

Description This API alerts when the device is no longer in the region and
responds with error messages or a success

Endpoint alert

Method POST

Request imei String

status Boolean

Sample {
Response "success": true,
"message": ""
}

 
3. Upload Data

Description This API uploads location data to the server and responds with error
messages or a success
Endpoint uploadData

Method POST

Sample {
Request "imei": "12121212121212",
"data": [
{
"datetime": "2020-03-31T13:22Z",
"longitude": 44.55,
"latitude": 0.44
},
{
"datetime": "2020-03-31T13:44Z",
"longitude": 44.54,
"latitude": 0.43
},
{
"datetime": "2020-03-31T13:55Z",
"longitude": 44.64,
"latitude": 0.43
}
]
}

Sample {
Response "success": true,
"message": ""
}

You might also like