update_phone
To set a new phone number for a unit, use the unit/update_phone method.
Endpoint
svc=unit/update_phone¶ms={
"itemId": <long>,
"phoneNumber": <text>
}
The character + in the phone number must be replaced by the code %2B.
Parameters
The request must contain the following parameters:
| Parameter | Description |
|---|---|
itemId |
Unit ID. |
phoneNumber |
New phone number. |
Response
If the request is completed successfully, the response is returned in the following format:
{
"ph": <text> /* Phone number. */
}
If the request fails, an error code is returned.
Error codes
| Error code | Description |
|---|---|
| 4 | Wrong input parameters. |
| 6 | Failed to update the phone number. |
| 7 | The user has no Edit connectivity settings access right to the unit. |
| 1002 | This phone number is already used for another unit. |