Skip to main content
Use Customer API V2 to order your company’s vehicle transports from your own system. Orders belong to your Bahn account by default, so omit ordered_for. The API centres on the order. Create an order to arrange vehicle transport, then read it to follow status, timing, price, and available actions. Related resources provide live tracking, files, inspections, and report rows. Start with the Quickstart for a complete sandbox request. Read Integration lifecycle to connect orders, webhooks, and resource reads.

Environments and authentication

Request a token at /oauth2/token on the same host. Use HTTP Basic with your client ID and secret for the token request. Send the resulting Bearer token for V2 resource requests. Credentials, tokens, and data belong to one environment. Tokens expire after 15 minutes. Cache them and request a replacement before expiry. Each operation page states its required scope. Read Authentication for credential setup and scope selection.

Choose an operation

Price checks and CMR recipient choices are optional. A standard booking uses your account’s document defaults. For orders on behalf of other businesses, use Platform ordering and Check a represented business. Your account must be configured as an ordering channel.

Request and response conventions

V2 resource bodies use JSON, except order updates, which use application/merge-patch+json. Token requests use application/x-www-form-urlencoded. Field names use snake_case. Timestamps use RFC 3339 with an offset. Requested windows also need an IANA time zone. Money uses integer cents in EUR. Field descriptions explain what null means for each resource. Order lists and reports return data, has_more, and next_cursor. Keep your filters unchanged between pages and send the returned cursor without modification. The default page size is 50, and the allowed range is 1 to 100. Read Order exports for a pagination loop.

Write safely

Order creation, updates, cancellation, file-upload creation, and sandbox advancement require an Idempotency-Key. Use a new key for each logical write. Retries retain the key and the request data. Updates and cancellation also require the current order revision inside double quotation marks:
Check allowed_actions before offering an action. The server checks it again when the request arrives. Read Errors, retries, and conflicts for recovery decisions.

Contract and support

Download the OpenAPI document for complete operation and field definitions. The guide examples explain how to use that contract in your system. Contact Bahn support for account setup or integration questions. Include the environment and request ID when reporting a failed request. Never include a client secret or access token.