Authentification
Toutes les requêtes doivent inclure un token JWT dans l'en-tête Authorization: Bearer <token>. Les tokens sont valides 24h et peuvent être renouvelés via /v1/auth/refresh.
Auth
POST
/v1/auth/loginAuthentification par email + mot de passe
POST
/v1/auth/refreshRafraîchir le token JWT
POST
/v1/auth/logoutRévoquer la session
Clients
GET
/v1/clientsLister les clients (paginated, filters)
POST
/v1/clientsCréer un client
GET
/v1/clients/:idDétails d'un client
PATCH
/v1/clients/:idMise à jour partielle
DELETE
/v1/clients/:idSupprimer un client
POST
/v1/clients/importImport CSV en masse
Devis
GET
/v1/quotesLister les devis
POST
/v1/quotesCréer un devis
GET
/v1/quotes/:idDétails d'un devis
PATCH
/v1/quotes/:idMise à jour (statut, items, notes)
POST
/v1/quotes/:id/signSignature électronique + PDF
POST
/v1/quotes/:id/sendEnvoi PDF par email
GET
/v1/quotes/:id/pdfTélécharger le PDF
Phoning
GET
/v1/calls/queueFile d'appels attribuée
POST
/v1/calls/:clientId/lockVerrou anti-overlap (60 min)
POST
/v1/callsEnregistrer un appel
GET
/v1/callsHistorique des appels
Catalogue
GET
/v1/servicesLister les prestations
POST
/v1/servicesCréer une prestation (admin)
PATCH
/v1/services/:idMise à jour (admin)
DELETE
/v1/services/:idSupprimer (admin)
Analytique
GET
/v1/analytics/revenueCA par période, avec objectifs
GET
/v1/analytics/leaderboardClassement commerciaux temps réel
GET
/v1/analytics/zonesRépartition par département
Exemple : créer un devis
Requête
curl -X POST https://api.renovcrm.fr/v1/quotes \
-H "Authorization: Bearer eyJhbGci..." \
-H "Content-Type: application/json" \
-d '{
"client_id": "cli_82K3s",
"items": [
{ "service_id": "svc_toit_01", "quantity": 42 }
]
}'Réponse (201 Created)
{
"id": "qte_9Xk3z",
"reference": "DEV-2026-1042",
"client_id": "cli_82K3s",
"status": "draft",
"total_ht": 7560.00,
"total_tva": 756.00,
"total_ttc": 8316.00,
"items": [
{
"service_id": "svc_toit_01",
"name": "Réfection complète toiture tuiles",
"quantity": 42,
"price_ht": 180.00,
"tva": 10
}
],
"created_at": "2026-07-08T14:22:11Z"
}Codes d'erreur
| Code | Signification | Cause fréquente |
|---|---|---|
| 400 | Bad Request | Payload invalide (voir errors[]) |
| 401 | Unauthorized | Token manquant ou expiré |
| 403 | Forbidden | Rôle insuffisant pour l'action |
| 404 | Not Found | Ressource inexistante |
| 409 | Conflict | Verrou phoning actif (autre commercial) |
| 422 | Unprocessable Entity | Validation métier échouée |
| 429 | Too Many Requests | Rate limit dépassé |