RezLive

Sessions, Timeouts & Retries

The operational details that determine whether your integration is robust under real-world conditions — slow networks, supplier outages, and request retries. Skipping this page is the most common cause of duplicate bookings.

Session expiry

Two values issued during Search must be used within their lifetime:

TokenIssued byUsed inLifetimeOn expiry
SearchSessionIdfindhotel / findhotelbyidPre-Book, Booking30 minRe-run Search
BookingKeyfindhotel / findhotelbyidCancel Policy, Pre-Book, Booking30 minRe-run Search

Once a Booking call succeeds, the SearchSessionId and BookingKey have served their purpose and can be discarded. From that point onward, the BookingId and BookingCode are the references.

⚠

Do not cache SearchSessionId or BookingKey across user sessions. They are short-lived and tied to a specific search. Caching them produces stale-token errors and confuses your users.

Recommended HTTP client timeouts

Use these as starting values; tune based on observed P95 latency in your environment.

EndpointRecommended timeoutNotes
findhotel / findhotelbyid30 secondsSearch aggregates multiple suppliers
prebook30 secondsRe-validates with the actual supplier
bookhotel60 secondsBooking is the most variable. See retry guidance below.
cancelhotel30 secondsAcknowledges immediately; cancellation processed asynchronously
getbookingdetails / getConfirmationDetails20 secondsReads from RezLive cache; usually fast

The booking-retry trap

This is the single most important operational rule in the API.

Partner system RezLive API 1. POST /bookhotel — partner sends booking request 2. Network timeout — no response received (Booking may or may not exist on RezLive side) ⛔ STOP. Do NOT retry POST /bookhotel. If the first call did succeed, retrying creates a DUPLICATE BOOKING. 3. Correct: POST /getbookingdetails with your AgentRefNo 4. Response tells you whether booking exists → exists: store BookingCode and continue. → not found: now safe to retry. Always set AgentRefNo before booking — it is the only way to deduplicate after a timeout.

What to do when a Booking call times out

  1. Do NOT retry POST /bookhotel.
  2. Call POST /getbookingdetails using the AgentRefNo you sent on the original Booking request.
  3. Inspect the response: if a booking exists with that AgentRefNo, the original call succeeded — store the BookingCode and proceed.
  4. If no booking is found, only then is it safe to retry POST /bookhotel.
⛔
Always set a unique AgentRefNo

It is the only way to deduplicate a booking after a network failure. Without a unique AgentRefNo, you cannot tell whether a timed-out booking succeeded or failed. The result is either a missed booking or a duplicate booking, both visible to the guest.

Retry guidance — other endpoints

EndpointSafe to retry?Strategy
findhotel / findhotelbyidYes — idempotentExponential backoff: 1s, 2s, 4s. Stop at 3 retries.
getcancellationpolicyYes — idempotentSame as Search.
prebookYes — idempotentA small price drift between calls is normal; surface to user only if it exceeds your tolerance.
bookhotelNo — verify firstSee the booking-retry trap above. Always /getbookingdetails first.
cancelhotelYes — idempotentIf the original cancel succeeded, retry returns "already cancelled."
getbookingdetailsYes — read-only—
getConfirmationDetailsYes — read-onlyMay return Pending until hotel confirms.