de
Buchungen›Techniker für ein P0-Notfall-Einschieben einstufen

Techniker für ein P0-Notfall-Einschieben einstufen

Gibt die Techniker zurück, die den Notfallauftrag zum angeforderten Start übernehmen könnten, sortiert nach SCHNELLSTER ANKUNFT zuerst (bei einem P0 schlägt die Ankunft die Routeneffizienz). Die Antwort enthält außerdem eine historische `crew_recommendation` (mediane Teamgröße bei vergleichbaren abgeschlossenen Aufträgen + verpflichtender Haftungsausschluss — AC-2). Gebuchte Techniker sind weiterhin Kandidaten — jeder Eintrag enthält die Verdrängungs-Vorschau (welche Aufträge mit niedrigerer Priorität pro Tag verschoben würden), die eine Zusage an sie verursachen würde; total_moves=0 bedeutet ein freier Slot. P0-Aufträge werden nie verdrängt; P1 nur durch ein P0. Die ETA wird vom Startort des Technikers geschätzt (kein Live-GPS). Übergeben Sie die gewählte technician_id an emergency/preview + emergency/commit. 409 NÄCHSTE SCHRITTE: EMERGENCY_RESCHEDULE_NOT_ELIGIBLE — der Auftrag kann nicht als Notfall eingeschoben werden (nicht P0, bereits gestartet/abgeschlossen/archiviert oder ohne Angebot): korrigieren Sie den Auftragsstatus oder verwenden Sie ein normales confirm. EMERGENCY_RESCHEDULE_CREW_UNSUPPORTED — Team-Aufträge können den Notfall-Ablauf nicht verwenden (v1): stattdessen über confirm/reassign besetzen. EMERGENCY_RESCHEDULE_NO_WORKING_DAY — das gewählte Datum hat keine Arbeitszeiten: wählen Sie einen Arbeitstag. EMERGENCY_RESCHEDULE_IN_PAST — die Startzeit ist bereits vergangen: wählen Sie eine Zeit in der Zukunft.

Argumente

after_hours_overridebooleanbodyoptional
Place this P0 outside working hours / approved time-off — you have phoned the technician and they agreed. Drops the non-working-day rejection; the response then carries an AFTER_HOURS warning. Double-booking, service area, required skills and the lead-tier rule still reject.
emergency_job_idstringbodyoptional
UUID of the P0 job to place. Send this OR `job`, never both and never neither.
▾jobobjectbodyoptional
A job that does not exist yet — the wizard's read-only preview before anything is written. Send this OR `emergency_job_id`.
▾addressobjectbodyoptional
Service address for a caller who does not exist yet. Geocoded when it carries no coordinates.
citystringbodyoptional
countrystringbodyoptional
formattedstringbodyoptional
latitudenumberbodyoptional
linestringbodyoptional
line2stringbodyoptional
longitudenumberbodyoptional
postal_codestringbodyoptional
statestringbodyoptional
customer_idstringbodyoptional
UUID of an existing customer — their stored address is used. Send this OR `address`.
demobilization_minutesintegerbodyoptional
Demobilization minutes after the work — same rules as mobilization_minutes.
job_duration_minutesintegerbodyoptional
Hands-on work minutes. Optional when the job type carries a default.
job_type_idstringbodyoptional
UUID of the job type: supplies default_duration_minutes when job_duration_minutes is omitted. Optional — omitted, the business's default job type applies.
mobilization_minutesintegerbodyoptional
Mobilization minutes before the work — same fallback rules as quoteJobRequest.
skill_idsarray<string>bodyoptional
UUIDs of skills the work needs. Optional; up to 20.
limitintegerbodyoptional
Maximale Anzahl zurückgegebener Kandidaten (Standard 5, max. 10).
modeenumbodyerforderlich
Cascade mode each candidate's displacement preview assumes: overtime = displaced jobs stay same-day; next_day = overflow rolls to the next working day.
start_atstringbodyerforderlich
Desired start — business-local wall clock. Seconds may be omitted and a space may replace the T; an offset is accepted only when it agrees with the business timezone (a disagreeing one is refused with JOB_REQUEST_INVALID_INPUT rather than guessed). Must be in the future.
POST/v1/job-requests/emergency/candidates
curl -X POST "https://api.crisphive.com/v1/job-requests/emergency/candidates" \
  -H "Authorization: Bearer chsk_test_4eC8xQ9mZ2pL7Ka0rT" \
  -H "Content-Type: application/json" \
  -d '{
  "after_hours_override": true,
  "emergency_job_id": "9b2f6c3e-1a4d-4f0a-8f2e-7c5d1b3a9e01",
  "job": {
    "address": {
      "city": "San Francisco",
      "country": "US",
      "formatted": "123 Market Street, San Francisco, CA 94103",
      "latitude": 1,
      "line": "123 Market Street",
      "line2": "Suite 200",
      "longitude": 1,
      "postal_code": "94103",
      "state": "CA"
    },
    "customer_id": "9b2f6c3e-1a4d-4f0a-8f2e-7c5d1b3a9e01",
    "demobilization_minutes": 15,
    "job_duration_minutes": 90,
    "job_type_id": "9b2f6c3e-1a4d-4f0a-8f2e-7c5d1b3a9e01",
    "mobilization_minutes": 15,
    "skill_ids": [
      "9b2f6c3e-1a4d-4f0a-8f2e-7c5d1b3a9e01"
    ]
  },
  "limit": 1,
  "mode": "overtime",
  "start_at": "2030-06-14T09:00:00"
}'
Anfragetext
{
"after_hours_override": ,
"emergency_job_id": ,
"job": {
"address": {
"city": ,
"country": ,
"formatted": ,
"latitude": ,
"line": ,
"line2": ,
"longitude": ,
"postal_code": ,
"state":
},
"customer_id": ,
"demobilization_minutes": ,
"job_duration_minutes": ,
"job_type_id": ,
"mobilization_minutes": ,
"skill_ids": [
]
},
"limit": ,
"mode": ,
"start_at":
}

Antworten