MENU navbar-image

Introducción

Este API contiene la lógica de negocio que se encarga de alimentar el sistema de Atención de Incidencias de Cyberfuel S.A. Los usuarios de consumo no deberán ser de uso compartido y deberá mantenerse una segmentación en su uso, único y exclusivo para el fin que fueron brindados.

Este API contiene la lógica de negocio que se encarga de alimentar el sistema de Atención de Incidencias de Cyberfuel S.A. 

Los usuarios de consumo no deberán ser de uso compartido y deberá mantenerse una segmentación en su uso, único y exclusivo para el fin que fueron brindados. 

El acceso no autorizado a este API es prohibido. 

Autenticación

Para consumir esta API, debe incluir los siguientes headers en cada solicitud autenticada:

Todos los EndPoints que requieran autenticación se encuentran identificados con el sello `requires authentication` en su respectiva documentación.

Solicite sus credenciales de consumo a alguno de los siguientes administradores del sistema vía correo electrónico: dnunez@cyberfuel.com

- Endpoints sin agrupar

POST api/SSO/password/forgot

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://calidad.api.cyberfuel.com/api/SSO/password/forgot';
$response = $client->post(
    $url,
    [
        'headers' => [
            'X-User-Consumo' => 'UsuarioPrueba',
            'X-User-Secret' => 'strDasdakdmsadsakming',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'product' => 'evktzdcpbcfbd',
            'email' => 'maegan64@example.net',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://calidad.api.cyberfuel.com/api/SSO/password/forgot"
);

const headers = {
    "X-User-Consumo": "UsuarioPrueba",
    "X-User-Secret": "strDasdakdmsadsakming",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product": "evktzdcpbcfbd",
    "email": "maegan64@example.net"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Credenciales de consumo inválidas"
}
 

Request   

POST api/SSO/password/forgot

Headers

X-User-Consumo      

Example: UsuarioPrueba

X-User-Secret      

Example: strDasdakdmsadsakming

Content-Type      

Example: application/json

Body Parameters

product   string   

Must not be greater than 100 characters. Example: evktzdcpbcfbd

email   string   

Must be a valid email address. Must not be greater than 191 characters. Example: maegan64@example.net

POST api/SSO/password/reset

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://calidad.api.cyberfuel.com/api/SSO/password/reset';
$response = $client->post(
    $url,
    [
        'headers' => [
            'X-User-Consumo' => 'UsuarioPrueba',
            'X-User-Secret' => 'strDasdakdmsadsakming',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'product' => 'jlwnplitvwegmkx',
            'id' => 'tnybdlsbjefhjjgzbeab',
            'token' => 'oqjtxwdrlmobdv',
            'password' => '}yf,FS<${nB)4s]]S',
            'password_confirmation' => 'oucmyx',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://calidad.api.cyberfuel.com/api/SSO/password/reset"
);

const headers = {
    "X-User-Consumo": "UsuarioPrueba",
    "X-User-Secret": "strDasdakdmsadsakming",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product": "jlwnplitvwegmkx",
    "id": "tnybdlsbjefhjjgzbeab",
    "token": "oqjtxwdrlmobdv",
    "password": "}yf,FS<${nB)4s]]S",
    "password_confirmation": "oucmyx"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Credenciales de consumo inválidas"
}
 

Request   

POST api/SSO/password/reset

Headers

X-User-Consumo      

Example: UsuarioPrueba

X-User-Secret      

Example: strDasdakdmsadsakming

Content-Type      

Example: application/json

Body Parameters

product   string   

Must not be greater than 100 characters. Example: jlwnplitvwegmkx

id   string   

Must not be greater than 1000 characters. Example: tnybdlsbjefhjjgzbeab

token   string   

Must not be greater than 255 characters. Example: oqjtxwdrlmobdv

password   string   

Must not be greater than 191 characters. Example: }yf,FS<${nB)4s]]S

password_confirmation   string   

Must not be greater than 191 characters. Example: oucmyx

Correo Electrónico

Get Bandejas de correo configuradas para el proceso de lectura.

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://calidad.api.cyberfuel.com/api/correo/getConfigCorreos';
$response = $client->post(
    $url,
    [
        'headers' => [
            'X-User-Consumo' => 'UsuarioPrueba',
            'X-User-Secret' => 'strDasdakdmsadsakming',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'id_cuenta_correo' => 1,
            'user' => 'dnunez@cyberfuel.com',
            'departamento' => 1,
            'estado' => 'activo',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://calidad.api.cyberfuel.com/api/correo/getConfigCorreos"
);

const headers = {
    "X-User-Consumo": "UsuarioPrueba",
    "X-User-Secret": "strDasdakdmsadsakming",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id_cuenta_correo": 1,
    "user": "dnunez@cyberfuel.com",
    "departamento": 1,
    "estado": "activo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
"data": [
 {
     "id_cuenta_correo": 1,
     "host": "mail.cyberfuel.com",
     "user": "newtkt@cyberfuel.com",
     "password": <Password del email>,
     "port": "993",
     "mail_boxes": [
         "INBOX"
     ],
     "departamento": 2,
     "estado": "activo"
 }
 ],
 "status": "ok",
 "message": "",
 "code": 200,
 "id_bitacora_log": 735687
}
 

Request   

POST api/correo/getConfigCorreos

Headers

X-User-Consumo      

Example: UsuarioPrueba

X-User-Secret      

Example: strDasdakdmsadsakming

Content-Type      

Example: application/json

Body Parameters

id_cuenta_correo   integer  optional  

Opcional. Identificador del registro. Example: 1

user   string  optional  

Opcional. Correo a consultar. Example: dnunez@cyberfuel.com

departamento   integer  optional  

Opcional, Departamento a consultar. Example: 1

estado   string  optional  

Opcional. estado del registro. Example: activo

Correo electrónico entrante.

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://calidad.api.cyberfuel.com/api/correo/save';
$response = $client->post(
    $url,
    [
        'headers' => [
            'X-User-Consumo' => 'UsuarioPrueba',
            'X-User-Secret' => 'strDasdakdmsadsakming',
            'Content-Type' => 'application/json',
        ],
        'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
            $o = [
                clone (\Symfony\Component\VarExporter\Internal\Registry::$prototypes['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
            ],
            null,
            [
                'stdClass' => [
                    'name' => [
                        'error_log.txt',
                    ],
                    'route' => [
                        'logs/error_log.txt',
                    ],
                    'type' => [
                        'text/plain',
                    ],
                ],
            ],
            [
                'sistema' => 'canal_lectura',
                'subject' => 'prueba',
                'from' => 'test@cyberfuel.com',
                'to' => 'test0@cyberfuel.com',
                'cc' => 'test1@cyberfuel.com',
                'bcc' => 'test2@cyberfuel.com',
                'reply_to' => 'test_reply@cyberfuel.com',
                'body' => 'contenido del correo en texto plano.',
                'html' => '<p>Contenido del correo en HTML</p>',
                'date' => '2025-10-10 12:00:00',
                'headers' => [
                    'X-Custom-Header' => 'Valor',
                    'X-Tracking-ID' => 'abc123',
                ],
                'attachments' => [
                    $o[0],
                ],
            ],
            []
        ),
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://calidad.api.cyberfuel.com/api/correo/save"
);

const headers = {
    "X-User-Consumo": "UsuarioPrueba",
    "X-User-Secret": "strDasdakdmsadsakming",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sistema": "canal_lectura",
    "subject": "prueba",
    "from": "test@cyberfuel.com",
    "to": "test0@cyberfuel.com",
    "cc": "test1@cyberfuel.com",
    "bcc": "test2@cyberfuel.com",
    "reply_to": "test_reply@cyberfuel.com",
    "body": "contenido del correo en texto plano.",
    "html": "<p>Contenido del correo en HTML<\/p>",
    "date": "2025-10-10 12:00:00",
    "headers": {
        "X-Custom-Header": "Valor",
        "X-Tracking-ID": "abc123"
    },
    "attachments": [
        {
            "name": "error_log.txt",
            "route": "logs\/error_log.txt",
            "type": "text\/plain"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Se ha creado el ticket 132",
    "ticket": "132",
    "id_detalle_ticket": "1234",
    "notificacion_SLA_Synology": "Enviada a canal xxxx",
    "notificacion_SLA_Correo": "No emitida",
    "id_departamento_asignado": "1",
    "id_usuario_asignado": "1"
}
 

Request   

POST api/correo/save

Headers

X-User-Consumo      

Example: UsuarioPrueba

X-User-Secret      

Example: strDasdakdmsadsakming

Content-Type      

Example: application/json

Body Parameters

sistema   string   

Nombre del sistema que envía el correo. Example: canal_lectura

subject   string   

Asunto del correo. Example: prueba

from   email   

Dirección del remitente. Example: test@cyberfuel.com

to   email   

Dirección del destinatario. Example: test0@cyberfuel.com

cc   string  optional  

Opcional. Copia del correo. Example: test1@cyberfuel.com

bcc   string  optional  

Opcional. Copia oculta del correo. Example: test2@cyberfuel.com

reply_to   string   

Dirección de respuesta. Example: test_reply@cyberfuel.com

body   string   

Cuerpo del correo. Example: contenido del correo en texto plano.

html   string   

Versión HTML del correo. Example: <p>Contenido del correo en HTML</p>

date   datetime   

Fecha del correo en formato Y-m-d H:i:s. Example: 2025-10-10 12:00:00

headers   object  optional  

Opcional. Encabezados del correo.

attachments   string[]  optional  

Opcional. Archivos adjuntos.

name   string  optional  

required_with:attachments Nombre del archivo. Example: "error_log.txt"

route   string  optional  

required_with:attachments Ruta relativa del archivo almacenado en el canal. Example: "logs/error_log.txt"

type   string  optional  

required_with:attachments Tipo MIME del archivo. Example: "text/plain"

SSO

Token de autenticación ADI

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://calidad.api.cyberfuel.com/api/SSO/ADI/setToken';
$response = $client->post(
    $url,
    [
        'headers' => [
            'X-User-Consumo' => 'UsuarioPrueba',
            'X-User-Secret' => 'strDasdakdmsadsakming',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'sistema' => 'factura_profesional',
            'estado' => 'activo',
            'update_token' => 'S',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://calidad.api.cyberfuel.com/api/SSO/ADI/setToken"
);

const headers = {
    "X-User-Consumo": "UsuarioPrueba",
    "X-User-Secret": "strDasdakdmsadsakming",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sistema": "factura_profesional",
    "estado": "activo",
    "update_token": "S"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "alias_sistema": "Local1",
        "message": "Registro creado correctamente.",
        "token_generado": "<string del token generado para consumo del SSO>"
    },
    "status": "ok",
    "message": "Registro creado correctamente.",
    "code": 200,
    "id_bitacora_log": 736014
}
 

Request   

POST api/SSO/ADI/setToken

Headers

X-User-Consumo      

Example: UsuarioPrueba

X-User-Secret      

Example: strDasdakdmsadsakming

Content-Type      

Example: application/json

Body Parameters

sistema   string   

alias del sistema a integrar. Example: factura_profesional

estado   string  optional  

estado del registro a crear, activo o inactivo. Example: activo

update_token   string  optional  

Opcional, Se define para actualizar o no el token de acceso de un registro existente S,N. Example: S

Hash para Autenticar ADI

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://calidad.api.cyberfuel.com/api/SSO/ADI/generateToken';
$response = $client->post(
    $url,
    [
        'headers' => [
            'X-User-Consumo' => 'UsuarioPrueba',
            'X-User-Secret' => 'strDasdakdmsadsakming',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'username' => 'dnunez',
            'email' => 'dnunez@cyberfuel.com',
            'sistema' => 'factura_profesional',
            'token' => 'activo',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://calidad.api.cyberfuel.com/api/SSO/ADI/generateToken"
);

const headers = {
    "X-User-Consumo": "UsuarioPrueba",
    "X-User-Secret": "strDasdakdmsadsakming",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "dnunez",
    "email": "dnunez@cyberfuel.com",
    "sistema": "factura_profesional",
    "token": "activo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "base64_encoded": "<base64 generado>",
        "message": "Solicitud de acceso generada."
    },
    "status": "ok",
    "message": "Solicitud de acceso generada.",
    "code": 200,
    "id_bitacora_log": 777
}
 

Request   

POST api/SSO/ADI/generateToken

Headers

X-User-Consumo      

Example: UsuarioPrueba

X-User-Secret      

Example: strDasdakdmsadsakming

Content-Type      

Example: application/json

Body Parameters

username   string   

username del usuario. Example: dnunez

email   email   

correo electrónico ligado al usuario. Example: dnunez@cyberfuel.com

sistema   string   

Sistema al que se va a realizar el establecimiento de sesión. Example: factura_profesional

token   string   

token definido para el sistema que intenta el login. Example: activo

Validar SSO ADI

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://calidad.api.cyberfuel.com/api/SSO/ADI/Token';
$response = $client->post(
    $url,
    [
        'headers' => [
            'X-User-Consumo' => 'UsuarioPrueba',
            'X-User-Secret' => 'strDasdakdmsadsakming',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'token' => '<base64 generado>',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://calidad.api.cyberfuel.com/api/SSO/ADI/Token"
);

const headers = {
    "X-User-Consumo": "UsuarioPrueba",
    "X-User-Secret": "strDasdakdmsadsakming",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "token": "<base64 generado>"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "authenticated": true,
        "username": "dnunez",
        "email": "dnunez@cyberfuel.com",
        "sistema": "Local",
        "message": "Usuario Autenticado."
    },
    "status": "ok",
    "message": "Usuario Autenticado.",
    "code": 200,
    "id_bitacora_log": 780
}
 

Request   

POST api/SSO/ADI/Token

Headers

X-User-Consumo      

Example: UsuarioPrueba

X-User-Secret      

Example: strDasdakdmsadsakming

Content-Type      

Example: application/json

Body Parameters

token   base64  optional  

Identificador del registro. Example: <base64 generado>

Inicia sesión usando el modo de login especificado.

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://calidad.api.cyberfuel.com/api/SSO/access';
$response = $client->post(
    $url,
    [
        'headers' => [
            'X-User-Consumo' => 'UsuarioPrueba',
            'X-User-Secret' => 'strDasdakdmsadsakming',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'product' => 'dolores',
            'user' => 'et',
            'password' => 'Cyberf4231&459',
            'pin' => 'zhartkghc',
            'id_device' => 82,
            'id_bitacora_log' => '123456',
            'usuario' => 'dnunez@cyberfuel.com',
            'modo' => 'normal',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://calidad.api.cyberfuel.com/api/SSO/access"
);

const headers = {
    "X-User-Consumo": "UsuarioPrueba",
    "X-User-Secret": "strDasdakdmsadsakming",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product": "dolores",
    "user": "et",
    "password": "Cyberf4231&459",
    "pin": "zhartkghc",
    "id_device": 82,
    "id_bitacora_log": "123456",
    "usuario": "dnunez@cyberfuel.com",
    "modo": "normal"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "authenticated": true,
        "id": 139,
        "code": "",
        "name": "Osmel Araya Ruiz",
        "email": "oaraya@cyberfuel.com",
        "phone": "+50684815739",
        "token": "5|Dz7qYtZrGyhFBUmLTB15y3hmw70jDynANwJF0q1l6fc8724e"
    },
    "status": "ok",
    "message": "Usuario logueado.",
    "code": 200,
    "id_bitacora_log": "2010959"
}
 

Request   

POST api/SSO/access

Headers

X-User-Consumo      

Example: UsuarioPrueba

X-User-Secret      

Example: strDasdakdmsadsakming

Content-Type      

Example: application/json

Body Parameters

product   string   

The alias_producto of an existing record in the producto table. Example: dolores

user   string   

Example: et

password   string   

Contraseña del usuario. Example: Cyberf4231&459

pin   string  optional  

Must match the regex /^\d+$/. Must be at least 4 characters. Must not be greater than 12 characters. Example: zhartkghc

id_device   integer  optional  

Must be at least 1. Example: 82

id_bitacora_log   string  optional  

Opcional, id del registro en bitácora. Example: 123456

usuario   string   

Usuario o correo electrónico para login. Example: dnunez@cyberfuel.com

modo   string   

Modo de autenticación a usar. Example: normal

Refresca el token de usuario.

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://calidad.api.cyberfuel.com/api/SSO/refreshUserToken';
$response = $client->get(
    $url,
    [
        'headers' => [
            'X-User-Consumo' => 'UsuarioPrueba',
            'X-User-Secret' => 'strDasdakdmsadsakming',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'product' => 'est',
            'id_bitacora_log' => '123456',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://calidad.api.cyberfuel.com/api/SSO/refreshUserToken"
);

const headers = {
    "X-User-Consumo": "UsuarioPrueba",
    "X-User-Secret": "strDasdakdmsadsakming",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product": "est",
    "id_bitacora_log": "123456"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 139,
        "code": "",
        "name": "Osmel Araya Ruiz",
        "email": "oaraya@cyberfuel.com",
        "phone": "+50684815739",
        "token": "5|Dz7qYtZrGyhFBUmLTB15y3hmw70jDynANwJF0q1l6fc8724e"
    },
    "status": "ok",
    "message": "Usuario logueado.",
    "code": 200,
    "id_bitacora_log": "2010959"
}
 

Request   

GET api/SSO/refreshUserToken

Headers

X-User-Consumo      

Example: UsuarioPrueba

X-User-Secret      

Example: strDasdakdmsadsakming

Content-Type      

Example: application/json

Body Parameters

product   string   

The alias_producto of an existing record in the producto table. Example: est

id_bitacora_log   string  optional  

Opcional, id del registro en bitácora. Example: 123456

Usuarios Cyberfuel

Datos de usuario

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://calidad.api.cyberfuel.com/api/UsuarioInterno/get';
$response = $client->post(
    $url,
    [
        'headers' => [
            'X-User-Consumo' => 'UsuarioPrueba',
            'X-User-Secret' => 'strDasdakdmsadsakming',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'user' => 'jmora',
            'email' => 'jmora@cyberfuel.com',
            'departamento' => 1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://calidad.api.cyberfuel.com/api/UsuarioInterno/get"
);

const headers = {
    "X-User-Consumo": "UsuarioPrueba",
    "X-User-Secret": "strDasdakdmsadsakming",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user": "jmora",
    "email": "jmora@cyberfuel.com",
    "departamento": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id_usuario": 2462,
            "login": "dnunez",
            "nombre": "David Nunez Ceciliano",
            "cedula": "4-0250-0828",
            "tipo_usuario": "operador",
            "status": "ACTIVO",
            "accesos": "",
            "usuario": "dnunez",
            "correo": "dnunez@cyberfuel.com",
            "ext": " 151",
            "acceso_ticket": "N",
            "fk_id_departamento": 1,
            "fk_id_rol": 21,
            "rol": "desarrollo",
            "jefe": 0,
            "movil": "+506.83576159",
            "ultimo_acceso": null,
            "ip_address": null,
            "accesos_sistemas": "app.planillaprofesional.com,atencionprofesional.com,facturaprofesional.com,mycr.ws,smsempresarial.com",
            "id_synology": 120
        }
    ],
    "status": "ok",
    "message": "Obtenidos 1 registros de usuarios.",
    "code": 200,
    "id_bitacora_log": 173
}
 

Request   

POST api/UsuarioInterno/get

Headers

X-User-Consumo      

Example: UsuarioPrueba

X-User-Secret      

Example: strDasdakdmsadsakming

Content-Type      

Example: application/json

Body Parameters

user   string  optional  

required_without_all:email,departamento nombre de usuario del CRM a consultar. Example: jmora

email   email  optional  

required_without_all:user,departamento email del usuario del CRM a consultar. Example: jmora@cyberfuel.com

departamento   integer  optional  

required_without_all:user,email identificador del departamento a consultar. Example: 1

WebHooks

Configurar Synology con PSC

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://calidad.api.cyberfuel.com/api/Synology/BotAsistencia/configurarIdUsuario';
$response = $client->post(
    $url,
    [
        'headers' => [
            'X-User-Consumo' => 'UsuarioPrueba',
            'X-User-Secret' => 'strDasdakdmsadsakming',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'token' => '<string del token>',
            'user_id' => 120,
            'username' => 'dnunez',
            'thread_id' => 1,
            'timestamp' => 1752066920406,
            'text' => 'Hola.',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://calidad.api.cyberfuel.com/api/Synology/BotAsistencia/configurarIdUsuario"
);

const headers = {
    "X-User-Consumo": "UsuarioPrueba",
    "X-User-Secret": "strDasdakdmsadsakming",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "token": "<string del token>",
    "user_id": 120,
    "username": "dnunez",
    "thread_id": 1,
    "timestamp": 1752066920406,
    "text": "Hola."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "response_update_usuario": "Usuario dnunez actualizado.",
        "synology_response": {
            "data": {
                "fail": null,
                "succ": {
                    "user_id_post_map": {
                        "120": 23059679412324
                    }
                }
            },
            "success": true
        }
    },
    "status": "ok",
    "message": "Usuario dnunez actualizado.",
    "code": 200,
    "id_bitacora_log": 223
}
 

Request   

POST api/Synology/BotAsistencia/configurarIdUsuario

Headers

X-User-Consumo      

Example: UsuarioPrueba

X-User-Secret      

Example: strDasdakdmsadsakming

Content-Type      

Example: application/json

Body Parameters

token   string   

Token identificador del proceso de Synology. Example: <string del token>

user_id   integer   

Identificador númerico del usuario de Synology. Example: 120

username   string   

username de synology del que proviene el mensaje. Example: dnunez

thread_id   integer  optional  

identificador del hilo a contestar. Example: 1

timestamp   integer  optional  

timestamp actual. Example: 1752066920406

text   string  optional  

texto proveniente del mensaje. Example: Hola.