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 endpoint takes the offerId
and confirms its availability and price.
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. 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.
Updated 6 months ago