GetPropertyRoomData

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 properties
  • roomIds — 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 byroomIds 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 IDs

Example Request

Query Variables


{
  "roomIds": [451123],
  "propertyIds": null,
  "limit": 20,
  "resumeKey": null
}

Request

query GetPropertyRoomData($roomIds: [Long], $propertyIds: [Long], $limit: Int, $resumeKey: String) {
    GetPropertyRoomData(
        roomIds: $roomIds,
        propertyIds: $propertyIds,
        limit: $limit,
        resumeKey: $resumeKey
    ) {
        dataLoadType
        timestamp
        resumeKey
        properties {
        propertyId
        propertyName
        latitude
        longitude
        rooms {
            roomId
            displayName
            roomCode
            shortDesc
            noOfRoomsInRoomtype
            maxOccupancyForDefaultPrice
            maxAdultOccupancy
            minAdultOccupancy
            maxChildOccupancy
            minChildOccupancy
            totalMaxOccupancy
            extraAdultAmount
            extraChildAmount
        }
        }
    }
    }

Example Response

{
    "data": {
        "GetPropertyRoomData": {
            "dataLoadType": "FULL",
            "timestamp": 1787145516248,
            "resumeKey": null,
            "properties": [
                {
                    "propertyId": 126913,
                    "propertyName": "THE NEW YORKER HOTEL BY LOTTE HOTELS",
                    "latitude": "40.75219",
                    "longitude": "-73.99346400000002",
                    "rooms": [
                        {
                            "roomId": 451123,
                            "displayName": "Metro Room Queen",
                            "roomCode": "0PN",
                            "shortDesc": "Located on the 19th floor and above, these rooms feature stylish Art Deco design with one queen bed.",
                            "noOfRoomsInRoomtype": 1,
                            "maxOccupancyForDefaultPrice": 2,
                            "maxAdultOccupancy": 2,
                            "minAdultOccupancy": 1,
                            "maxChildOccupancy": 1,
                            "minChildOccupancy": 0,
                            "totalMaxOccupancy": 2,
                            "extraAdultAmount": 25.0,
                            "extraChildAmount": 0.0
                        }
                    ]
                }
            ]
        }
    }
}

Request Variables

Variable Type Required Description
roomIds [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 roomIds are optional individually At least one of them must be provided.
Both parameters should not be used together Use either propertyIds or roomIds.
resumeKey should be reused for pagination Continue requests until resumeKey is null.

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