Session lifecycle
A booking session is the state that links a search to the held booking it produces. Every booking-API call after the initial search references its session by sessionId. This page covers when a session is created, when it expires, and what it carries.
Origin
A new session is created on every successful POST /search/voyages or POST /search/packages. The response's sessionId is a UUID generated server-side. Sessions are not idempotent — repeating the same search creates a new session with a new sessionId.
Expiry
Each session has an idle expiry of 60 minutes. The timer resets to a fresh 60 minutes whenever the session is written to — the initial search (which creates it), POST .../create, the apply/remove calls on addons, excursions, or supplemental tours, listing available cabin numbers (it records them against the session), updating cabins, applying customer details, and the first call to each applicable addon, excursion or supplemental-tour list (the result is recorded against the session; later calls are served from it). The held-booking reads are the only GET endpoints that never reset the timer.
After expiry, every booking-API call against that sessionId returns:
404 Not Found
"Session expired or invalid."
There is no recovery path — start a new search to obtain a fresh sessionId.
Booking-type binding
Each session is bound to a single booking type at search time:
POST /search/voyagesproduces a voyage-only session. Only/bookings/create/voyage-only/...endpoints accept it.POST /search/packagesproduces a package session. Only/bookings/create/package/...endpoints accept it.
Calling a voyage-only endpoint with a package session — or vice versa — returns:
409 Conflict
"Booking session is not of type voyage-only." (or "...package.")
Held-booking state
A session can hold one booking at a time:
- Before create, the session is empty.
GET/POST/DELETEon any sub-resource endpoint — andPOST .../confirm— returns409 Conflictuntil a held booking exists. POST /bookings/create/...populates the session with a held booking. A second create on the same session returns409 Conflict.
Confirm
A successful confirm finalizes the held booking and ends the session. Any further call against the sessionId returns 404 Session expired or invalid.
If confirm fails, the session is left intact and a retry within the 60-minute window is supported. The held booking and any sub-resources remain in place.
Release
DELETE /bookings/create/voyage-only/{:sessionId} (or /package/{:sessionId}) ends the session without booking. If the session holds a booking, its cabins are released straight away and become available to other searches. A session from a search alone can be released too.
After a release, any further call against the sessionId returns 404 Session expired or invalid. If the release fails, the session is left intact and the release can be retried.