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?commitment_deadline_at: What is the latest committed delivery time?eta: When does Bahn expect to arrive?eta_updated_at: When did Bahn last update the ETA?actual_at: When did the stop complete?
agreed_window is null until Bahn agrees a window.
Pickup and delivery each have requested_windows, agreed_window, eta, eta_updated_at, and actual_at. Only pickup has available_from. 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 asEurope/Helsinki. - Send
start_atandend_atas 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.
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.
Show the current ETA
Readpickup.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:
- After the stop completes, show
actual_at. - When
etais present, show it as the current estimate. Showeta_updated_atnear it. - When
etaisnull, showagreed_window. - When there is no agreed window, show the requested windows.
eta is null when Bahn has no reliable estimate, or when the estimate is already in the past. Do not calculate an ETA from a map position, and do not show a window as an ETA.
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 of the order changed.