The GetHotelData query is the primary hotel content retrieval service within the Merchandising API.
It allows travel buyers to retrieve hotel-level merchandising and descriptive content. The GetHotelData query returns hotel-level content only. Room-level content must be retrieved separately using the GetPropertyRoomData query.
curl --location 'https://sandbox-api-mtd.hoteltrader.com/distribution/graphql' \--header 'Authorization: Basic <BASE64_CREDENTIALS>' \--header 'Content-Type: application/json' \--data '{"query":"query GetHotelData($since: DateTime, $limit: Int, $resumeKey: String, $updateTypes: [String]) {GetHotelData(since: $since,limit: $limit,resumeKey: $resumeKey,updateTypes: $updateTypes) {meta {dataLoadTypetimestamptotalCountnewCountupdateCountdeleteCountenableCountdisableCountunchangedCountpageNumberpageSizeresumeKey}hotels {propertyIdnamestarRatingdefaultCurrencyCodemaxRoomsBookablenumberOfRoomsnumberOfFloorsaddress {line1line2citystatestateCodepostalCodecountrycountryCode}contact {phonefaxwebsite}location {latitudelongitude}currencies {codename}languages {codename}mappingProviders {mappingProvidermappingCode}checkInPolicycheckInTimecheckOutTimetimeZonedescriptionshortDescriptionadultAgedefaultLanguageadultOnly}}}","variables":{"since":"2026-01-01T00:00:00Z","limit":10,"resumeKey":null,"updateTypes":null}}'
Query Parameters
GetHotelData Variables
| Variable
|
Type | Required | Description |
|---|---|---|---|
| since | DateTime | No | Returns hotels updated after the specified UTC timestamp.
|
|
propertyIds
|
Long | No | Returns specific hotel(s).
|
|
countryCode
|
String | No | Returns hotels based in requested countries. Note: Please talk to your TAM representative at Hotel Trader to enable this. To get list of city, stateCode and countryCode please check respective endpoints.
|
|
countryCode +
stateCode
|
String, String
|
No | Returns hotels based in requested state + country. Cannot be used with state alone. Note: Please talk to your TAM representative at Hotel Trader to enable this. To get list of city, stateCode and countryCode please check respective endpoints.
|
|
cityId
|
Int | No | Returns hotels based in requested city. To get list of city, stateCode and countryCode please check respective endpoints.
|
|
limit
|
Int | Yes | Maximum number of hotels returned in a single response page.
|
|
resumeKey
|
String
|
No | Pagination token returned from the previous response.
|
|
updateTypes
|
[String] | No | Filters results by update type.
|
Update Types
| Value | Description |
|---|---|
|
NEW
|
Newly created hotel records
|
|
UPDATED
|
Existing hotels with updated content
|
|
DELETED
|
Hotels removed from inventory
|
|
ENABLED
|
Hotels re-enabled for distribution
|
|
DISABLED
|
Hotels disabled from distribution
|
Pagination
The API uses cursor-based pagination via resumeKey.
First Request
For the initial request:
"resumeKey":null
Next Page Request
Use the resumeKey returned in the previous response:
"resumeKey":"Mjk1OjI="
If no resumeKey is returned, there are no more pages available.
Response Structure
{
"data": {
"GetHotelData": {
"meta": { },
"hotels": [ ]
}
}
}
Response Metadata (meta)
| Field | Type | Description |
|---|---|---|
| dataLoadType | String | Type of load returned (FULL or INCREMENTAL). |
| timestamp | DateTime | UTC timestamp when the response was generated. |
| totalCount | Int | Total number of hotel records in the response. |
| newCount | Int | Number of newly added hotels. |
| updateCount | Int | Number of updated hotels. |
| deleteCount | Int | Number of deleted hotels. |
| enableCount | Int | Number of enabled hotels. |
| disableCount | Int | Number of disabled hotels. |
| unchangedCount | Int | Number of unchanged hotels. |
| pageNumber | Int | Current response page number. |
| pageSize | Int | Maximum records per page. |
| resumeKey | String | Pagination token for retrieving the next page. |
Hotel Object
Basic Information
| Field | Type | Description |
|---|---|---|
| propertyId | Long | Unique Hotel Trader property identifier. |
| name | String | Hotel name. |
| starRating | Float | Hotel star rating. |
| defaultCurrencyCode | String | Default currency used by the property. |
| maxRoomsBookable | Int | Maximum rooms allowed per booking. |
| numberOfRooms | Int | Total number of rooms in the hotel. |
| numberOfFloors | Int | Total number of floors in the hotel. |
Address Object
| Field | Type | Description |
|---|---|---|
| line1 | String | Primary street address. |
| line2 | String | Secondary address line. |
| cityId | Int | cityId from geoData. |
| city | String | City name. |
| state | String | State or province name. |
| stateCode | String | State or province code. |
| postalCode | String | ZIP or postal code. |
| country | String | Country code or country name. |
| countryCode | String | ISO country code. |
Contact Object
| Field | Type | Description |
|---|---|---|
| phone | String | Hotel contact phone number. |
| fax | String | Hotel fax number. |
| String | Hotel contact email address. | |
| website | String | Hotel website URL. |
Location Object
| Field | Type | Description |
|---|---|---|
| latitude | Decimal | Hotel latitude coordinate. |
| longitude | Decimal | Hotel longitude coordinate. |
Currency Object
| Field | Type | Description |
|---|---|---|
| code | String | ISO currency code. |
| name | String | Currency display name. |
Language Object
| Field | Type | Description |
|---|---|---|
| code | String | ISO language code. |
| name | String | Language display name. |
Mapping Providers[]
| Field | Type | Description |
|---|---|---|
| mappingProvider | String | Mapping provider name (e.g. GIATA, Vervotech, TravelBuyer). Contact your TAM representative at Hotel Trader to inform them which ID you would like to receive. In case you would like to receive your own IDs you will have to provide us your entire portfolio along with its metadata in a specific CSV file format. |
| mappingCode | String | Provider-specific hotel mapping identifier. |
Policy & Timing Fields
| Field | Type | Description |
|---|---|---|
| checkInPolicy | String | Check-in rules or deposit requirements. |
| checkInTime | String | Hotel check-in time. |
| checkOutTime | String | Hotel check-out time. |
| timeZone | String | Hotel local timezone. |
Description Fields
| Field | Type | Description |
|---|---|---|
| description | String | Full hotel description. |
| shortDescription | String | Shortened hotel description. |
Guest Policy Fields
| Field | Type | Description |
|---|---|---|
| adultAge | Int | Minimum age considered an adult by the property. |
| defaultLanguage | String | Default hotel content language. |
| adultOnly | Boolean | Indicates whether the property is adults-only. |