ko
예약›P0 긴급 삽입을 위한 기사 순위 산정

P0 긴급 삽입을 위한 기사 순위 산정

요청된 시작 시각에 긴급 작업을 맡을 수 있는 기사를 반환하며, 가장 빠른 도착(FASTEST-ARRIVAL) 순으로 정렬됩니다(P0에서는 도착 속도가 경로 효율성보다 우선합니다). 응답에는 과거 데이터 기반의 `crew_recommendation`(유사한 완료 작업의 중앙값 크루 규모 + 필수 고지 사항 — AC-2)도 포함됩니다. 예약이 있는 기사도 여전히 후보입니다 — 각 항목에는 해당 기사에게 커밋할 경우 발생할 밀어내기(displacement) 미리보기(어떤 낮은 우선순위 작업이 일자별로 밀려나는지)가 포함됩니다. total_moves=0이면 빈 슬롯을 의미합니다. P0 작업은 절대 밀려나지 않으며, P1은 오직 P0에 의해서만 밀려납니다. ETA는 기사의 시작 위치에서 추정됩니다(실시간 GPS 없음). 선택한 technician_id를 emergency/preview + emergency/commit에 전달하세요. 409 다음 단계: EMERGENCY_RESCHEDULE_NOT_ELIGIBLE — 작업을 긴급 삽입할 수 없음(P0가 아니거나, 이미 시작/완료/보관되었거나, 견적이 없음): 작업 상태를 수정하거나 일반 confirm을 사용하세요. EMERGENCY_RESCHEDULE_CREW_UNSUPPORTED — 크루 작업은 긴급 플로우를 사용할 수 없습니다(v1): 대신 confirm/reassign으로 인력을 배정하세요. 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":
}

응답