Skip to main content
An order contains several kinds of time. Each one answers a different question. Keep them separate in your system and in your user interface.
  • available_from: When can Bahn first collect the vehicle?
  • requested_windows: Which times did you request?
  • agreed_window: Which time range did Bahn agree to?
  • pickup.estimated_day: Which calendar day does Bahn expect to collect the vehicle when no clock-time ETA is known?
  • commitment_deadline_at: What is the latest committed delivery time?
  • eta: When does Bahn expect to arrive?
  • eta_range: What range does the arrival prediction cover?
  • eta_updated_at: When did Bahn last update the ETA?
  • actual_at: When did the stop complete?
A requested window is not a commitment. agreed_window is null until Bahn agrees a window. commitment_deadline_at comes from the service promise or an explicit commitment, not from the ETA. A day-based service promise ends at the end of the local delivery day. An exact commitment retains its agreed time. Neither a price estimate nor an accepted order confirms the requested window. Pickup and delivery each have requested_windows, agreed_window, eta, eta_updated_at, and actual_at. Only pickup has available_from and estimated_day. Only delivery has commitment_deadline_at; there is no pickup deadline. The order list returns only actual_pickup_at and actual_delivery_at for each order. Read the full order for the other times.

Request pickup and delivery times

Send the times when you create an order. The same rules apply when you change an order.
  • Pickup needs available_from, at least one requested window, or both.
  • When you send both, each pickup window must start at or after available_from.
  • Each window needs start_at, end_at, and an IANA time zone such as Europe/Helsinki.
  • Send start_at and end_at as RFC 3339 timestamps with an offset.
  • Each window must start before it ends, and it must end in the future.
  • The requested windows for one stop must not overlap.
  • A delivery window must end after pickup can start.
For a private pickup or an end_customer delivery, pickup must start on the next calendar day or later in Europe/Helsinki. This is a calendar-day rule, not a 24-hour waiting period.
Create and find orders contains complete requests with these fields.

Show the current ETA

Read pickup.eta and delivery.eta from the full order with GET /v2/orders/{order_id}. Each ETA is an RFC 3339 timestamp. The order list does not contain ETAs. Choose the time to show in this order:
  1. After the stop completes, show actual_at.
  2. When eta is present, show it as the current estimate. Show eta_updated_at near it.
  3. When eta is null, show agreed_window.
  4. When there is no agreed window, show pickup.estimated_day if it is present. It names a day, not a time.
  5. Otherwise, show the requested windows.
eta is null when Bahn has no reliable clock-time estimate, or when the estimate is already in the past. A date-only pickup estimate remains in pickup.estimated_day throughout that day; never turn it into a midnight ETA. Do not calculate an ETA from a map position, and do not show a window as an ETA. Before a live ETA exists, Bahn predicts arrival from comparable transports. With sparse history, it uses broader history and the route plan, with a wider eta_range. The range contains start_at and end_at. It is not an agreed window or a guarantee. A null end_at means the upper bound is unknown. The whole range is null for live ETAs or missing essential route information. A predicted delivery can be later than the commitment deadline. A live ETA change does not change the order revision. You can keep the revision that you have when only the ETA changes.

Get notified about time changes

  • com.bahn.order.eta_changed.v1: An ETA appears or disappears, or changes by 15 minutes or more. Bahn also sends it when the ETA moves outside or back inside the agreed window. Without an agreed window, the delivery commitment deadline is the limit.
  • com.bahn.order.schedule.changed.v1: A planned pickup or delivery time, including pickup.estimated_day, changed.
Small ETA changes add up from the last ETA that Bahn sent. Read the order before you send a message to a customer or store a new ETA. Read Webhooks for the event contents. Read Live tracking for the vehicle position and the driver’s approach to pickup.