API v1.0 — stable

Documentation API

REST · JSON · OAuth2 · rate-limit 600 req/min. Prête pour intégrations tierces (ERP, comptabilité, marketing).

p99 < 120 ms
OAuth2 + API keys
SDK JS / Python
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/login
Authentification par email + mot de passe
POST
/v1/auth/refresh
Rafraîchir le token JWT
POST
/v1/auth/logout
Révoquer la session

Clients

GET
/v1/clients
Lister les clients (paginated, filters)
POST
/v1/clients
Créer un client
GET
/v1/clients/:id
Détails d'un client
PATCH
/v1/clients/:id
Mise à jour partielle
DELETE
/v1/clients/:id
Supprimer un client
POST
/v1/clients/import
Import CSV en masse

Devis

GET
/v1/quotes
Lister les devis
POST
/v1/quotes
Créer un devis
GET
/v1/quotes/:id
Détails d'un devis
PATCH
/v1/quotes/:id
Mise à jour (statut, items, notes)
POST
/v1/quotes/:id/sign
Signature électronique + PDF
POST
/v1/quotes/:id/send
Envoi PDF par email
GET
/v1/quotes/:id/pdf
Télécharger le PDF

Phoning

GET
/v1/calls/queue
File d'appels attribuée
POST
/v1/calls/:clientId/lock
Verrou anti-overlap (60 min)
POST
/v1/calls
Enregistrer un appel
GET
/v1/calls
Historique des appels

Catalogue

GET
/v1/services
Lister les prestations
POST
/v1/services
Créer une prestation (admin)
PATCH
/v1/services/:id
Mise à jour (admin)
DELETE
/v1/services/:id
Supprimer (admin)

Analytique

GET
/v1/analytics/revenue
CA par période, avec objectifs
GET
/v1/analytics/leaderboard
Classement commerciaux temps réel
GET
/v1/analytics/zones
Ré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
CodeSignificationCause fréquente
400Bad RequestPayload invalide (voir errors[])
401UnauthorizedToken manquant ou expiré
403ForbiddenRôle insuffisant pour l'action
404Not FoundRessource inexistante
409ConflictVerrou phoning actif (autre commercial)
422Unprocessable EntityValidation métier échouée
429Too Many RequestsRate limit dépassé