---
updatedAt: 2026-11-11T14:16:37.000Z
agentTools:
  projectIndex: https://docs.nuitee.com/llms.txt
---

# Step 3: Pre-booking a room

Using a room's `offerId` allows it to be pre-booked. The travel industry moves fast, so this step is about verifying all the details. Think of this as the final confirmation page before purchasing. The [PREBOOK](https://docs.liteapi.travel/reference/post_rates-prebook) endpoint takes the `offerId` and confirms its availability and price.

<Image align="center" className="border" border={true} src="https://files.readme.io/e492273-SCR-20240612-rmcq.png" />

Paste in the `offerId` so the API knows which rate(s) you are prebooking. The field for `usePaymentSdk` is to specify if you are going to use a payment SDK. If you want to learn more about the payment SDK check out the User Payment section of [Implementing a Payment Method](https://docs.liteapi.travel/v3.0.0/docs/implementing-payment). For now, it can be set to false.

Once both fields are set, press "Try It!" to fire off the API request.

If successful, you will get a 200 response verifying the room and rate are still available. The important piece of information we want here is the `prebookId`. The `prebookId` is tied to this specific booking, so copy the `prebookId` to use in the following booking step.

## When rates showed availability but prebook returns 2001

Rates search is a snapshot. Between search and prebook, the offer can sell out or the price can change so it can no longer be honored. In that case prebook returns **code `2001`** (“no availability found”), often as HTTP **400** or **409**.

What to do:

1. Show the guest that the selected rate is no longer available.
2. Run a **new rates search** and let them pick a fresh offer — do not retry the same `offerId`.
3. Prebook the new offer promptly.

Prebook can take up to about **2 minutes** end-to-end; code **`4016`** means the prebook timed out — increase timeout and retry, or search again. Details: [API errors for the hotel booking workflow](https://docs.liteapi.travel/reference/api-errors-for-hotel-booking-workflow) and [Hotel Integration Guide](https://docs.liteapi.travel/docs/hotel-integration-guide).