curl --request GET \
--url https://api.jelou.ai/v1/metrics/conversations/external/stats \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.jelou.ai/v1/metrics/conversations/external/stats"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.jelou.ai/v1/metrics/conversations/external/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.jelou.ai/v1/metrics/conversations/external/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.jelou.ai/v1/metrics/conversations/external/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.jelou.ai/v1/metrics/conversations/external/stats")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jelou.ai/v1/metrics/conversations/external/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"_id": 123,
"total": 123,
"actual": 123,
"attended": 123,
"expired": 123,
"lastMessageOperator": 123,
"lastMessageUser": 123,
"lastMessageBot": 123,
"notAttended": 123,
"avgReplyTime": 123,
"avgOperatorResponseTime": 123,
"transfered": 123,
"avgConversationTime": 123,
"operator": {
"id": 123,
"names": "<string>",
"email": "<string>",
"companyId": 123
}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}Estadísticas de operadores
Casos totales, atendidos, no atendidos y tiempos de respuesta de tus operadores
curl --request GET \
--url https://api.jelou.ai/v1/metrics/conversations/external/stats \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.jelou.ai/v1/metrics/conversations/external/stats"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.jelou.ai/v1/metrics/conversations/external/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.jelou.ai/v1/metrics/conversations/external/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.jelou.ai/v1/metrics/conversations/external/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.jelou.ai/v1/metrics/conversations/external/stats")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jelou.ai/v1/metrics/conversations/external/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"_id": 123,
"total": 123,
"actual": 123,
"attended": 123,
"expired": 123,
"lastMessageOperator": 123,
"lastMessageUser": 123,
"lastMessageBot": 123,
"notAttended": 123,
"avgReplyTime": 123,
"avgOperatorResponseTime": 123,
"transfered": 123,
"avgConversationTime": 123,
"operator": {
"id": 123,
"names": "<string>",
"email": "<string>",
"companyId": 123
}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}operatorId puntual para un análisis individual o consulta el rango completo para una vista general del equipo.
Endpoint
GET https://api.jelou.ai/v1/metrics/conversations/external/stats
Autenticación
| Campo | Ubicación | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| Authorization | Header | string | Sí | Credenciales en formato Basic <clientId:clientSecret>. |
Parámetros de consulta
| Campo | Ubicación | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| startAt | Query | Date | Sí | Fecha de inicio de búsqueda. |
| endAt | Query | Date | Sí | Fecha fin para la búsqueda. |
| operatorId | Query | Int | No | ID del operador cuando se desea buscar por un operador específico. |
operatorId, la consulta agrega las estadísticas de todos los operadores dentro del rango de fechas indicado.Ejemplos de solicitud
- cURL
- JavaScript
curl --request GET \
--url 'https://api.jelou.ai/v1/metrics/conversations/external/stats?startAt=2025-02-01&endAt=2025-02-10' \
--header 'Authorization: Basic <clientId:clientSecret>'
const axios = require('axios');
axios({
method: 'GET',
url: 'https://api.jelou.ai/v1/metrics/conversations/external/stats',
params: {
startAt: '2025-02-01',
endAt: '2025-02-10'
},
headers: {
'Authorization': 'Basic <clientId:clientSecret>'
}
});
Respuestas
200 - Respuesta exitosa
200 - Respuesta exitosa
{
"_id": 123456,
"total": 6,
"actual": 0,
"attended": 6,
"expired": 0,
"lastMessageOperator": 5,
"lastMessageUser": 1,
"lastMessageBot": 0,
"notAttended": 0,
"avgReplyTime": 50.095333333333336,
"avgOperatorResponseTime": 119,
"transfered": 0,
"avgConversationTime": 3738.2073333333333,
"operator": {
"id": 987654,
"names": "Jane Doe",
"email": "[email protected]",
"companyId": 4321
}
}
401 - Unauthorized
401 - Unauthorized
{
"message": "Authentication failed"
}
422 - Unprocessable Entity
422 - Unprocessable Entity
{
"message": [
"Los valores ingresados no son correctos."
],
"statusMessage": "failed",
"status": 0,
"error": {
"code": "E0422",
"key": "VALIDATOR_ERROR",
"description": "Error to be thrown when cannot process request because of incoming values",
"developerMessages": {
"es": "Los valores del request no son correctos para ser procesados.",
"en": "The request values are not correct for processing."
},
"clientMessages": {
"es": "Los valores ingresados no son correctos.",
"en": "The values entered are not correct."
}
},
"validationError": {
"startAt": [
{
"es": "El campo startAt es requerido",
"en": "The startAt field is required",
"pt": "O campo startAt é obrigatório"
}
]
}
}
500 - Internal Server Error
500 - Internal Server Error
{
"message": ["We are having trouble processing your request. Please try again later."],
"statusMessage": "failed",
"status": 0
}
Detalle de la respuesta
| Campo | Tipo | Descripción |
|---|---|---|
| _id | integer | Identificador del operador o de la agregación consultada. |
| total | integer | Total de casos dentro del rango de fechas. |
| actual | integer | Casos actuales en la bandeja. |
| attended | integer | Casos atendidos. |
| expired | integer | Casos que expiraron sin atención. |
| lastMessageOperator | integer | Conversaciones cuyo último mensaje lo envió el operador. |
| lastMessageUser | integer | Conversaciones cuyo último mensaje lo envió el usuario. |
| lastMessageBot | integer | Conversaciones cuyo último mensaje lo envió el canal. |
| notAttended | integer | Casos no atendidos. |
| avgReplyTime | number | Tiempo promedio de respuesta, en segundos. |
| avgOperatorResponseTime | number | Tiempo promedio de respuesta del operador, en segundos. |
| transfered | integer | Casos transferidos a otro operador o equipo. |
| avgConversationTime | number | Duración promedio de las conversaciones, en segundos. |
| operator | object | Información del operador consultado. |
| operator.id | integer | Identificador del operador. |
| operator.names | string | Nombre del operador. |
| operator.email | string | Correo electrónico del operador. |
| operator.companyId | integer | Identificador de la empresa a la que pertenece el operador. |
attended y notAttended junto con avgOperatorResponseTime para evaluar la carga y la eficiencia de cada operador dentro del rango consultado.Autorizaciones
Basic authentication using Base64 encoded clientId:clientSecret
Parámetros de consulta
Search start date
Search end date
Operator ID to filter statistics for a specific operator
Respuesta
Statistics retrieved successfully
Identifier of the queried operator or aggregation
Total cases within the date range
Cases currently in the queue
Attended cases
Cases that expired without attention
Conversations whose last message was sent by the operator
Conversations whose last message was sent by the user
Conversations whose last message was sent by the bot
Unattended cases
Average reply time, in seconds
Average operator response time, in seconds
Cases transferred to another operator or team
Average conversation duration, in seconds
Show child attributes
Show child attributes
¿Esta página le ayudó?