MIgrate unit into the child account

If you want to migrate a unit into the child account and also change unit creator onto this account creator please use account/change_account command:

svc=account/change_account&params={"itemId":<long>,
                                   "resourceId":<long>}

Parameters

Param Description
itemId unit id
resourceId account id

:!: In order to migrate a unit into the child account this account creator user should have some rights:

1. On his account:

ACL name ACL flag
Manage account 0x100000000

2. On migrated unit:

ACL name ACL flag
View item and its basic properties 0x000001
Manage access to this item 0x000004
Delete item 0x000008
Edit connectivity settings (device type, UID, phone, access password, messages filter) 0x100000
Delete messages 0x800000

Response

If migration ended successfully then:

{}

If some errors occured:

{
    "error":<uint>
}