Évaluations
Gestion des évaluations d'appels effectuées par les clients. Nécessite le rôle attendant ou supérieur.
Endpoints
| Méthode | Endpoint | Description | Rôle Minimum |
|---|---|---|---|
GET | /api/v1/evaluations | Lister les évaluations | attendant |
GET | /api/v1/evaluations/:id | Rechercher une évaluation | attendant |
POST | /api/v1/evaluations | Créer une évaluation (interne) | attendant |
GET | /api/v1/evaluations/stats | Statistiques des évaluations | attendant |
Note
Les évaluations sont normalement créées par le client à la fin de l'appel via l'endpoint public (POST /api/v1/call/evaluate/:call_id). L'endpoint authentifié permet la création manuelle par les agents.
Lister les Évaluations
GET /api/v1/evaluationsQuery Parameters
| Paramètre | Type | Défaut | Description |
|---|---|---|---|
page | integer | 1 | Numéro de page |
page_size | integer | 20 | Éléments par page |
sort_by | string | inserted_at | Champ de tri |
sort_order | string | desc | Direction du tri |
rating | integer | - | Filtre par note (1-5) |
date_from | string | - | Date de début |
date_to | string | - | Date de fin |
Exemple de Requête
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"Réponse de Succès (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
}
}Statistiques des Évaluations
GET /api/v1/evaluations/statsQuery Parameters
| Paramètre | Type | Défaut | Description |
|---|---|---|---|
date_from | string | 30 jours avant | Date de début |
date_to | string | aujourd'hui | Date de fin |
department_id | uuid | - | Filtre par département |
user_id | uuid | - | Filtre par agent |
Exemple de Requête
bash
curl -X GET "https://voki.avanter.com.br/api/v1/evaluations/stats" \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter"Réponse de Succès (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
}
}Créer une Évaluation
POST /api/v1/evaluationsRequest Body
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
call_id | uuid | Oui | ID de l'appel |
rating | integer | Oui | Note de 1 à 5 |
comment | string | Non | Commentaire du client |
Exemple de Requête
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": "Service excellent"
}
}'Réponse de Succès (201)
json
{
"data": {
"id": "ev2b3c4d-e5f6-7890-bcde-f23456789012",
"call_id": "1a2b3c4d-5e6f-7890-abcd-ef1234567890",
"rating": 5,
"comment": "Service excellent",
"inserted_at": "2026-02-18T18:00:00Z"
}
}