Roomtype API

The Roomtype Metadata requests, initiated by Hotel Trader, provide comprehensive information about room types. This includes the room's name, description, occupancy range, bed type, and amenities.

Initiator - Hotel Trader

Endpoint

New roomtypes

Add a single roomtype or multiple roomtypes in batch mode. This function creates room types for the initial setup in the system.

[POST] https://<client-base-url>/roomtypes

Update roomtypes

Updates for roomtypes are sent individually, with one request per roomtype.

[POST] https://<client-base-url>/roomtype/code

Request

HTTP Headers

All the HTTP Headers are mandatory. These headers are applicable and remain the same for both end-points of the Roomtype API.


Header Name Type
Content-Type application/json
Accept-Encoding gzip
Authorization Basic <token>

Request Description

All the fields in the request are described below.


Field/Object Datatype Required Description
messageId String Yes A string that uniquely identifies this particular message. This should be returned in the response.
updateType String Yes The type of roomtype update. Allowed values: NEW/UPDATE/DISABLE/ENABLE.
Find additional details about this topic in our article UpdateTypes.
propertyCode String Yes A unique hotel code provided by Hotel Trader identifies the hotel for which roomtype metadata is sent in this request.
rooms Array Yes An array of roomtype objects, which contain the roomtype metadata.

Roomtype

Field Datatype Required Description
name String Yes The name of the roomtype.
code String Yes A code provided by Hotel Trader identifies this roomtype. This code is unique for each roomtype for a property. This code is used while sending availability and rate information to the client.
shortDescription String Yes A short description of this roomtype.
longDescription String No A long description of this roomtype. This field is sent to the client on an as-approved basis.
maxAdultOccupancy Integer Yes The maximum number of adults allowed in one room of this roomtype.
minAdultOccupancy Integer Yes The minimum number of adults allowed in the room.
maxChildOccupancy Integer Yes The maximum number of children allowed in the room.
minChildOccupancy Integer Yes The minimum number of children allowed in the room.
totalMaxOccupancy Integer Yes The total number of occupants allowed in the room.
maxOccupancyForDefaultPrice Integer Yes The minimum number of adults in the room, above which, additional pricing kicks in.
bedtypes Array No An array of bedtype objects.
amenities Array No An array of amenity objects.
images Array No An array of image objects.

Example

Request for adding a new roomtype

{
  "messageId": "ad4195de-7341-4912-9c69-879d9ab6a0f4",
  "updateType": "NEW",
  "propertyCode": "NYCMIL",
  "rooms": [
    {
      "name": "Standard King",
      "code": "R1FN",
      "longDescription": "The RowNYCs guest room and corridor design was led by world renowned architectural and interior design firm, Gensler.  New York City’s subway system inspired our vibrant room colors and fun graphic sayings on the walls embrace our perfect Times Square location.  All Row NYC guest rooms feature clean, elegant case goods and unexpected details throughout. Witty touches abound, such as the Good Night message visible only when the blackout shades are pulled down. A focal point of our guest rooms is a series of bold custom graphic wall coverings that reference the bright lights and signage of Broadway, and are tempered by a generous use of crisp white and neutrals.",
      "shortDescription": "The Standard rooms have an undeniably urban state-of-mind. With the streets beckoning, they are just the right balance of cosmopolitan chill and get-up-and-go.",
      "maxAdultOccupancy": 2,
      "minAdultOccupancy": 1,
      "maxChildOccupancy": 1,
      "minChildOccupancy": 0,
      "totalMaxOccupancy": 2,
      "maxOccupancyForDefaultPrice": 2,
      "bedtypes": [
        {
          "code": "1KB",
          "name": "One King Bed"
        }
      ],
      "amenities": [
        {
          "code": "TV",
          "name": "Flat-panel TV"
        },
        {
          "code": "AC",
          "name": "Air Conditioning"
        }
      ]
    },
    {
      "name": "Standard Queen",
      "code": "Q1",
      "longDescription": "The Queen rooms have an undeniably urban state-of-mind. With the streets beckoning, they are just the right balance of cosmopolitan chill and get-up-and-go. The RowNYCs guest room and corridor design was led by world renowned architectural and interior design firm, Gensler.  New York City’s subway system inspired our vibrant room colors and fun graphic sayings on the walls embrace our perfect Times Square location.  All Row NYC guest rooms feature clean, elegant case goods and unexpected details throughout. Witty touches abound, such as the Good Night message visible only when the blackout shades are pulled down. A focal point of our guest rooms is a series of bold custom graphic wall coverings that reference the bright lights and signage of Broadway, and are tempered by a generous use of crisp white and neutrals.",
      "shortDescription": "The Queen rooms have an undeniably urban state-of-mind. With the streets beckoning, they are just the right balance of cosmopolitan chill and get-up-and-go.",
      "maxAdultOccupancy": 2,
      "minAdultOccupancy": 1,
      "maxChildOccupancy": 1,
      "minChildOccupancy": 0,
      "totalMaxOccupancy": 2,
      "maxOccupancyForDefaultPrice": 2,
      "bedtypes": [
        {
          "code": "1QB",
          "name": "One Queen Bed"
        }
      ],
      "amenities": [
        {
          "code": "TV",
          "name": "Flat-panel TV"
        },
        {
          "code": "AC",
          "name": "Air Conditioning"
        }
      ]
    }
  ]
}

Request for updating a roomtype

{
  "messageId": "ad4195de-7341-4912-9c69-879d9ab6a0f4",
  "updateType": "UPDATE",
  "propertyCode": "NYCMIL",
  "room": {
      "name": "Standard King",
      "code": "R1FN",
      "longDescription": "The RowNYCs guest room and corridor design was led by world renowned architectural and interior design firm, Gensler.  New York City’s subway system inspired our vibrant room colors and fun graphic sayings on the walls embrace our perfect Times Square location.  All Row NYC guest rooms feature clean, elegant case goods and unexpected details throughout. Witty touches abound, such as the Good Night message visible only when the blackout shades are pulled down. A focal point of our guest rooms is a series of bold custom graphic wall coverings that reference the bright lights and signage of Broadway, and are tempered by a generous use of crisp white and neutrals.",
      "shortDescription": "The Standard rooms have an undeniably urban state-of-mind. With the streets beckoning, they are just the right balance of cosmopolitan chill and get-up-and-go.",
      "maxAdultOccupancy": 2,
      "minAdultOccupancy": 1,
      "maxChildOccupancy": 1,
      "minChildOccupancy": 0,
      "totalMaxOccupancy": 2,
      "maxOccupancyForDefaultPrice": 2,
      "bedtypes": [
        {
          "code": "1KB",
          "name": "One King Bed"
        }
      ],
      "amenities": [
        {
          "code": "TV",
          "name": "Flat-panel TV"
        },
        {
          "code": "AC",
          "name": "Air Conditioning"
        }
      ]
  }
}

Response

This API follows the Standard Response model of the Metadata Push API.