Create an order
Book transport for a primary vehicle and an optional trade-in. Production orders start real transport work.
orders:write. Send a new Idempotency-Key for each booking. After a timeout or a server error, retry with the same key and request data.
Supply pickup, delivery, one primary vehicle, and service_options. Start with the Minimal booking request example, then select the example that matches your order.
- Pickup needs
available_from,requested_windows, or both. - The primary vehicle needs a VIN or a registration number. A cross-border order needs the VIN.
- Send
height_mmandtireson the primary vehicle when you know them. They decide the van surcharge and the winter-tire terms; see Vehicle height and tires. - A private pickup or an
end_customerdelivery needs a contact name and phone number. Pickup must then start on the next calendar day or later in Helsinki. - A trade-in route must stay inside Finland and cannot start at a private pickup.
- Each
file_idsvalue must be a file that your account uploaded.
201 response contains the order with its id, revision, and allowed_actions. Bahn also sends com.bahn.order.created.v1.
Read Create and find orders for the rules and examples, Pickup and delivery times for the window rules, and Quickstart for a complete sandbox call.
Platform orders
An ordering channel can supplyordered_for to assign the order to another Bahn customer. Omit it for orders on your own account. See Platform ordering.
Invoice an end business (staff-enabled platforms)
Invoice an end business (staff-enabled platforms)
invoice_recipient for direct billing of the end business. Omit it for normal billing. The order remains on the platform account; do not combine it with ordered_for.Supply business_id, vat_id, name, contact_name, email, and address. The address requires street_address, city, postal_code, and country_code. Optional e_invoicing requires both its Finvoice address and operator code. Expand invoice_recipient under Body for the exact definitions.The recipient must be VAT-registered in the EU. Its VAT number and invoice address must identify the same country. Production checks registration through VIES. Finnish recipients use normal Finnish VAT (currently 25.5%); other EU recipients use zero VAT under reverse charge.Select Finnish end-customer invoice or End-customer invoice (EU reverse charge) for a complete request. The returned invoicing object contains the accepted recipient, vat_treatment, and billing progress. See End-customer invoicing for setup, status meanings, and recovery.Headers
Body
Complete transport request that creates an order in the selected environment.
Optional. Requires an ordering-channel credential for a platform account with end-customer invoicing enabled by Bahn staff. When supplied, Bahn invoices this business directly. When omitted, Bahn invoices the platform under its normal billing arrangement. The order stays on the platform account. Cannot be combined with ordered_for. Production verifies VAT registration through VIES.
Response
Bahn created the order.
Current state of one transport order.
Fields accepted by PATCH at this transport stage. Pickup and delivery entries use dotted paths. Contact entries permit partial name, phone, and email updates. Empty after primary delivery or cancellation. Other validation and credential scopes still apply.
customer_reference, customer_note, file_ids, items, service_options, pickup.address, pickup.type, pickup.available_from, pickup.requested_windows, delivery.address, delivery.type, delivery.requested_windows, pickup.release_code, pickup.contact, delivery.contact Actions that the current order state permits. The list does not check the scopes of your credential. Use this list to enable controls, and handle rejected writes because the order can change before the request completes.
Operation that the current order state permits. It does not check the scopes of your credential.
update, cancel, get_files, get_inspection_report, get_tracking Drivers with a booking on this order, one entry for each driver and vehicle. Drivers who finished their part stay in the list. A booking can cover only part of the route, and it does not start location tracking. Replace the displayed list each time you read the order.
Text that explains why you cannot cancel or change the order, or null when both actions are available. Show the text as written; its wording can change. An order that returns to accepted after a driver unbooks stays closed.