Evaluaciones
Gestión de evaluaciones de llamadas realizadas por los clientes. Requiere rol de attendant o superior.
Endpoints
| Método | Endpoint | Descripción | Rol Mínimo |
|---|---|---|---|
GET | /api/v1/evaluations | Listar evaluaciones | attendant |
GET | /api/v1/evaluations/:id | Buscar evaluación | attendant |
POST | /api/v1/evaluations | Crear evaluación (interno) | attendant |
GET | /api/v1/evaluations/stats | Estadísticas de evaluaciones | attendant |
Nota
Las evaluaciones normalmente son creadas por el cliente al final de la llamada vía endpoint público (POST /api/v1/call/evaluate/:call_id). El endpoint autenticado permite la creación manual por parte de los agentes.
Listar Evaluaciones
GET /api/v1/evaluationsQuery Parameters
| Parámetro | Tipo | Predeterminado | Descripción |
|---|---|---|---|
page | integer | 1 | Número de página |
page_size | integer | 20 | Elementos por página |
sort_by | string | inserted_at | Campo para ordenamiento |
sort_order | string | desc | Dirección del ordenamiento |
rating | integer | - | Filtro por calificación (1-5) |
date_from | string | - | Fecha inicio |
date_to | string | - | Fecha fin |
Ejemplo de Request
bash
curl -X GET "https://voki.avanter.com.br/api/v1/evaluations?page=1&page_size=10" \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter"Respuesta Exitosa (200)
json
{
"data": [
{
"id": "ev1a2b3c-d4e5-6789-abcd-ef1234567890",
"call_id": "1a2b3c4d-5e6f-7890-abcd-ef1234567890",
"rating": 5,
"comment": "Excelente atendimento!",
"customer_name": "Carlos Ferreira",
"user_name": "João Silva",
"department_name": "Suporte Técnico",
"inserted_at": "2026-02-15T14:40:00Z"
}
],
"meta": {
"current_page": 1,
"page_size": 10,
"total_pages": 5,
"total_count": 48
}
}Estadísticas de Evaluaciones
GET /api/v1/evaluations/statsQuery Parameters
| Parámetro | Tipo | Predeterminado | Descripción |
|---|---|---|---|
date_from | string | 30 días atrás | Fecha inicio |
date_to | string | hoy | Fecha fin |
department_id | uuid | - | Filtro por departamento |
user_id | uuid | - | Filtro por agente |
Ejemplo de Request
bash
curl -X GET "https://voki.avanter.com.br/api/v1/evaluations/stats" \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter"Respuesta Exitosa (200)
json
{
"data": {
"total_evaluations": 48,
"average_rating": 4.6,
"distribution": {
"1": 1,
"2": 2,
"3": 3,
"4": 12,
"5": 30
},
"with_comments": 35,
"satisfaction_rate": 87.5
}
}Crear Evaluación
POST /api/v1/evaluationsRequest Body
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
call_id | uuid | Sí | ID de la llamada |
rating | integer | Sí | Calificación de 1 a 5 |
comment | string | No | Comentario del cliente |
Ejemplo de Request
bash
curl -X POST https://voki.avanter.com.br/api/v1/evaluations \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter" \
-H "Content-Type: application/json" \
-d '{
"evaluation": {
"call_id": "1a2b3c4d-5e6f-7890-abcd-ef1234567890",
"rating": 5,
"comment": "Atendimento excelente"
}
}'Respuesta Exitosa (201)
json
{
"data": {
"id": "ev2b3c4d-e5f6-7890-bcde-f23456789012",
"call_id": "1a2b3c4d-5e6f-7890-abcd-ef1234567890",
"rating": 5,
"comment": "Atendimento excelente",
"inserted_at": "2026-02-18T18:00:00Z"
}
}