To create, edit or delete driver, use the command resource/update_driver:
svc=resource/update_driver¶ms={"itemId":<long>, "id":<long>, "callMode":<text>, "c":<text>, "ck":<short>, "ds":<text>, "n":<text>, "p":<text>, "r":<double>, "f":<uint>, "pwd":<text>, "jp":{ <text>:<text>, ... }}
| Name | Description |
|---|---|
| itemId | resource ID |
| id | driver ID |
| callMode | action: create, update, delete, reset_image |
| Parameters required only for create and update: | |
| c | code |
| ck | check sum of driver image |
| ds | description |
| n | name |
| p | phone number like +1234567890 (+ must be encoded as %2B) |
| r | aspect ratio of driver image |
| f | flags: not used at this moment |
| pwd | password for mobile authorization |
| jp | custom fields in the format name: value |
On create and edit:
[ <long>, /* driver ID */ { "id":<long>, /* driver ID */ "n":<text>, /* name */ "c":<text>, /* code */ "jp": { /* custom fields */ <text>:<text>, /* name: value */ ... }, "pwd":<text>, /* password for mobile authorization */ "ds":<text>, /* description */ "p":<text>, /* phone number */ "r":<double>, /* aspect ratio of driver image */ "ck":<ushort>, /* check sum of driver image */ "bu":<long>, /* bound unit */ "pu":<long>, /* previous bound unit */ "bt":<uint>, /* time of last binding/unbinding */ "pos":{ /* position */ "y":<double>, /* latitude */ "x":<double> /* longitude */ } } ]
On delete:
[ <long>, /* driver ID */ null ]
|