driver_status

The driver_status method is used to check the status of a unit that has an assigned driver.

Copied!
svc=resource/driver_status&params={"phoneNumber":"<text>",
								   "password":"<text>",
								   "app":"<text>",
								   "fl":<uint>}

Parameters

Name Description
phoneNumber The driver’s prone number.
password The mobile key.
The field can’t be empty.
app The application name for the generated token. The field is optional. The default value is “Wialon Logistics”.
fl Optional flags:
  • 1 — returns token;
  • 2 — returns the status even if the driver is not assigned to a unit.

Returned result

Copied!
{
"drv":{				/* driver params */
    "rid":<uint>,   /* resource ID */
    "id":"<text>",    /* driver ID */
    "nm":"<text>"}    /* driver name */
},    
"un":{				/* unit params */
    "nm":"<text>", 
    "cls":<uint>,     
    "id":<uint>,    
    "mu":<uint>,
    "ct":<uint>,    
    "ftp":{ ... },
    "pos":{ ... },
    "lmsg":{ ... },
    "uri":"<text>",
    "ugi":<uint>,
    "uacl":<int>
},
"uh":"<text>",  		/* encrypted device information (for WiaTag) */
"ul":"<text>",  		/* encrypted phone number */
"h":"<text>"			/* token */
}

Possible error codes:

Code Description
8 Wrong password or phone number.
7 Failed to fetch unit, unit account, user creator or driver plugin.
6 Failed to find the first assigned driver or undefined error.
4 One of the following errors in the request:
  • No phoneNumber or password field.
  • Empty password field.
  • Item with the desired phoneNumber not found.
  • Wrong input parameters.

If you find a mistake in the text, please select it and press Ctrl+Enter.