curl --request POST \
--url https://api.jelou.ai/v1/metrics/conversations/attended/external \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"startAt": "2023-11-07T05:31:56Z",
"endAt": "2023-11-07T05:31:56Z",
"getJson": true
}
'{
"message": [
"<string>"
],
"status": "<string>",
"results": [
{
"_id": "<string>",
"operator": {
"names": "<string>"
},
"user": {
"id": "<string>"
},
"bot": {
"name": "<string>"
},
"company": {
"id": "<string>"
},
"assignationMethod": {
"teamName": "<string>"
},
"state": "active",
"endedReason": "<string>",
"startAt": "<string>",
"endAt": "<string>",
"origin": "<string>",
"timeRepliedOperator": 123,
"conversationDuration": 123
}
],
"pagination": {
"limit": 123,
"page": 123,
"total": 123,
"offset": 123,
"totalPages": 123
},
"links": [
{}
]
}Consulta conversaciones atendidas por asesores humanos
curl --request POST \
--url https://api.jelou.ai/v1/metrics/conversations/attended/external \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"startAt": "2023-11-07T05:31:56Z",
"endAt": "2023-11-07T05:31:56Z",
"getJson": true
}
'{
"message": [
"<string>"
],
"status": "<string>",
"results": [
{
"_id": "<string>",
"operator": {
"names": "<string>"
},
"user": {
"id": "<string>"
},
"bot": {
"name": "<string>"
},
"company": {
"id": "<string>"
},
"assignationMethod": {
"teamName": "<string>"
},
"state": "active",
"endedReason": "<string>",
"startAt": "<string>",
"endAt": "<string>",
"origin": "<string>",
"timeRepliedOperator": 123,
"conversationDuration": 123
}
],
"pagination": {
"limit": 123,
"page": 123,
"total": 123,
"offset": 123,
"totalPages": 123
},
"links": [
{}
]
}POST https://api.jelou.ai/v1/metrics/conversations/attended/external
| Campo | Ubicación | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| Authorization | Header | string | Sí | Credenciales en formato clientId:clientSecret. |
| Campo | Ubicación | Tipo | Requerido | Valor por defecto | Descripción |
|---|---|---|---|---|---|
| limit | Query | integer | No | 10 | Número máximo de conversaciones por página. |
| page | Query | integer | No | 1 | Número de página para paginación. |
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
| startAt | string | Sí | Fecha de inicio del rango en formato ISO 8601. Ejemplo: 2025-01-01T00:00:00-05:00 |
| endAt | string | Sí | Fecha de fin del rango en formato ISO 8601. Ejemplo: 2025-01-01T23:59:59-05:00 |
| getJson | boolean | Sí | Debe ser true para recibir la respuesta en formato JSON. |
curl -X POST 'https://api.jelou.ai/v1/metrics/conversations/attended/external?limit=10' \
-H 'Authorization: <clientId>:<clientSecret>' \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"startAt": "2025-01-01T00:00:00-05:00",
"endAt": "2025-01-01T23:59:59-05:00",
"getJson": true
}'
const axios = require('axios');
axios({
method: 'POST',
url: 'https://api.jelou.ai/v1/metrics/conversations/attended/external',
params: { limit: 10 },
headers: {
'Content-Type': 'application/json;charset=UTF-8',
'Authorization': '<clientId>:<clientSecret>'
},
data: {
startAt: '2025-01-01T00:00:00-05:00',
endAt: '2025-01-01T23:59:59-05:00',
getJson: true
}
});
200 - Respuesta exitosa
{
"message": ["Retrieving conversations succeeded"],
"status": "success",
"results": [
{
"_id": "CONVERSATION_ID",
"operator": {
"names": "OPERATOR_NAME"
},
"user": {
"id": "ID"
},
"bot": {
"name": "BOT_NAME"
},
"company": {
"id": "COMPANY_ID"
},
"assignationMethod": {
"teamName": "TEAM_NAME"
},
"state": "expired",
"endedReason": "expired",
"startAt": "2023-06-08 15:52:41",
"endAt": "2023-06-08 23:07:56",
"origin": "ticket",
"timeRepliedOperator": 795880,
"conversationDuration": 26115953
}
],
"pagination": {
"limit": 1,
"total": 61,
"offset": 0,
"totalPages": 61
},
"links": [
{
"number": 1,
"url": "/v1/metrics/conversations/attended/external?limit=1&page=1"
},
{
"number": 2,
"url": "/v1/metrics/conversations/attended/external?limit=1&page=2"
}
]
}
401 - Unauthorized
{
"message": "Authentication failed"
}
422 - Unprocessable Entity
{
"message": ["Los valores ingresados no son correctos."],
"statusMessage": "failed",
"status": 0,
"error": {
"code": "E0422",
"key": "VALIDATOR_ERROR"
}
}
429 - Too Many Requests
{
"message": "Rate limit exceeded"
}
500 - Internal Server Error
{
"message": ["We are having trouble processing your request. Please try again later."],
"statusMessage": "failed",
"status": 0
}
| Campo | Tipo | Descripción |
|---|---|---|
| _id | string | Identificador único de la conversación. |
| operator | object | Información del operador que atendió la conversación (names). |
| user | object | Información del usuario (id). |
| bot | object | Información del bot asociado (name). |
| company | object | Información de la empresa (id). |
| assignationMethod | object | Método de asignación y equipo (teamName). |
| state | string | Estado de la conversación: active, closed, resolved, expired. |
| endedReason | string | Motivo por el cual terminó la conversación. |
| startAt | string | Fecha y hora de inicio de la conversación. |
| endAt | string | Fecha y hora de finalización de la conversación. |
| origin | string | Fuente de la conversación (ej: ticket). |
| timeRepliedOperator | number | Tiempo de respuesta del operador en milisegundos. |
| conversationDuration | number | Duración total de la conversación en milisegundos. |
| Campo | Tipo | Descripción |
|---|---|---|
| limit | integer | Conversaciones retornadas por página. |
| total | integer | Total de conversaciones que cumplen con los filtros. |
| offset | integer | Conversaciones omitidas según la página solicitada. |
| totalPages | integer | Cantidad total de páginas disponibles. |
| Campo | Tipo | Descripción |
|---|---|---|
| number | integer | Número de página. |
| url | string | URL relativa para acceder a esa página. |
timeRepliedOperator y conversationDuration para analizar la eficiencia de tu equipo de soporte:Basic authentication using Base64 encoded clientId:clientSecret
Was this page helpful?