Booking History
Booking history provides a detailed log of all changes and events related to a booking, including confirmations, modifications, and cancellations. This is useful for tracking the lifecycle of a booking and understanding any updates made by users or the system.
Get Booking History
Retrieve the complete history of changes and events for a booking.
Endpoint: GET /api/v1/bookings/{bookingId}/histories
Response:
json
[
{
"id": "hist-123",
"bookingId": "booking-123",
"userId": "user-123",
"firstName": "Alice",
"lastName": "Johnson",
"label": "Booking confirmed",
"createdAt": "2024-05-01T10:00:00Z"
},
{
"id": "hist-124",
"bookingId": "booking-123",
"userId": "user-456",
"firstName": "Hotel",
"lastName": "Manager",
"label": "Room upgraded to suite",
"createdAt": "2024-06-14T16:00:00Z"
}
]Reading the history
- Each entry is one audit event; entries are timestamped with
createdAt. labeldescribes the event. Recorded event kinds: created, confirmed, cancelled, refused, replaced, updated, proposed, discounted, marked up, sent to partners.userId/firstName/lastNameidentify who triggered the event; they arenullfor system-generated events (for example an automatic confirmation).
Use the history to answer "who confirmed / cancelled / changed this booking, and when" — it is the authoritative timeline behind the booking's current state. For tracking an on-request booking, watching the history and polling GET /api/v1/bookings/{bookingId} are equivalent; the history additionally tells you the actor.