Construisez avec iValid
API REST moderne, authentification OAuth 2.0, webhooks temps réel. Tout ce qu'il vous faut pour intégrer iValid.
Introduction
L'API iValid vous permet d'intégrer la gestion des rendez-vous directement dans vos applications. Conçue pour les entreprises avec des équipes terrain (BTP, SAV, maintenance), elle offre une solution complète pour automatiser la planification et optimiser les interventions.
URL de base
https://api.ivalid.fr/v2
Format
JSON (application/json)
Authentification
OAuth 2.0 / Bearer Token
Rate Limit
1000 requêtes/minute
Hébergement
100% France (RGPD)
SLA
99.9% disponibilité
Environnement de test
https://sandbox.api.ivalid.fr/v2 pour vos tests. Les données sont réinitialisées toutes les 24h.Authentification
ImportantiValid utilise OAuth 2.0 pour l'authentification. Obtenez vos credentials depuis le dashboard développeur dans Paramètres → API → Credentials.
1. Obtenir un token d'accès
1POST https://api.ivalid.fr/oauth/token2 3{4 "grant_type": "client_credentials",5 "client_id": "your_client_id",6 "client_secret": "your_client_secret",7 "scope": "appointments:read appointments:write customers:read"8}2. Réponse
1{2 "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",3 "token_type": "Bearer",4 "expires_in": 3600,5 "refresh_token": "dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4...",6 "scope": "appointments:read appointments:write customers:read"7}Sécurité
client_secret côté client. Utilisez toujours un serveur backend pour les appels authentifiés.3. Utiliser le token
Incluez le token dans le header Authorization de chaque requête :
"text-emerald-600">Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...Scopes disponibles
appointments:readLecture des rendez-vousappointments:writeCréation/modification des rendez-vouscustomers:readLecture des clientscustomers:writeCréation/modification des clientsservices:readLecture des servicesteams:readLecture des équipes et technicienswebhooks:manageGestion des webhooksPremier appel API
Testez votre intégration en récupérant la liste de vos rendez-vous.
1"text-emerald-600">curl"text-indigo-600"> -X GET "https://api.ivalid.fr/v2/appointments" \2 "text-indigo-600"> -H "Authorization: Bearer YOUR_API_KEY" \3 "text-indigo-600"> -H "Content-Type: application/json"Réponse attendue
1{2 "data": [3 {4 "id": "apt_1234567890",5 "customer": {6 "id": "cust_abc123",7 "name": "Marie Dupont",8 "email": "marie@example.com",9 "phone": "+33612345678"10 },11 "service": {12 "id": "srv_installation",13 "name": "Installation Climatisation",14 "duration": 120,15 "price": 150.0016 },17 "technician": {18 "id": "tech_xyz789",19 "name": "Jean Martin"20 },21 "scheduled_at": "2025-01-20T09:00:00Z",22 "status": "confirmed",23 "location": {24 "address": "15 rue des Lilas",25 "city": "Paris",26 "postal_code": "75001",27 "coordinates": { "lat": 48.8566, "lng": 2.3522 }28 }29 }30 ],31 "meta": {32 "total": 42,33 "page": 1,34 "per_page": 10,35 "total_pages": 536 }37}Bravo !
Rendez-vous
Gérez les rendez-vous de vos clients : création, modification, annulation et consultation. L'API gère automatiquement les conflits de planning et les zones géographiques.
/v2/appointments/v2/appointments/:id/v2/appointments/v2/appointments/:id/v2/appointments/:id/v2/appointments/:id/confirm/v2/appointments/:id/rescheduleCréer un rendez-vous
1POST /v2/appointments2 3{4 "customer_id": "cust_abc123",5 "service_id": "srv_installation",6 "scheduled_at": "2025-01-20T09:00:00Z",7 "technician_id": "tech_xyz789",8 "duration": 120,9 "location": {10 "address": "15 rue des Lilas",11 "city": "Paris",12 "postal_code": "75001"13 },14 "notes": "Code portail: 1234",15 "notify_customer": true,16 "reminder_sms": true,17 "reminder_email": true18}Filtres disponibles
statuspending, confirmed, completed, cancelledtechnician_idFiltrer par techniciencustomer_idFiltrer par clientdate_fromDate de début (ISO 8601)date_toDate de fin (ISO 8601)postal_codeFiltrer par code postalClients
Gérez votre base clients avec leurs coordonnées, historique de rendez-vous et préférences.
/v2/customers/v2/customers/:id/v2/customers/v2/customers/:id/v2/customers/:id/appointments1POST /v2/customers2 3{4 "first_name": "Marie",5 "last_name": "Dupont",6 "email": "marie.dupont@example.com",7 "phone": "+33612345678",8 "address": {9 "street": "15 rue des Lilas",10 "city": "Paris",11 "postal_code": "75001",12 "country": "FR"13 },14 "preferences": {15 "preferred_contact": "sms",16 "preferred_time_slots": ["morning", "afternoon"],17 "language": "fr"18 },19 "tags": ["premium", "fidele"],20 "custom_fields": {21 "numero_client": "CLT-2024-001"22 }23}Services
Définissez vos prestations avec leur durée, tarif et compétences requises.
/v2/services/v2/services/:id/v2/services/v2/services/:id1{2 "id": "srv_installation",3 "name": "Installation Climatisation",4 "description": "Installation complète d'un système de climatisation",5 "duration": 120,6 "buffer_before": 15,7 "buffer_after": 15,8 "price": 150.00,9 "currency": "EUR",10 "required_skills": ["climatisation", "electricite"],11 "available_online": true,12 "color": "#10B981",13 "category": "installation"14}Équipes & Techniciens
Gérez vos équipes terrain, leurs compétences et zones d'intervention.
/v2/teams/v2/technicians/v2/technicians/:id/v2/technicians/:id/schedule1{2 "id": "tech_xyz789",3 "name": "Jean Martin",4 "email": "jean.martin@company.com",5 "phone": "+33698765432",6 "skills": ["climatisation", "chauffage", "electricite"],7 "zones": ["75001", "75002", "75003", "75004"],8 "working_hours": {9 "monday": { "start": "08:00", "end": "18:00" },10 "tuesday": { "start": "08:00", "end": "18:00" },11 "wednesday": { "start": "08:00", "end": "18:00" },12 "thursday": { "start": "08:00", "end": "18:00" },13 "friday": { "start": "08:00", "end": "17:00" }14 },15 "max_appointments_per_day": 6,16 "current_location": { "lat": 48.8566, "lng": 2.3522 }17}Disponibilités
Consultez les créneaux disponibles en tenant compte des compétences requises, zones géographiques et temps de trajet.
/v2/availability/v2/availability/slots/v2/availability/check1GET /v2/availability?service_id=srv_installation&date=2025-01-20&postal_code=750012 3{4 "date": "2025-01-20",5 "slots": [6 {7 "start": "09:00",8 "end": "11:00",9 "technician_id": "tech_xyz789",10 "technician_name": "Jean Martin",11 "travel_time": 1512 },13 {14 "start": "14:00",15 "end": "16:00",16 "technician_id": "tech_abc456",17 "technician_name": "Pierre Dubois",18 "travel_time": 2019 }20 ],21 "next_available_date": "2025-01-21"22}Optimisation des trajets
Webhooks
Temps réelRecevez des notifications en temps réel lorsque des événements se produisent sur votre compte. Les webhooks sont signés avec HMAC-SHA256 pour garantir leur authenticité.
appointment.createdNouveau RDV crééappointment.updatedRDV modifiéappointment.confirmedRDV confirméappointment.cancelledRDV annuléappointment.completedRDV terminéappointment.reminderRappel envoyécustomer.createdNouveau clientcustomer.updatedClient modifiéConfigurer un webhook
1POST /v2/webhooks2 3{4 "url": "https://your-app.com/webhooks/ivalid",5 "events": [6 "appointment.created",7 "appointment.updated",8 "appointment.cancelled"9 ],10 "secret": "whsec_your_webhook_secret",11 "active": true12}Payload reçu
1{2 "id": "evt_1234567890",3 "event": "appointment.created",4 "timestamp": "2025-01-15T14:32:05.000Z",5 "data": {6 "id": "apt_1234567890",7 "customer": {8 "id": "cust_abc123",9 "name": "Marie Dupont"10 },11 "service": {12 "id": "srv_installation",13 "name": "Installation Climatisation"14 },15 "scheduled_at": "2025-01-20T09:00:00Z",16 "status": "confirmed"17 }18}Vérification HMAC-SHA256
Chaque webhook inclut une signature dans le header X-iValid-Signature. Vérifiez-la pour garantir l'authenticité :
1600">"text-violet-600">const crypto = 600">require(600">'crypto');2 3600">"text-violet-600">function 600">verifyWebhook(payload, signature, secret) {4 600">"text-violet-600">const expectedSignature = crypto5 .600">createHmac(600">'sha256', secret)6 .600">update(payload)7 .600">digest(600">'hex');8 9 600">"text-violet-600">return crypto.600">timingSafeEqual(10 Buffer.600">"text-violet-600">from(signature),11 Buffer.600">"text-violet-600">from(600">'sha256=' + expectedSignature)12 );13}Retry automatique
Intégrations
iValid s'intègre nativement avec vos outils existants pour une synchronisation automatique et bidirectionnelle.
Google Calendar
Sync bidirectionnelle des RDV
/v2/integrations/google-calendarMicrosoft Outlook
Calendrier Microsoft 365
/v2/integrations/outlookZoho CRM
Sync contacts et leads
/v2/integrations/zohoStripe
Paiements en ligne
/v2/integrations/stripeZapier
+5000 apps connectées
/v2/integrations/zapierMake (Integromat)
Automatisations avancées
/v2/integrations/makeConfiguration
SDKs & Librairies
Utilisez nos SDKs officiels pour intégrer iValid plus rapidement.
Node.js
1npm install @ivalid/sdk2 3400">// Usage4600">"text-violet-600">const iValid = 600">require(600">'@ivalid/sdk');5 6600">"text-violet-600">const client = 600">"text-violet-600">new iValid.600">Client({7 apiKey: 600">'your_api_key',8 environment: 600">'production' 400">// or 600">'sandbox'9});10 11400">// Get appointments12600">"text-violet-600">const appointments = 600">"text-violet-600">await client.appointments.600">list({13 status: 600">'confirmed',14 date_from: 600">'2025-01-01'15});16 17400">// Create appointment18600">"text-violet-600">const newAppointment = 600">"text-violet-600">await client.appointments.600">create({19 customer_id: 600">'cust_abc123',20 service_id: 600">'srv_installation',21 scheduled_at: 600">'2025-01-20T09:00:00Z'22});Python
1pip install ivalid2 3400"># Usage4600">"text-violet-600">from ivalid 600">"text-violet-600">import Client5 6client = 600">Client(7 api_key=600">'your_api_key',8 environment=600">'production' 400"># 600">"text-violet-600">or 600">'sandbox'9)10 11400"># Get appointments12appointments = client.appointments.600">list(13 status=600">'confirmed',14 date_from=600">'2025-01-01'15)16 17400"># Create appointment18new_appointment = client.appointments.600">create(19 customer_id=600">'cust_abc123',20 service_id=600">'srv_installation',21 scheduled_at=600">'2025-01-20T09:00:00Z'22)PHP
1composer "text-violet-600">require ivalid/sdk2 3<?php4"text-violet-600">use iValid\Client;5 6"text-indigo-600">$client = "text-violet-600">new Client([7 'api_key' => 'your_api_key',8 'environment' => 'production'9]);10 11// Get appointments12"text-indigo-600">$appointments = "text-indigo-600">$client->appointments->list([13 'status' => 'confirmed',14 'date_from' => '2025-01-01'15]);16 17// Create appointment18"text-indigo-600">$newAppointment = "text-indigo-600">$client->appointments->create([19 'customer_id' => 'cust_abc123',20 'service_id' => 'srv_installation',21 'scheduled_at' => '2025-01-20T09:00:00Z'22]);Gestion des erreurs
L'API utilise les codes HTTP standards et retourne des messages d'erreur détaillés en JSON.
1{2 "error": {3 "code": "SLOT_NOT_AVAILABLE",4 "message": "Le créneau demandé n'est plus disponible",5 "details": {6 "requested_slot": "2025-01-20T09:00:00Z",7 "technician_id": "tech_xyz789",8 "reason": "already_booked"9 },10 "suggestions": [11 { "slot": "2025-01-20T14:00:00Z", "technician_id": "tech_xyz789" },12 { "slot": "2025-01-21T09:00:00Z", "technician_id": "tech_abc456" }13 ]14 }15}Codes d'erreur
SLOT_NOT_AVAILABLE) pour faciliter le traitement programmatique et des suggestions quand c'est pertinent.Besoin d'aide ?
Notre équipe est disponible pour vous accompagner dans votre intégration.