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>, "ds":<text>, "n":<text>, "p":<text>}
Name | Description |
---|---|
itemId | resource ID |
id | driver ID |
callMode | action: create, update, delete |
Parameters required only for create and update: | |
c | code |
ds | description |
n | name |
p | phone number like +1234567890 (+ must be encoded as %2B) |
On create and edit:
[ <long>, /* driver ID */ { "id":<long>, /* driver ID */ "n":<text>, /* name */ "c":<text>, /* code */ "ds":<text>, /* description */ "p":<text>, /* phone number */ "r":<double>, /* aspect ratio of driver image */ "ck":<ushort> /* check sum of driver image */ } ]
On delete:
[ <long>, /* driver ID */ null ]
Code | Value |
---|---|
1 | invalid session |
2 | invalid service name |
3 | invalid result |
4 | invalid format or value of parameters |
6 | - driver with current ID doesn't exist - error deleting driver - error updating driver |
7 | - access denied - service is not activated |
1002 | driver with such phone number already exists |