Create an order
Book transport for a primary vehicle and an optional trade-in. Production orders start real transport work.
orders:write.
Read the workflow guide for setup, examples, and recovery behavior.
Authorizations
OAuth 2.0 client credentials.
Headers
A unique key for this logical write across the customer account. Reuse it only for retries of the same operation and request data.
8 - 255A caller-supplied request identifier for support.
1 - 255Body
Complete transport request that creates an order in the selected environment.
Pickup location and handover details. Send available_from, one or more requested_windows, or both.
Delivery location, handover details, and requested windows.
Exactly one item must have the primary role.
1 - 2 elementsOne vehicle in an order. Use primary for the transported vehicle and trade_in for the return vehicle.
- Primary vehicle
- Trade-in vehicle
Transport and inspection service for the order.
Optional. Send it only when an ordering-channel credential orders for another business. Omit it to order for your own account.
Your reference for matching the Bahn order to your system. It does not need to be unique.
1 - 255IDs returned by POST /v2/files. Use a customer_document file for a pickup release document.
Stable identifier for an uploaded or published order file.
^file_[a-z0-9-]+$Order-level note for Bahn. Use item.note for vehicle-specific instructions.
5000Response
Bahn created the order.
Current state of one transport order.
Stable Bahn order ID. Store it after order creation.
^ord_[a-z0-9]+$Business the order was placed for, or null when it belongs to your own account.
Reference supplied by your system, or null when none was supplied.
Current overall order state.
accepted, in_transit, delivered, cancelled Current seller readiness for pickup.
pending, preparing, confirmed Time when Bahn accepted the order.
Time when Bahn last updated the order.
Current pickup location, contact, requested timing, agreed timing, ETA, and actual time.
Current delivery location, contact, requested timing, agreed timing, ETA, and actual time.
Primary vehicle and optional trade-in vehicle, each with its own state and handover condition.
1 - 2 elementsTransport and inspection service selected for this order.
Price accepted when the order was created, or null when unavailable.
Order-level note supplied by the customer.
Actions currently available to this credential. Use this list to enable order controls.
Operation the current credential can perform on the current order state.
update, cancel, get_files, get_inspection_report, get_tracking An opaque order revision. Use this value in the If-Match header for an order change. A live ETA update does not change this value.
The driving distance in meters that the price calculation used. The field appears only in the creation response. Bahn does not store the value on the order.
x >= 0