Rendez-vous
Gestion des rendez-vous d'appels. Permet de planifier des visioconférences à une date et heure définies. Nécessite le rôle attendant ou supérieur.
Endpoints
| Méthode | Endpoint | Description | Rôle Minimum |
|---|---|---|---|
GET | /api/v1/appointments | Lister les rendez-vous | attendant |
POST | /api/v1/appointments | Créer un rendez-vous | attendant |
GET | /api/v1/appointments/:id | Rechercher un rendez-vous | attendant |
PUT | /api/v1/appointments/:id | Mettre à jour un rendez-vous | attendant |
GET | /api/v1/appointments/conflicts | Vérifier les conflits | attendant |
POST | /api/v1/appointments/:id/confirm | Confirmer un rendez-vous | attendant |
POST | /api/v1/appointments/:id/cancel | Annuler un rendez-vous | attendant |
POST | /api/v1/appointments/:id/complete | Marquer comme terminé | attendant |
POST | /api/v1/appointments/:id/no-show | Marquer comme no-show | attendant |
Lister les Rendez-vous
GET /api/v1/appointmentsQuery 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 | scheduled_at | Champ de tri |
sort_order | string | asc | Direction du tri |
status | string | - | Filtre : scheduled, confirmed, completed, cancelled, no_show |
date_from | string | - | Date de début (ISO 8601) |
date_to | string | - | Date de fin (ISO 8601) |
user_id | uuid | - | Filtre par agent |
department_id | uuid | - | Filtre par département |
Exemple de Requête
bash
curl -X GET "https://voki.avanter.com.br/api/v1/appointments?date_from=2026-02-18&status=scheduled" \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter"Réponse de Succès (200)
json
{
"data": [
{
"id": "4c5d6e7f-8a9b-0123-defg-456789012345",
"title": "Consulta de acompanhamento",
"description": "Retorno sobre tratamento iniciado em janeiro",
"status": "scheduled",
"scheduled_at": "2026-02-20T10:00:00Z",
"duration_minutes": 30,
"department_id": "e5f6a7b8-c9d0-1234-efgh-567890123456",
"department_name": "Suporte Técnico",
"user_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"user_name": "João Silva",
"customer_id": "2a3b4c5d-6e7f-8901-bcde-f23456789012",
"customer_name": "Carlos Ferreira",
"customer_email": "carlos@email.com",
"customer_phone": "+5511999998888",
"notes": null,
"inserted_at": "2026-02-15T10:00:00Z",
"updated_at": "2026-02-15T10:00:00Z"
}
],
"meta": {
"current_page": 1,
"page_size": 20,
"total_pages": 1,
"total_count": 1
}
}Créer un Rendez-vous
POST /api/v1/appointmentsRequest Body
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
title | string | Oui | Titre du rendez-vous |
description | string | Non | Description détaillée |
scheduled_at | string | Oui | Date et heure (ISO 8601, futur) |
duration_minutes | integer | Non | Durée en minutes (défaut : 30) |
department_id | uuid | Oui | ID du département |
user_id | uuid | Non | ID de l'agent (défaut : utilisateur authentifié) |
customer_id | uuid | Non | ID d'un client existant |
customer_name | string | Oui* | Nom du client (si customer_id non fourni) |
customer_email | string | Non | Email du client |
customer_phone | string | Non | Téléphone du client |
notes | string | Non | Observations |
Exemple de Requête
bash
curl -X POST https://voki.avanter.com.br/api/v1/appointments \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter" \
-H "Content-Type: application/json" \
-d '{
"appointment": {
"title": "Réunion de présentation",
"scheduled_at": "2026-02-25T14:00:00Z",
"duration_minutes": 45,
"department_id": "e5f6a7b8-c9d0-1234-efgh-567890123456",
"customer_name": "Roberto Lima",
"customer_email": "roberto@email.com",
"customer_phone": "+5511966665544"
}
}'Réponse de Succès (201)
json
{
"data": {
"id": "5d6e7f8a-9b0c-1234-efgh-567890123456",
"title": "Réunion de présentation",
"status": "scheduled",
"scheduled_at": "2026-02-25T14:00:00Z",
"duration_minutes": 45,
"department_id": "e5f6a7b8-c9d0-1234-efgh-567890123456",
"department_name": "Suporte Técnico",
"user_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"user_name": "João Silva",
"customer_id": "6e7f8a9b-0c1d-2345-fghi-678901234567",
"customer_name": "Roberto Lima",
"customer_email": "roberto@email.com",
"customer_phone": "+5511966665544",
"inserted_at": "2026-02-18T16:00:00Z",
"updated_at": "2026-02-18T16:00:00Z"
}
}Vérifier les Conflits
Vérifie s'il existe des conflits d'horaire pour un agent.
GET /api/v1/appointments/conflictsQuery Parameters
| Paramètre | Type | Obligatoire | Description |
|---|---|---|---|
user_id | uuid | Oui | ID de l'agent |
scheduled_at | string | Oui | Date et heure à vérifier |
duration_minutes | integer | Non | Durée en minutes (défaut : 30) |
exclude_id | uuid | Non | ID du rendez-vous à exclure de la vérification |
Exemple de Requête
bash
curl -X GET "https://voki.avanter.com.br/api/v1/appointments/conflicts?user_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890&scheduled_at=2026-02-25T14:00:00Z&duration_minutes=45" \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter"Réponse de Succès (200)
json
{
"data": {
"has_conflicts": false,
"conflicts": []
}
}Confirmer un Rendez-vous
POST /api/v1/appointments/:id/confirmExemple de Requête
bash
curl -X POST https://voki.avanter.com.br/api/v1/appointments/4c5d6e7f-8a9b-0123-defg-456789012345/confirm \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter"Annuler un Rendez-vous
POST /api/v1/appointments/:id/cancelRequest Body (optionnel)
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
reason | string | Non | Motif de l'annulation |
Exemple de Requête
bash
curl -X POST https://voki.avanter.com.br/api/v1/appointments/4c5d6e7f-8a9b-0123-defg-456789012345/cancel \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter" \
-H "Content-Type: application/json" \
-d '{
"reason": "Le client a demandé un report"
}'Marquer comme Terminé
POST /api/v1/appointments/:id/completeMarquer comme No-Show
POST /api/v1/appointments/:id/no-showStatuts du Rendez-vous
| Statut | Description |
|---|---|
scheduled | Planifié, en attente de confirmation |
confirmed | Confirmé par l'agent ou le client |
completed | Appel réalisé |
cancelled | Annulé |
no_show | Le client ne s'est pas présenté |
