Skip to content

Évaluations

Gestion des évaluations d'appels effectuées par les clients. Nécessite le rôle attendant ou supérieur.

Endpoints

MéthodeEndpointDescriptionRôle Minimum
GET/api/v1/evaluationsLister les évaluationsattendant
GET/api/v1/evaluations/:idRechercher une évaluationattendant
POST/api/v1/evaluationsCréer une évaluation (interne)attendant
GET/api/v1/evaluations/statsStatistiques des évaluationsattendant

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/evaluations

Query Parameters

ParamètreTypeDéfautDescription
pageinteger1Numéro de page
page_sizeinteger20Éléments par page
sort_bystringinserted_atChamp de tri
sort_orderstringdescDirection du tri
ratinginteger-Filtre par note (1-5)
date_fromstring-Date de début
date_tostring-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/stats

Query Parameters

ParamètreTypeDéfautDescription
date_fromstring30 jours avantDate de début
date_tostringaujourd'huiDate de fin
department_iduuid-Filtre par département
user_iduuid-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/evaluations

Request Body

ChampTypeObligatoireDescription
call_iduuidOuiID de l'appel
ratingintegerOuiNote de 1 à 5
commentstringNonCommentaire 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"
  }
}

Documentação da API Voki v4.0