This is an API wrapper for Wialon to easily determine who is driving a vehicle given a specific time. All requests to the API are achieved with GET requests. All returned data are in the form of JSON.
A driver must be created in Wialon and the driver code must contain the same code that is in the RFID.
Geofences in Wialon containing the word "salik" (case insensitive) are automatically included in the API when getting driver data.
http://driver-api.atsuae.net/units?token=
[
/* Return an array of all units in the account. */
{
"id": "[NUMBER]",
"name": "[STRING]",
"plate": "[STRING]", // (Nullable)
"vin": "[STRING]", // (Nullable)
"imei": "[STRING]"
}
];
- token
- Access token used to login to an account.
http://driver-api.atsuae.net/units?token=[TOKEN_HERE]
http://driver-api.atsuae.net/driving-data?from=&to=&identifier=&identifierType=&token=
{
"drivers": [ /* Array of drivers in case there are multiple drivers in your selected time interval (from & to parameters)*/
"name": "[STRING]", /* Driver name */
"code": "[STRING]", /* RFID value. Unique on all drivers */
"phone": "[STRING]" /* Driver phone. */
],
"maxSpeed": "[NUMBER]", /* In Kilometers per hour */
"salikTolls": [ /* Array of all salik tolls passed in the duration interval (from & to parameters) */
"name": "[STRING]", /* Toll booth name */
"lat": "[NUMBER]",
"lng": "[NUMBER]",
"time": "[NUMBER]" /* Time the driver has passed the gate */
],
"foundMatches": "[NUMBER]", /* Found matches with from the identifier parameter provided. */
"messages": [ /* Array of all the device messages sent by the device */
"lat": "[NUMBER]",
"lng": "[NUMBER]",
"time": "[NUMBER]",
"driverCode": "[STRING]", /* Driver RFID value */
"address": "[STRING]" /* Address formatted in the order: house, street, city, region, country */
],
"unit": { /* Details for the found unit */
"name": "[STRING]", /* Unit name (Nullable) */
"plate": "[STRING]", /* Vehicle plate number (Nullable) */
"vin": "[STRING]", /* Vehicle vin number (Nullable) */
"imei": "[STRING]" /*Device IMEI (Nullable) */
}
}
- token
- Access token used to login to an account.
- from
- Get all messages from the device between from & to.
- Time is formatted in unix time stamp https://www.unixtimestamp.com/
- Maximum interval between from & to is 30 minutes.
- If interval is more than 30 minutes specified in the parameters, it will default to 30 minutes.
- to (Optional)
- Get all messages from the device between from & to.
- If NOT specified, interval will be 30 minutes from the "from" parameter.
- Time is formatted in unix time stamp https://www.unixtimestamp.com/.
- Maximum interval between from & to is 30 minutes.
- If interval is more than 30 minutes specified in the parameters, it will default to 30 minutes.
- identifier
- Search keyword on which unit to return.
- If multiple units are found, only the first unit will be returned.
- identifierType (Optional)
- Possible values are
imei
|name
|vin
|plate
. Default isimei
. Note that these values are taken from the unit profile in Wialon.imei
- IMEI number of the unit. Unique on all units.name
- Unit name in Wialon.vin
- Vehicle chassis number in Wialon unit profile.plate
- Plate number in Wialon unit profile.
- Determines what property to search in with the identifier provided.
- Using
imei
is recommended since it is unique on all units and the other types could possibly be duplicated.
If an error has occured, the server will respond with a JSON containing the error.
To see possible wialon errors, see https://sdk.wialon.com/wiki/en/kit/remoteapi/apiref/errors/errors
{ /* Details for the error occurred */
"type": "[STRING]", /* Determines if the error occured in Wialon or somewhere else */
"message": "[STRING]", /* Some information about the error. */
"code": "[NUMBER]", /* Error code for Wialon */
}