Saltar a contenido

Método setManagers

El método permite cargar la lista de responsables del sistema CRM. Si se envía un responsable con un ID ya registrado en el servicio R7K12, se actualizará el nombre del responsable. Método: POST Formato: JSON Enlace: https://api.r7k12.com/{{TOKEN}}/setManagers Parámetros: Tabla 1 Content-type: application/json Tabla 1

Nombre Valor Obligatorio Descripción
id string Sí Identificador único del responsable en el sistema CRM
name string Sí Nombre del responsable

Ejemplo de cuerpo de la solicitud:

[
 {
   "id":"1",
   "name":"Менеджер №1"
 },
 {
   "id":"2",
   "name":"Менеджер №2"
 }
]

Ejemplo de script (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'
                       ],
                   ]
               ),
           ],
       ]
   )
);