Skip to main content
Most booking sessions are abandoned before payment. Because the Booking Engine API funnel is stateful, you can capture where a guest left off and bring them back to it, instead of starting from scratch.

How it works

Recovery has three parts, all on your side, built on the session:
  • Capture: when the guest reaches the basket or quote, store their contact details and the search context (dates, guests, hotel) along with their chosen room and extras.
  • Detect: if the guest does not accept the quote within your window, send a reminder (email or SMS) with a deep link back to the funnel.
  • Recover: on return, resume the session if it is still alive, or rebuild it from the captured context if it has expired.

Resume or rebuild the session

A session has a limited lifetime, set with X-AVP-SessionDuration at creation. On return, read the stored session to see whether it is still valid.
The examples reuse the OAuth 1.0 signing from the Quick start. Replace {sessionId} with the stored session.
  • Session still alive: the basket comes back as the guest left it. Re-quote, then send them to the quote step.
  • Session expired: the call returns 400 with Code: InvalidSessionId. Open a fresh session from the captured context, add the saved room and extras back to the basket, then quote.

Tips

  • Set the session duration deliberately. Use X-AVP-SessionDuration to balance how long a basket is held against releasing stale inventory. The session is short-lived, so do not count on it to span a long recovery window.
  • Always re-quote on return. Prices and availability move while the guest is away, so confirm the current price before payment. See Re-quote right before confirmation.
  • Design for rebuild, not resume alone. Do not assume the original session survives: store enough context to recreate it.
  • Store only what you need. A recovery flow holds guest contact details: handle and retain them in line with your privacy obligations.

Create a session

Open a new session from the captured context.

Retrieve the basket

Read the basket the guest left behind.