Avaliações
Gerenciamento de avaliações de chamadas feitas pelos clientes. Requer papel de attendant ou superior.
Endpoints
| Método | Endpoint | Descrição | Role Mínimo |
|---|---|---|---|
GET | /api/v1/evaluations | Listar avaliações | attendant |
GET | /api/v1/evaluations/:id | Buscar avaliação | attendant |
POST | /api/v1/evaluations | Criar avaliação (interno) | attendant |
GET | /api/v1/evaluations/stats | Estatísticas de avaliações | attendant |
Nota
Avaliações normalmente são criadas pelo cliente ao final da chamada via endpoint público (POST /api/v1/call/evaluate/:call_id). O endpoint autenticado permite criação manual por atendentes.
Listar Avaliações
GET /api/v1/evaluationsQuery Parameters
| Parâmetro | Tipo | Padrão | Descrição |
|---|---|---|---|
page | integer | 1 | Número da página |
page_size | integer | 20 | Itens por página |
sort_by | string | inserted_at | Campo para ordenação |
sort_order | string | desc | Direção da ordenação |
rating | integer | - | Filtro por nota (1-5) |
date_from | string | - | Data início |
date_to | string | - | Data fim |
Exemplo 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"Resposta de Sucesso (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
}
}Estatísticas de Avaliações
GET /api/v1/evaluations/statsQuery Parameters
| Parâmetro | Tipo | Padrão | Descrição |
|---|---|---|---|
date_from | string | 30 dias atrás | Data início |
date_to | string | hoje | Data fim |
department_id | uuid | - | Filtro por departamento |
user_id | uuid | - | Filtro por atendente |
Exemplo de Request
bash
curl -X GET "https://voki.avanter.com.br/api/v1/evaluations/stats" \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter"Resposta de Sucesso (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
}
}Criar Avaliação
POST /api/v1/evaluationsRequest Body
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
call_id | uuid | Sim | ID da chamada |
rating | integer | Sim | Nota de 1 a 5 |
comment | string | Não | Comentário do cliente |
Exemplo 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"
}
}'Resposta de Sucesso (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"
}
}