Skip to main content
WEBHOOK
Bahn sends this request to your configured HTTPS endpoint. Your receiver must do these steps:
  1. Verify the signature against the raw request body with the endpoint signing secret. Reject a timestamp outside the allowed tolerance.
  2. Store the event durably, then return a 2xx response.
  3. Deduplicate by the event id. Bahn sends one first attempt and up to eight retries.
  4. Read the resource in data.resource_url for the current state.
The body shape depends on the event type. Select the matching tab under Body:
  • Order resource changed: com.bahn.order.updated.v1, com.bahn.order.pickup_readiness.changed.v1, com.bahn.order.schedule.changed.v1, com.bahn.order.files.updated.v1, and com.bahn.order.inspection_report.available.v1
  • Order created: com.bahn.order.created.v1
  • Order status changed: com.bahn.order.status.changed.v1
  • Vehicle status changed: com.bahn.order.item.status.changed.v1
  • Order cancelled: com.bahn.order.cancelled.v1
  • ETA changed: com.bahn.order.eta_changed.v1
  • Tracking state changed: com.bahn.order.tracking.state_changed.v1
  • Pickup progress changed: com.bahn.order.pickup_progress.changed.v1
Read Webhooks for the verifier code, event ordering, and the meaning of each event.

Headers

webhook-id
string
required

Event identifier included in the signature input. It remains the same across retries.

webhook-timestamp
string
required

Unix timestamp in seconds included in the signature input.

webhook-signature
string
required

One or more Standard Webhooks v1 signatures for the raw request body.

Body

application/cloudevents+json

Any signed Bahn order webhook event.

specversion
enum<string>
required

CloudEvents specification version.

Available options:
1.0
id
string
required

Stable event ID. Use it to deduplicate retries and replays.

source
string<uri>
required

Bahn API origin for the event environment. Resolve resource paths against this origin.

subject
string
required

Order subject in the form orders/{order_id}.

time
string<date-time>
required

Time when the event occurred.

datacontenttype
enum<string>
required

Media type of the event data.

Available options:
application/json
type
enum<string>
required

Stable event type that identifies the changed resource or order area.

Available options:
com.bahn.order.updated.v1,
com.bahn.order.pickup_readiness.changed.v1,
com.bahn.order.schedule.changed.v1,
com.bahn.order.files.updated.v1,
com.bahn.order.inspection_report.available.v1
data
object
required

Order identity and URLs for reading current state.

Response

204

The receiver stored the event.