Skip to Content
Nouvelle documentation Applite - JS SDK, Dart SDK & REST API

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/list
ChampTypeRequisDescription
apiKeystringOuiClé 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/create
ChampTypeRequisDescription
apiKeystringOuiClé API
serviceIdstringOuiID du service
datestringOuiDate/heure (ISO 8601)
totalPricenumberOuiPrix total
companyIdstringNonID entreprise
customerIdstringOuiID du client
agentIdstringNonID de l’agent
filledFieldsobjectNonChamps personnalisés remplis
communestringNonCommune/quartier
statusstringNonStatut 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}/status
ChampTypeRequisDescription
apiKeystringOuiClé API
statusstringOuiNouveau 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 ↓ ↓ ↓ └─────────┴───────────┴──→ cancelled

Un 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