Docs
← chronapilot.com v 2026-05-12
API reference · Departure

Departure

Traffic and weather-aware optimal-leave-time calculation. The differentiator.

Endpoints

POST /v1/departure/compute Stateless: compute a departure
GET /v1/events/{id}/departure Current departure for an event
POST /v1/events/{id}/departure/recompute Force a fresh calculation

Object shape

The departure object describes the optimal time-to-leave window for an event, given live traffic and weather.

FieldTypeDescription
event_idstringReference event.
earliest_departuredatetimeLeave by this time to arrive comfortably on time.
latest_departuredatetimeLast safe departure — leaving after risks lateness.
travelobjectDecomposed: total_minutes, drive_minutes, parking_minutes, walk_minutes.
traffic_levelstringfree, light, moderate, heavy, severe.
weatherobject?Forecast at the destination at arrival time.
weather_warningobject?Active weather warning, if any.
confidencestringlow, medium, high.
calculated_atdatetimeWhen this snapshot was computed.
next_recalc_atdatetimeWhen ChronaPilot will recompute (typically every 1–10 min).

Stateless compute

HTTP
POST /v1/departure/compute

Compute a departure for a hypothetical event without persisting anything. Useful for booking flows that want a leave-time estimate before the user confirms.

FieldTypeDescription
from_locationobjectrequired — lat/lng or address.
to_locationobjectrequired — lat/lng or address.
arrive_bydatetimerequired — desired arrival time.
travel.modestringdrive (default), walk, transit.
travel.parking_buffer_minintegerDefault 5.

Stateful — current departure

HTTP
GET /v1/events/{id}/departure

Returns the latest cached departure for an event under monitoring. The event must have a location.

Force a recompute

HTTP
POST /v1/events/{id}/departure/recompute

Bypasses the cache and runs a fresh routing + traffic + weather lookup. Rate-limited to 4 per minute per event.

Background monitoring

Every event with a future start time and a location is monitored automatically. ChronaPilot recomputes:

  • Every 5 minutes when more than 3 hours from start.
  • Every 2 minutes when within 3 hours.
  • Every 60 seconds when within 30 minutes.

Updates fire departure.updated. Threshold crossings (e.g. "you should leave in 5 minutes") fire departure.threshold_reached.

Reference implementation