ja
予約›P0 緊急挿入のためのテクニシャンのランク付け

P0 緊急挿入のためのテクニシャンのランク付け

指定した開始時刻に緊急ジョブを担当できるテクニシャンを、到着が最速の順(P0 ではルート効率よりも到着が優先されます)でランク付けして返します。レスポンスには、過去実績に基づく `crew_recommendation`(比較可能な完了ジョブでのクルー人数の中央値 + 必須の免責事項 — AC-2)も含まれます。予約が入っているテクニシャンも候補になります — 各エントリには、そのテクニシャンにコミットした場合に発生する押しのけプレビュー(どの低優先度ジョブが日ごとに押しのけられるか)が含まれ、total_moves=0 は空き枠を意味します。P0 ジョブが押しのけられることは決してなく、P1 は P0 によってのみ押しのけられます。ETA はテクニシャンの開始地点から推定されます(ライブ GPS はありません)。選んだ technician_id を emergency/preview と emergency/commit に渡してください。 409 の次のステップ: EMERGENCY_RESCHEDULE_NOT_ELIGIBLE — ジョブを緊急挿入できません(P0 でない、既に開始/完了/アーカイブ済み、または未見積もり): ジョブの状態を修正するか、通常の確定を使用してください。EMERGENCY_RESCHEDULE_CREW_UNSUPPORTED — クルージョブは緊急フローを使用できません(v1): 代わりに確定/再割り当てで人員を手配してください。EMERGENCY_RESCHEDULE_NO_WORKING_DAY — 選んだ日に勤務時間がありません: 勤務日を選んでください。EMERGENCY_RESCHEDULE_IN_PAST — 開始時刻が既に過ぎています: 未来の時刻を選んでください。

引数

after_hours_overridebooleanbody任意
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_idstringbody任意
UUID of the P0 job to place. Send this OR `job`, never both and never neither.
▾jobobjectbody任意
A job that does not exist yet — the wizard's read-only preview before anything is written. Send this OR `emergency_job_id`.
▾addressobjectbody任意
Service address for a caller who does not exist yet. Geocoded when it carries no coordinates.
citystringbody任意
countrystringbody任意
formattedstringbody任意
latitudenumberbody任意
linestringbody任意
line2stringbody任意
longitudenumberbody任意
postal_codestringbody任意
statestringbody任意
customer_idstringbody任意
UUID of an existing customer — their stored address is used. Send this OR `address`.
demobilization_minutesintegerbody任意
Demobilization minutes after the work — same rules as mobilization_minutes.
job_duration_minutesintegerbody任意
Hands-on work minutes. Optional when the job type carries a default.
job_type_idstringbody任意
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_minutesintegerbody任意
Mobilization minutes before the work — same fallback rules as quoteJobRequest.
skill_idsarray<string>body任意
UUIDs of skills the work needs. Optional; up to 20.
limitintegerbody任意
返す候補の最大数(デフォルト 5、最大 10)です。
modeenumbody必須
Cascade mode each candidate's displacement preview assumes: overtime = displaced jobs stay same-day; next_day = overflow rolls to the next working day.
start_atstringbody必須
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"
}'
リクエストボディ
{
"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":
}

レスポンス