Mandatory vs Optional Attributes

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.

AttributeDatatypeMandatoryDescription
htIdentifierStringYesThis 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.
netPriceBigDecimalYesThis is the room price excluding taxes. This amount plus the tax attribute amount equals the grossPrice which is payable to Hotel Trader.
taxBigDecimalYesTotal taxes for the room. The amount of taxes & fees payable at the time of booking.
grossPriceBigDecimalYesTotal amount payable to Hotel Trader for the room. This is the sum of netPrice and tax.
payAtPropertyBigDecimalYesThe total amount for the room that the guest should pay at the property after check-in.
dailyPriceBigDecimalYesAn array of daily net prices for all stay dates. This information is helpful as cancellation penalties are associated with daily prices.
dailyTaxBigDecimalYesAn 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 NameDescription
mealplanOptionsAll 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.
refundableDetermines 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.
cancellationPoliciesProvides 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.
aggregateTaxInfoThis 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.