Update user’s accessible accounts
This API allows assigning a user access to specific accounts. If a partner in the system has multiple accounts, an administrator can choose which accounts a particular user can access.
How to get data
Request address
To get the data, use the address: https://<server_address>/api/api.php?
Request method
POST
Request parameters
-
cmd=update_user_accounts_map — command to update the list of accessible accounts
-
accounts — comma-separated list of contract IDs (accounts) to assign to the userAccounts must belong to the same partner as the user.
-
user_id — ID of the user to whom the contracts are assigned
-
node — node number where the command should be executed
If the user’s partner ID in the system is 0, assigning contracts is not possible (mapping will not work).
|
Example request
{
"cmd": "update_user_accounts_map",
"accounts": "1005",
"user_id": 19
}
|
Response
{
"code": 0,
"msg": "Success"
}
|
In response to the API request, the following is returned:
-
code— result code (0 indicates a successful operation)
-
msg— server message confirming the result