Skip to main content
POST
Required scope: orders:write. Read the workflow guide for setup, examples, and recovery behavior.

Authorizations

Authorization
string
header
required

OAuth 2.0 client credentials.

Headers

Idempotency-Key
string
required

A unique key for this logical write across the customer account. Reuse it only for retries of the same operation and request data.

Required string length: 8 - 255
X-Request-Id
string

A caller-supplied request identifier for support.

Required string length: 1 - 255

Body

application/json

Complete transport request that creates an order in the selected environment.

pickup
object
required

Pickup location and handover details. Send available_from, one or more requested_windows, or both.

delivery
object
required

Delivery location, handover details, and requested windows.

items
(Primary vehicle · object | Trade-in vehicle · object)[]
required

Exactly one item must have the primary role.

Required array length: 1 - 2 elements

One vehicle in an order. Use primary for the transported vehicle and trade_in for the return vehicle.

service_options
object
required

Transport and inspection service for the order.

ordered_for
object

Optional. Send it only when an ordering-channel credential orders for another business. Omit it to order for your own account.

customer_reference
string | null

Your reference for matching the Bahn order to your system. It does not need to be unique.

Required string length: 1 - 255
file_ids
string[]

IDs returned by POST /v2/files. Use a customer_document file for a pickup release document.

Stable identifier for an uploaded or published order file.

Pattern: ^file_[a-z0-9-]+$
customer_note
string | null

Order-level note for Bahn. Use item.note for vehicle-specific instructions.

Maximum string length: 5000

Response

Bahn created the order.

Current state of one transport order.

id
string
required

Stable Bahn order ID. Store it after order creation.

Pattern: ^ord_[a-z0-9]+$
ordered_for
object | null
required

Business the order was placed for, or null when it belongs to your own account.

customer_reference
string | null
required

Reference supplied by your system, or null when none was supplied.

status
enum<string>
required

Current overall order state.

Available options:
accepted,
in_transit,
delivered,
cancelled
pickup_readiness
enum<string>
required

Current seller readiness for pickup.

Available options:
pending,
preparing,
confirmed
created_at
string<date-time>
required

Time when Bahn accepted the order.

updated_at
string<date-time>
required

Time when Bahn last updated the order.

pickup
object
required

Current pickup location, contact, requested timing, agreed timing, ETA, and actual time.

delivery
object
required

Current delivery location, contact, requested timing, agreed timing, ETA, and actual time.

items
object[]
required

Primary vehicle and optional trade-in vehicle, each with its own state and handover condition.

Required array length: 1 - 2 elements
service_options
object
required

Transport and inspection service selected for this order.

price
object | null
required

Price accepted when the order was created, or null when unavailable.

customer_note
string | null
required

Order-level note supplied by the customer.

allowed_actions
enum<string>[]
required

Actions currently available to this credential. Use this list to enable order controls.

Operation the current credential can perform on the current order state.

Available options:
update,
cancel,
get_files,
get_inspection_report,
get_tracking
revision
string
required

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.

distance_meters
integer | null

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.

Required range: x >= 0