À quoi sert la ressource « Ordres d’intervention » ?
Interventions chez le client : planification, exécution, checklist, main-d’œuvre, pièces, rapport signé, SLA, facturation
Quels endpoints sont disponibles ?
| Méthode | Adresse | Action |
|---|---|---|
| GET | /api/v1/work_orders et /{id} | lire (liste paginée ou un élément par identifiant) |
| POST | /api/v1/work_orders | créer un élément |
| PUT | /api/v1/work_orders/{id} | remplacer un élément |
| PATCH | /api/v1/work_orders/{id} | modifier certains champs |
| DELETE | /api/v1/work_orders/{id} | supprimer un élément |
Quels champs contient la ressource « Ordres d’intervention » ?
| Champ | Type et description |
|---|---|
| id | string |
| tenantId | string |
| number | string |
| clientId | string |
| clientName | string |
| contractId | string |
| ticketId | string |
| equipmentId | string |
| equipmentLabel | string — désignation de l'équipement, figée sur l'ordre |
| projectId | string |
| planId | string |
| type | installation|maintenance_preventive|depannage|diagnostic|formation|mise_en_service|autre |
| priority | low|medium|high|critical |
| status | draft|planned|dispatched|en_route|in_progress|paused|done|validated|invoiced|cancelled |
| title | string |
| description | string |
| site | object |
| technicianId | string |
| extraTechnicianIds | string[] |
| requiredSkills | string[] |
| plannedStart | ISO8601 |
| plannedEnd | ISO8601 |
| travelMinutes | number |
| actualStart | ISO8601 |
| actualEnd | ISO8601 |
| checkInAt | ISO8601 |
| checkOutAt | ISO8601 |
| pauses | object[] |
| checklist | WorkOrderChecklistItem[] |
| parts | WorkOrderPart[] |
| labor | WorkOrderLabor[] |
| expenses | WorkOrderExpense[] |
| report | object |
| billing | object |
| slaResponseDueAt | ISO8601 |
| slaResolutionDueAt | ISO8601 |
| slaStatus | on_time|warning|breached |
| history | object[] |
| createdAt | ISO8601 |
| updatedAt | ISO8601 |
| createdBy | string |
Comment filtrer, trier et paginer ?
Exemple de lecture filtrée et triée : GET /api/v1/work_orders?filter[number]=…&sort=clientId:desc&limit=50.
Le filtre est une égalité stricte sur un champ déclaré, le tri s’écrit champ:asc ou champ:desc, la page contient 50 éléments par défaut et 200 au plus, un champ inconnu renvoie une erreur 400 plutôt qu’un résultat faux.
Quelles autorisations faut-il ?
- Une offre qui inclut l’API publique : Enterprise.
- Une clé d’API créée dans Système › Intégrations, envoyée dans l’en-tête Authorization: Bearer, limitée au dossier qui l’a émise.
- Une portée accordée à la clé pour cette ressource : lecture, écriture et suppression.