curl, jq, uuidgen, and a sandbox credential from Customer API in the Bahn portal.
The request omits ordered_for because the transport belongs to your company. In your own system, link the returned Bahn order ID to the record that initiated the transport.
1
Set your sandbox credentials
Set the client ID and client secret from the portal. Generate one run ID for this tutorial. Keep it when retrying a request. Start again with a new run ID when creating another test order.
2
Get an access token
Request a token and save it. The token is valid for 15 minutes.
3
Create an order
Create one transport between two dealerships. Set A successful response has the
available_from to a future time before you run the command.accepted status. Save the returned id for later requests.4
Read the current order
Read the order with its Bahn order ID.The response should contain your order ID, the
accepted status, and the current allowed_actions.5
Advance the test order
Confirm pickup readiness with the first sandbox scenario. This gives you a real state change to read and later test through webhooks.The response should show
pickup_readiness_confirmed and the confirmed readiness value.