Create your first order
Get a sandbox token, book one transport, and read the result.
Connect your system
Link a Bahn order to your own record and keep it current.
Start with one working order
The Quickstart takes you through these steps:- Get an OAuth access token with your sandbox credential.
- Create an order with the pickup, delivery, vehicle, and service choices.
- Save the returned Bahn order ID and read the order back.
customer_reference to include your own reference. Read Integration lifecycle for storage, updates, and recovery.
The order contains its accepted price, current status, vehicles, timing, and available actions. Use webhooks to refresh your records when relevant changes occur.
Add what your workflow needs
The API Reference contains complete field definitions, named request examples, and interactive requests. Use the guides to understand a workflow and the reference to check its exact fields.
Order for businesses on a platform
If your product offers Bahn transport to other businesses, follow Platform ordering. An ordering-channel credential can create orders for represented businesses throughordered_for. Bahn support configures this account capability.
Test before going live
Each environment has separate credentials and data. Keep credentials on your server.
Use a new idempotency key for each logical write that requires it. Retain the key and request data for retries. Updates and cancellation also need the current order revision in
If-Match. Read Errors and retries and Go live before production use.
Building with a coding agent? Give it Build with an agent and the integration skill.
For credentials or integration support, contact support@bahnexpress.com.