driver_status

The driver_status function 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

NameDescription
phoneNumberThe driver's prone number.
password

The mobile key. 

The field can't be empty.

appThe 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:

CodeDescription
8Wrong password or phone number.
7Failed 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. 
Download PDF file
Download Word document

See also