1. Help Center
  2. Buying on TravelgateX
  3. Getting started with Hotel-X Buyers API

What is the id (optionRefId) of an option?

All about identifying options throughout TGX Booking Flow

The "id" of the option, also known as "optionRefId", is a unique identifier of an option. The id is used throughout the booking flow, so it is important not to modify it by any reason.

You should always set the "id" or "optionRefId" of the previous QueryRS in your next request, that is, the "id" from SearchRS in QuoteRQ, and the "optionRefId" from QuoteRS in BookRQ.

 

What is the lifetime of an OptionRefId?

The OptionRefId does not have any time limit usage restrictions on TGX side, those depend entirely on every Seller. For instance, restrictions between methods such as a max. of 5min between Search and Quote.

 

Can I use the same Search "id" from Search after receiving an error in Hotel-X QuoteRS?

In case of an error, we recommend you run a new SearchRQ and start the booking flow process again, so a new "id" is generated.

 

Can I use the OptionRefId to implement some logic in my API?

No, we don't recommend using the OptionRefId to implement any logic in your system since it is unique identifier of an option and differs among connections.

 

But what if I'm still using our Hotels Buyers Legacy API?

Easy! If you are still connected to our Legacy API you will receive a tag called Parameters in AvailabilityRS. This tag and its contents are crucial in order for the integration to work properly:

  • Just copy the parameters of the option selected from AvailabilityRS (the entire tag, just as it is returned) in the body of your ValuationRQ. Then, run that method.
  • If that Valuation has been successful, you will receive the same Parameters tag in ValuationRS, however, its content will be different this time. Just follow the same steps from Availability and paste the Parameters tag from your ValuationRS in the body of your ReservationRQ.