Although GraphQL was implemented so that clients can query only the data they need, we require clients to retrieve some attributes as part of every Search request. Should the search convert into a booking, these attributes are required to be sent by the clients in the Book request.
Mandatory Attributes for all Search Queries
The following attributes MUST be included in every Search query. These are necessary as they will need to be passed along with other data when you send in a Book request.
Attribute | Datatype | Mandatory | Description |
---|---|---|---|
htIdentifier | String | Yes | This is a unique identifier generated for every price when a search is performed. This ID is valid only for 30 minutes. When you book the room, you need to send a valid htIdentifier in the Book request. |
netPrice | BigDecimal | Yes | This is the room price excluding taxes. This amount plus the tax attribute amount equals the grossPrice which is payable to Hotel Trader. |
tax | BigDecimal | Yes | Total taxes for the room. The amount of taxes & fees payable at the time of booking. |
grossPrice | BigDecimal | Yes | Total amount payable to Hotel Trader for the room. This is the sum of netPrice and tax. |
payAtProperty | BigDecimal | Yes | The total amount for the room that the guest should pay at the property after check-in. |
dailyPrice | BigDecimal | Yes | An array of daily net prices for all stay dates. This information is helpful as cancellation penalties are associated with daily prices. |
dailyTax | BigDecimal | Yes | An array of daily tax prices for all stay dates. This information is helpful as cancellation penalties are associated with daily prices. |
Optional Attributes
Apart from the attributes mentioned in the table above, all other attributes are optional in the Search query. Although they are not required for further completing the booking or confirming a reservation, we recommend that you include these attributes in your searches for additional information as applicable to your usage pattern.
Attribute Name | Description |
---|---|
mealplanOptions | All available mealplan options for rates are returned in the search response. Refer to the Mealplans page to better understand how we send this information. Note: If available, then the mealPlandescription node will specify how many adults are included in the mealplan. |
refundable | Determines if the room returned is refundable or not. If refundable is true cancellationPolicies will return an array of cancel policies. If refundable is false cancellationPolicies will be null. |
cancellationPolicies | Provides the cancellation policies that are associated with the rates returned in the search response. Refer to the article on Cancellation Policies to better understand how we send this information. |
aggregateTaxInfo | This attribute contains a breakdown of the tax amount only at the aggregate level for the entire stay. This does not include a per-tax or per-night break-up. We recommend that you request this attribute only if you are displaying the tax break for each tax item in the Search, Quote, or Book step. Refer to the article on Aggregate Tax to better understand how we send this information and how to decode it. |