setManagers method¶
The method lets you upload the list of managers of the CRM system. If a manager is passed with an ID that is already recorded in the R7K12 service, the manager's name will be updated. Method: POST Format: JSON URL: https://api.r7k12.com/{{TOKEN}}/setManagers Parameters: Table 1 Content-type: application/json Table 1
| Name | Value | Required | Description |
| id | string | Yes | Unique manager ID in the CRM system |
| name | string | Yes | Manager name |
Request body example:¶
[
{
"id":"1",
"name":"Менеджер №1"
},
{
"id":"2",
"name":"Менеджер №2"
}
]
Script example (PHP):¶
define('TOKEN','YOURTOKEN');
@file_get_contents(
'https://api.r7k12.com/'.TOKEN.'/setManagers',
0,
stream_context_create(
[
'http' => [
'method' => "POST",
'header' => "Content-Type: application/json\r\n",
'content' => json_encode(
[
[
'id' => '1',
'name' => 'Менеджер №1'
],
[
'id' => '2',
'name' => 'Менеджер №2'
],
]
),
],
]
)
);