Table of contents
Synchronization
For carriers or distributors to inform retailers about changes in a trip or a booking, we have added an API that a carrier or distributor system can inform a retailer about that fact, that a trip or a booking has changed. The retailer can then itself inform a passenger or the purchaser e.g. a travel agency about changes to the trip, the booking or the complaint.

The API informs authorized listener of the fact that changes have occurred using Webhook.
Event Types and Their Semantics
Booking
-
BOOKING_TRIP_CONFIRMEDA trip related to the booking which was uncertain has been confirmed. For large groups it is possible to book before the train is actually available.
The recommended action is to reload the related booking and to bubble the event up. If final partner, inform the client. You may want to re-confirm the client is traveling and if relevant trigger confirmation the payment process.
-
BOOKING_TRIP_CHANGEDA trip which was booked (but has not departed yet) has had its schedule updated. Thus, it does not cover real-time updates. The trip on the level of that provider is still feasible.
The recommended action is to reload the booking from this provider. If part of a multi-provider trip, check the total trip is still feasible and bubble the event up. If final partner, inform the client.
-
BOOKING_REAL_TIME_EVENT_OCCURREDA train involved in a trip of the linked booking is experiencing some unexpected change in the actual schedule.
The recommended action is to notify the client if it is subscribed to some kind of real time update. If relevant, start some contingency flow.
-
FULFILLMENT_AVAILABLEA new fulfillment has been created in the booking. Note that the creation of a fulfillment can be an asynchronous process.
The recommended action is to retrieve the booking and update the local representation.
-
FULFILLMENT_REFUNDEDA fulfillment has been refunded. In case of deferred refund, it would be at the end of the « waiting period ». In case of seat release, it will take place at the moment of the actual refund.
The recommended action is to retrieve the booking and update the local representation. If relevant trigger matching payment transactions.
-
FULFILLMENT_EXCHANGEDA fulfillment has been exchanged. In case of deferred refund, it would be at the end of the « waiting period ». In case of seat release, it will take place at the moment of the actual refund.
The recommended action is to retrieve the booking and update the local representation. If relevant trigger matching payment transactions (only in case of price decrease).
-
FULFILLMENT_CONTROLLEDA fulfillment in the booking has been checked in.
The recommended action is to retrieve the booking and update the local representation.
-
ACCOMMODATION_RELEASEDAn accommodation in the booking has been released, meaning it is made available again in the inventory.
The recommended action is to retrieve the booking and inform the customer.
-
REFUND_INITIATEDA refund process has been initiated for one or several fulfillments in the booking using
PATCH /bookings/{id}/refunds.The recommended action is to retrieve the booking and update the local representation.
-
EXCHANGE_INITIATEDAn exchange process has been initiated for one or several fulfillments in the booking using
PATCH /bookings/{id}/exchangeOperations.The recommended action is to retrieve the booking and update the local representation.
-
PURCHASER_CHANGEDA purchaser has been updated by
PATCH /bookings/{id}/purchaser.The recommended action is to retrieve the booking and update the local representation.
-
PASSENGER_CHANGEDA passenger has been updated by
PATCH /bookings/{id}/passenger.The recommended action is to retrieve the booking and update the local representation.
Complaints
-
INITIATEDA complaint has been submitted using
POST /complaints.The recommended action is to retrieve the complaint and inform the customer.
-
DECIDEDA decision has been taken on the complaint (CONFIRMED or REJECTED) using
PATCH /complaints/{complaintId}. -
SETTLEDA previously CONFIRMED complaint has been settled using
PATCH /complaints/{complaintId}.The recommended action is to retrieve the complaint and inform the customer.
-
INFORMATION_MISSINGThe complaint has been examined and some information is missing
PATCH /complaints/{complaintId}.The recommended action is to retrieve the complaint and inform the customer.
Subscribing to Events
A receiver has to provide the following information:
- The events it is interested in. E.g.
BOOKINGorCOMPLAINT - The end point the events need to be sent to. E.g.
https://trainline.com/api/webhooks/db - Sign message to guarantee that the sender is in fact who it claims to be. E.g.
HMAC - IP whitelist