API Rendez-vous
Endpoints pour la gestion des rendez-vous clients.
SDK: client.app.multiService.appointment
Endpoints
Lister les rendez-vous
POST /app/{appId}/multi-service/appointments/listRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
curl -X POST https://api.applite.ai/app/{appId}/multi-service/appointments/list \
-H "Content-Type: application/json" \
-d '{"apiKey": "your_api_key"}'Créer un rendez-vous
POST /app/{appId}/multi-service/appointments/createRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
serviceId | string | Oui | ID du service |
date | string | Oui | Date/heure (ISO 8601) |
totalPrice | number | Oui | Prix total |
companyId | string | Non | ID entreprise |
customerId | string | Oui | ID du client |
agentId | string | Non | ID de l’agent |
filledFields | object | Non | Champs personnalisés remplis |
commune | string | Non | Commune/quartier |
status | string | Non | Statut initial |
curl -X POST https://api.applite.ai/app/{appId}/multi-service/appointments/create \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key",
"serviceId": "serv_123",
"date": "2024-01-25T14:00:00.000Z",
"totalPrice": 1500,
"agentId": "agent_123",
"customerId": "cust_456",
"filledFields": {
"notes": "Première visite"
},
"commune": "Cocody"
}'Mettre à jour le statut
POST /app/{appId}/multi-service/appointments/{id}/statusRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
status | string | Oui | Nouveau statut |
Statuts valides: pending, confirmed, inProgress, completed, cancelled
curl -X POST https://api.applite.ai/app/{appId}/multi-service/appointments/{appointmentId}/status \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key",
"status": "confirmed"
}'Workflow des statuts
pending → confirmed → inProgress → completed
↓ ↓ ↓
└─────────┴───────────┴──→ cancelledUn rendez-vous completed ou cancelled ne peut plus être modifié.
Exemple complet de workflow
// 1. Créer le rendez-vous
const appointment = await client.app.multiService.appointment.create({
appId: "app_id",
apiKey: "api_key",
serviceId: "serv_123",
date: "2024-01-25T14:00:00.000Z",
totalPrice: 1500
});
// 2. Confirmer le rendez-vous
await client.app.multiService.appointment.updateStatus({
appId: "app_id",
apiKey: "api_key",
id: appointment.data.id,
status: "confirmed"
});
// 3. Démarrer le service
await client.app.multiService.appointment.updateStatus({
appId: "app_id",
apiKey: "api_key",
id: appointment.data.id,
status: "inProgress"
});
// 4. Terminer le service
await client.app.multiService.appointment.updateStatus({
appId: "app_id",
apiKey: "api_key",
id: appointment.data.id,
status: "completed"
});Last updated on