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": [
{}
]
}Consulte conversas atendidas por agentes 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 | Localização | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| Authorization | Header | string | Sim | Credenciais no formato clientId:clientSecret. |
| Campo | Localização | Tipo | Obrigatório | Valor padrão | Descrição |
|---|---|---|---|---|---|
| limit | Query | integer | Não | 10 | Número máximo de conversas por página. |
| page | Query | integer | Não | 1 | Número da página para paginação. |
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| startAt | string | Sim | Data de início do intervalo no formato ISO 8601. Exemplo: 2025-01-01T00:00:00-05:00 |
| endAt | string | Sim | Data de término do intervalo no formato ISO 8601. Exemplo: 2025-01-01T23:59:59-05:00 |
| getJson | boolean | Sim | Deve ser true para receber a resposta em 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 - Resposta bem-sucedida
{
"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 - Não Autorizado
{
"message": "Authentication failed"
}
422 - Entidade não processável
{
"message": ["The values entered are not correct."],
"statusMessage": "failed",
"status": 0,
"error": {
"code": "E0422",
"key": "VALIDATOR_ERROR"
}
}
429 - Muitas Requisições
{
"message": "Rate limit exceeded"
}
500 - Erro Interno do Servidor
{
"message": ["We are having trouble processing your request. Please try again later."],
"statusMessage": "failed",
"status": 0
}
| Campo | Tipo | Descrição |
|---|---|---|
| _id | string | Identificador único da conversa. |
| operator | object | Informações sobre o operador que atendeu a conversa (names). |
| user | object | Informações do usuário (id). |
| bot | object | Informações do bot associado (name). |
| company | object | Informações da empresa (id). |
| assignationMethod | object | Método de atribuição e equipe (teamName). |
| state | string | Estado da conversa: active, closed, resolved, expired. |
| endedReason | string | Motivo pelo qual a conversa terminou. |
| startAt | string | Data e hora de início da conversa. |
| endAt | string | Data e hora de término da conversa. |
| origin | string | Origem da conversa (ex.: ticket). |
| timeRepliedOperator | number | Tempo de resposta do operador em milissegundos. |
| conversationDuration | number | Duração total da conversa em milissegundos. |
| Campo | Tipo | Descrição |
|---|---|---|
| limit | integer | Conversas retornadas por página. |
| total | integer | Total de conversas que correspondem aos filtros. |
| offset | integer | Conversas ignoradas de acordo com a página solicitada. |
| totalPages | integer | Número total de páginas disponíveis. |
| Campo | Tipo | Descrição |
|---|---|---|
| number | integer | Número da página. |
| url | string | URL relativa para acessar essa página. |
timeRepliedOperator e conversationDuration para analisar a eficiência da sua equipe de suporte:Basic authentication using Base64 encoded clientId:clientSecret
Esta página foi útil?