en
Team & Fleet›Record a technician's time off (sick day, leave)

Record a technician's time off (sick day, leave)

Records a time-off block for a technician. The record is created PENDING; a business staff member approves it on the dashboard — EXCEPT for the sick-call flow, where `commitAbsenceResolve` approves the pending record that covers the absence itself. `start_datetime`/`end_datetime` are RFC3339 INSTANTS with an offset (e.g. `2030-06-15T04:00:00Z` for midnight Toronto), unlike the business-local naive datetimes used by scheduling calls — a whole day off is that day's local midnight to the next in UTC. Overlapping an existing record for the same technician is refused (`TIME_OFF_OVERLAP`); list `GET /technicians/{id}/time-off` first. Creating a record immediately flags the technician's jobs in that window as needing attention on the dispatch board. Supports Idempotency-Key.

Arguments

Idempotency-Keystringheaderoptional
Unique key making retries safe: a repeat send with the same key replays the original response (header Idempotent-Replayed: true) instead of re-running the operation. Reusing a key with a different body returns 422 IDEMPOTENCY_KEY_REUSE.
end_datetimestringbodyrequired
Block end — RFC3339 instant, must be after start_datetime. A whole day off runs local midnight to the next.
reasonstringbodyoptional
Free-text reason, max 500 characters (e.g. "Sick call 06:58").
start_datetimestringbodyrequired
Block start — an RFC3339 instant WITH offset (e.g. 2030-06-15T04:00:00Z = midnight Toronto EDT), not a business-local naive datetime.
technician_idstringbodyrequired
The technician taking time off (must belong to the business).
POST/v1/technician-time-off
curl -X POST "https://api.crisphive.com/v1/technician-time-off" \
  -H "Authorization: Bearer chsk_test_4eC8xQ9mZ2pL7Ka0rT" \
  -H "Content-Type: application/json" \
  -d '{
  "end_datetime": "2026-05-01T17:00:00Z",
  "reason": "Vacation",
  "start_datetime": "2026-05-01T08:00:00Z",
  "technician_id": "550e8400-e29b-41d4-a716-446655440000"
}'
Request body
{
"end_datetime": ,
"reason": ,
"start_datetime": ,
"technician_id":
}

Responses