ko
예약›긴급 삽입 + 연쇄 재조정 미리보기

긴급 삽입 + 연쇄 재조정 미리보기

긴급 작업을 선택한 시각에 기사에게 삽입할 때의 연쇄 재조정을 (쓰기 없이) 계산합니다: 긴급 작업이 어디에 배치되는지 + 뒤로 밀려나는 모든 작업을, 비즈니스 로컬 일자별로 묶어서 보여줍니다. `displacement_mode=reassign`이면 밀려나는 각 작업을 원래 창(같은 날 약속)에 다른 가능한 기사에게 넘깁니다 — 대체 가능한 여유가 없는 작업은 reschedule로 폴백되어 `days`에 남습니다. `mode=overtime`은 모두 같은 날 유지(기사가 늦게까지 근무); `mode=next_day`는 초과분을 다음 근무일(들)로 넘깁니다. 읽기 전용 — 반복 호출해도 안전하며, 커밋은 별도 엔드포인트입니다. 독립된 기능입니다(EMERGENCY_RESCHEDULE_DESIGN.md 참고). 409 다음 단계: EMERGENCY_RESCHEDULE_SLOT_OCCUPIED — 도착 창이 연쇄가 이동할 수 없는 작업(다른 P0, 크루 또는 멀티데이 작업)에 막힘: 다른 기사(/candidates 순위를 따라가며)나 다른 시각을 선택하세요. 밀어내기는 절대 P0/크루/멀티데이 앵커를 건드리지 않습니다. EMERGENCY_RESCHEDULE_NOT_ELIGIBLE / CREW_UNSUPPORTED / NO_WORKING_DAY / IN_PAST — /candidates와 동일한 대응책.

인수

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.
displacement_modeenumbody선택
밀려나는 작업의 처리 방식: reschedule(기본값 — 이후 창으로 밀림) 또는 reassign(원래 시각에 다른 가능한 기사에게 넘김; 여유가 없는 작업은 reschedule로 폴백).
emergency_job_idstringbody선택
삽입할 P0 작업의 ID.
▾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.
modeenumbody필수
연쇄 모드: overtime = 밀려나는 작업이 같은 날 유지(기사가 늦게까지 근무); next_day = 초과분이 다음 근무일로 넘어감.
start_atstringbody필수
원하는 시작 시각 — 비즈니스 로컬 naive datetime(예: "2026-07-20T09:00:00"). 미래 시각이어야 합니다.
technician_idstringbody필수
대상 기사(비즈니스에 속해야 함).
POST/v1/job-requests/emergency/preview
curl -X POST "https://api.crisphive.com/v1/job-requests/emergency/preview" \
  -H "Authorization: Bearer chsk_test_4eC8xQ9mZ2pL7Ka0rT" \
  -H "Content-Type: application/json" \
  -d '{
  "after_hours_override": true,
  "displacement_mode": "reschedule",
  "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"
    ]
  },
  "mode": "overtime",
  "start_at": "2030-06-14T09:00:00",
  "technician_id": "9b2f6c3e-1a4d-4f0a-8f2e-7c5d1b3a9e01"
}'
요청 본문
{
"after_hours_override": ,
"displacement_mode": ,
"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": [
]
},
"mode": ,
"start_at": ,
"technician_id":
}

응답