Skip to main content
DELETE
Cancel an order

Authorizations

Authorization
string
header
required

OAuth 2.0 client credentials.

Headers

Idempotency-Key
string
required

A unique key for this logical write.

Required string length: 8 - 255
If-Match
string
required

The current order revision inside double quotation marks.

X-Request-Id
string

A caller-supplied request identifier for support.

Required string length: 1 - 255

Path Parameters

order_id
string
required

The order identifier. Stable Bahn order identifier used in every order resource path.

Pattern: ^ord_[a-z0-9]+$

Response

The cancelled 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

Represented business for a platform order, or null for a direct customer order.

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.