The GetPropertyRoomData query is the room-level content retrieval service within the Merchandising API.
It allows travel buyers to retrieve detailed room content and occupancy information for hotels available through the Merchandising API ecosystem.
The API supports retrieving room data using either:
propertyIds— returns all room types for the specified propertiesroomTypeIds— returns specific requested room types
Room Details Retrieval Methods
The GetPropertyRoomData query supports two request types.
| Method | Description |
|---|---|
Search by propertyIds |
Returns all room types for the specified properties. |
Search by roomTypeIds |
Returns only the specified room types. |
Method 1 – Search by Property IDs
Example Request
curl --location 'https://sandbox-api-mtd.hoteltrader.com/distribution/graphql' \
--header 'Authorization: Basic <BASE64_CREDENTIALS>' \
--header 'Content-Type: application/json' \
--data '{
"query":"query GetPropertyRoomData($propertyIds: [Long], $limit: Int, $resumeKey: String) {
GetPropertyRoomData(
propertyIds: $propertyIds,
limit: $limit,
resumeKey: $resumeKey
) {
dataLoadType
timestamp
resumeKey
properties {
propertyId
propertyName
latitude
longitude
rooms {
roomId
displayName
roomCode
}
}
}
}",
"variables":{
"propertyIds":[424023],
"limit":100,
"resumeKey":null
}
}'
Request Variables
| Variable | Type | Required | Description |
|---|---|---|---|
| propertyIds | [Long] | Yes* | List of property IDs for which all room types should be returned. |
| limit | Int | No | Maximum number of properties returned. |
| resumeKey | String | No | Pagination token. |
Method 2 – Search by Room Type IDs
Example Request
curl --location 'https://sandbox-api-mtd.hoteltrader.com/distribution/graphql' \
--header 'Authorization: Basic <BASE64_CREDENTIALS>' \
--header 'Content-Type: application/json' \
--data '{
"query":"query GetPropertyRoomData($roomTypeIds: [Long], $limit: Int, $resumeKey: String) {
GetPropertyRoomData(
roomTypeIds: $roomTypeIds,
limit: $limit,
resumeKey: $resumeKey
) {
dataLoadType
timestamp
resumeKey
properties {
propertyId
propertyName
latitude
longitude
rooms {
roomId
displayName
roomCode
}
}
}
}",
"variables":{
"roomTypeIds":[5777],
"limit":100,
"resumeKey":null
}
}'
Request Variables
| Variable | Type | Required | Description |
|---|---|---|---|
| roomTypeIds | [Long] | Yes* | List of room type IDs to retrieve. |
| limit | Int | No | Maximum number of properties returned. |
| resumeKey | String | No | Pagination token. |
Important Request Rules
| Rule | Description |
|---|---|
propertyIds and roomTypeIds are optional individually |
At least one of them must be provided. |
| Both parameters should not be used together | Use either propertyIds or roomTypeIds. |
resumeKey should be reused for pagination |
Continue requests until resumeKey is null. |
Response Structure
The response structure is identical for both request methods.
{
"data": {
"GetPropertyRoomData": {
"dataLoadType":"FULL",
"timestamp":1778486946881,
"resumeKey":null,
"properties": []
}
}
}
Property Object
| Field | Type | Description |
|---|---|---|
| propertyId | Long | Unique property identifier. |
| propertyName | String | Property name. |
| latitude | Decimal | Property latitude. |
| longitude | Decimal | Property longitude. |
| rooms | Array | List of room objects. |
Room Object
| Field | Type | Description |
|---|---|---|
| roomId | Long | Unique room identifier. |
| displayName | String | Room display name. |
| roomCode | String | Standardized room code. |
| shortDesc | String | HTML formatted room description. |
| noOfRoomsInRoomtype | Int | Number of rooms available for the room type. |
| maxOccupancyForDefaultPrice | Int | Maximum occupancy included in default pricing. |
| maxAdultOccupancy | Int | Maximum adult occupancy. |
| minAdultOccupancy | Int | Minimum adult occupancy. |
| maxChildOccupancy | Int | Maximum child occupancy. |
| minChildOccupancy | Int | Minimum child occupancy. |
| totalMaxOccupancy | Int | Maximum total occupancy. |
| extraAdultAmount | Decimal | Additional charge for extra adults. |
| extraChildAmount | Decimal | Additional charge for extra children. |
| distributionHotelId | Long | Distribution property identifier. |
Pagination
The API uses cursor-based pagination via resumeKey.
If additional records exist:
"resumeKey":"Mjk1OjI="
If no more records are available:
"resumeKey":null