fr
RéservationsDéclencher le devis (action FIXED — entreprise)

Déclencher le devis (action FIXED — entreprise)

Envoie le devis : renseigne les colonnes quoted_at + duration, fait passer pending_action à confirm_booking. Le statut reste `booking`.

Arguments

idstringpathrequis
ID de la demande d'intervention
crewarray<object>bodyoptionnel
Crew — plan à plusieurs personnes (technicien lead + coéquipiers). Omis / vide = une seule personne (lead à 100 %). Lorsqu'il est présent, doit avoir exactement un is_lead et des wrench_percent totalisant 100. Voir MULTIPERSON_CREW_DESIGN.md.
is_leadbooleanbodyoptionnel
Whether this slot is the crew lead. Exactly one slot must set it.
skill_idsarray<string>bodyoptionnel
UUIDs of the skills this slot requires (hard filter for the matching engine). Optional; up to 20.
wrench_percentintegerbodyoptionnel
This slot's share of the job's man-hours, in percent (1–100). Shares across all slots must sum to 100.
demobilization_minutesintegerbodyoptionnel
Demobilization (teardown) minutes added after the work. Optional, min 0.
job_duration_minutesintegerbodyrequis
Hands-on work duration in minutes (man-minutes for a crew job). Required, min 1.
mobilization_minutesintegerbodyoptionnel
Mobilization (setup/travel-prep) minutes added before the work. Optional, min 0.
status_versionintegerbodyoptionnel
Optimistic-lock fence: the status_version from your last read. Omitted/0 = fence on the row's current version (no race protection).
POST/v1/job-requests/{id}/quote
curl -X POST "https://api.crisphive.com/v1/job-requests/9b2f6c3e-1a4d-4f0a-8f2e-7c5d1b3a9e01/quote" \
  -H "Authorization: Bearer chsk_test_4eC8xQ9mZ2pL7Ka0rT" \
  -H "Content-Type: application/json" \
  -d '{
  "crew": [
    {
      "is_lead": true,
      "skill_ids": [
        "9b2f6c3e-1a4d-4f0a-8f2e-7c5d1b3a9e01"
      ],
      "wrench_percent": 50
    }
  ],
  "demobilization_minutes": 15,
  "job_duration_minutes": 120,
  "mobilization_minutes": 15,
  "status_version": 1
}'
Corps de la requête
{
"crew": [
{
"is_lead": ,
"skill_ids": [
],
"wrench_percent":
}
],
"demobilization_minutes": ,
"job_duration_minutes": ,
"mobilization_minutes": ,
"status_version":
}

Réponses