setStatuses method¶
Uploads deal statuses. If a status is passed with an ID that is already recorded in the R7K12 service, the status will be updated. Method: POST Format: JSON URL: https://api.r7k12.com/{{TOKEN}}/setStatuses Parameters: Table 1 Content-type: application/json Table 1
| Name | Value | Required | Description |
| id | string | Yes | Unique status ID in the CRM system |
| group | integer | Yes | Group the status belongs to. A value from 1 to 4. - 1 - Not counted - 2 - In progress - 3 - Completed - 4 - Canceled |
| name | string | No | Status name in the CRM system (no more than 500 characters). |
Request body example:¶
[
{
"id":"56385",
"group":"1",//Не учитывать
"name":"Новый заказ"
},
{
"id":"57667454",
"group":"3"//Успешно реализовано
}
]
Script example (PHP):¶
define('TOKEN','YOURTOKEN');
@file_get_contents(
'https://api.r7k12.com/'.TOKEN.'/setStatuses',
0,
stream_context_create(
[
'http' => [
'method' => "POST",
'header' => "Content-Type: application/json\r\n",
'content' => json_encode(
[
[
'id' => '56385',
'group' => '1',
'name' => 'Новый заказ'
],
[
'id' => '57667454',
'group' => '3'
],
]
),
],
]
)
);