HTS APIs
Every endpoint, schema and error code, rendered from the published OpenAPI files, in the order you integrate them.
/api/lodging/v1/notifications/eventsEventsRetrieve a list of notification events.
Retrieves a filtered and paginated list of notification events related to bookings.
Events capture state changes in reservations and bookings. Each event has both an event_timestamp (when it occurred) and a write_timestamp (when it was stored).
Events are returned in chronological order (oldest first) by write_timestamp.
Consumption Guarantees
Events are ordered and paginated by storage write time in chronological order (oldest first), which provides a critical guarantee: once you retrieve events for a time period, that period is immutable. New events will never be inserted into already-retrieved time ranges.
This means:
- After fetching events from a specific
write_timestamp, any future events will have write timestamps at or after the last event you retrieved - You never need to re-fetch the same time period to check for late-arriving events
- Polling strategies can safely track the last seen
write_timestampand only request newer events
Why Storage Write Time Matters
Using storage write time for ordering guarantees that time periods are immutable once retrieved. After you fetch events for a given time range, you can be certain no new events will appear in that range on future requests. This eliminates the need to re-poll historical periods and prevents missed events in polling-based integrations.
Typical Polling Pattern
- Initial fetch: Make a request with desired filters and
page_size(or specify anaftertimestamp for a starting point) - Paginate through results: If
next_cursoris present in the response, use it in the next request to fetch the next page - Continue until complete: Repeat step 2 until
next_cursoris absent (all events retrieved up to that point) - Track latest timestamp: For ongoing polling, track the latest
write_timestampfrom the last response - Poll for new events: Use the tracked timestamp in the
afterfield to fetch only new events
This pattern ensures you never miss events and never fetch duplicates.
Request body application/json · required
Event type filters, pagination (after timestamp or cursor), and page size.
event_typesList of event types to include in results. When empty, all event types are returned. Multiple types are combined with OR logic (returns events matching ANY of the specified types).
paginationPagination mode (mutually exclusive options)
Show fields
Pagination mode (mutually exclusive options)
event_pagination_after event_pagination_after
afterISO 8601 timestamp; return events written after this time (chronological order)
event_pagination_cursor event_pagination_cursor
cursorOpaque pagination token from the previous response's next_cursor
page_sizeNumber of events per page
Responses
200List of notification events for the requested criteria. The `events` array may be empty if no events match the criteria or if all events have been retrieved.
eventsList of notification events. May be empty if no events match the criteria or if all events have been retrieved.
Show fields
type:reservation_cancelled (reservation_cancelled_event) reservation_cancelled_event
typeType of the event.
reservation_cancelledreservation_transaction_appended (reservation_transaction_appended_event) reservation_transaction_appended_event
typeType of the event.
reservation_transaction_appendedtransaction_idTransaction identifier for the newly appended transaction.
next_cursorOpaque cursor for fetching the next page of events.
When present, more events are available - use this value in the next request's pagination.cursor field.
When absent, no more events are available.
Do not attempt to parse or modify this value.
400Invalid request parameters: - `page_size` out of range (must be 1-100) - Malformed `cursor` value - Invalid `event_types` values
error_codeError codes for the events operation. This is a non-exhaustive list of enum values, which will be extended in the future.
invalid_inputunauthorizeddescriptionA human-readable description of the error.
Example
{
"error_code": "invalid_input",
"description": "string"
}500Internal server error
error_codeError returned when an internal server error occurs.
internal_server_errordescriptionA human-readable description of the error.
response_idUnique identifier of the specific response. Use this identifier when you need to refer to a specific response, when requiring technical support.
123e4567-e89b-12d3-a456-426614174000Example
{
"error_code": "internal_server_error",
"description": "string",
"response_id": "123e4567-e89b-12d3-a456-426614174000"
}curl -X PUT "https://travel-distribution.staging.htsapis.com/api/lodging/v1/notifications/events" \
-H "HTS-API-KEY: $HTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"event_types": [],
"pagination": {
"after": "2025-01-01T00:00:00Z"
},
"page_size": 2
}'{
"events": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"event_timestamp": "2025-10-08T14:30:00Z",
"write_timestamp": "2025-10-08T14:30:05Z",
"order_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"type": "reservation_cancelled"
},
{
"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"event_timestamp": "2025-10-08T15:45:00Z",
"write_timestamp": "2025-10-08T15:45:02Z",
"order_id": "3f5e7c3a-9b2c-4d1e-8f4a-5b6c7d8e9f0a",
"type": "reservation_transaction_appended",
"transaction_id": "9f8e7d6c-5b4a-3c2d-1e0f-1a2b3c4d5e6f"
}
],
"next_cursor": "eyJsYXN0X3RpbWVzdGFtcCI6IjIwMjUtMTAtMDhUMTU6NDU6MDIuMDAwWiJ9"
}Examples come from the spec.
