The Hotel Metadata API transfers essential property information including property names, addresses, amenities, taxes, images, and other metadata.
Initiator - Hotel Trader initiates this API, allowing client systems to process and store hotel information.
Endpoints
New hotel
Adds the hotel metadata to the client platform for the first time.
[POST] https://<client-base-url>/hotel
Update existing hotel
Modifies the details of a hotel already present on the client’s platform.
[PUT] https://<client-base-url>/hotel/<code>
Request
HTTP Headers
All the HTTP headers are mandatory. These headers are applicable and remain the same for both end-points of the Hotel 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 hotel update.
Possible values: NEW, UPDATE, DISABLE, and ENABLE. More information about this field can be found here. |
hotel | Object | Yes | This object contains the property metadata. |
Hotel
Field | Datatype | Required | Description |
---|---|---|---|
code | String | Yes | A unique hotel code is provided by Hotel Trader that identifies this hotel. It's used in all the requests that Hotel Trader sends out to the client. |
mappingProviders | Array | No | Third Party Mapping Provider for Hotel Codes. This is client specific.
Ex: GIATA, VERVOTECH, etc. |
name | String | Yes | The name of the hotel. |
starRating | Float
|
Yes | The star rating of the hotel. Decimal values like 3.5 or 4.5 are also possible. |
defaultCurrencyCode | String | Yes | The default currency code of the hotel. |
maxRoomsBookable | Integer | No | The maximum number of rooms that can be booked for this hotel, in one reservation request made by the client to Hotel Trader. |
numberOfRooms | Integer | No | The total number of rooms in the hotel. |
numberOfFloors | Integer | No | The number of floors in the hotel. |
addressLine1 | String | Yes | The first line of the hotel’s address |
addressLine2 | String | Yes | The second line of the hotel’s address |
city | String | Yes | The city where the hotel is located |
state | String | Yes | The state where the hotel is located |
stateCode | String | Yes | The code of the state where the hotel is located |
country | String | Yes | The country where the hotel is located |
countryCode | String | Yes | The code of the country where the hotel is located |
zip | String | Yes | The postal code of the hotel’s address |
phone1 | String | Yes | The phone number of the hotel. |
phone2 | String | No | The alternate phone number of the hotel. |
fax1 | String | No | The fax number of the hotel. |
fax2 | String | No | The alternate fax number of the hotel. |
websiteUrl | String | No | The URL of the hotel’s website. |
longitude | String | Yes | The longitude of the hotel’s location. |
latitude | String | Yes | The latitude of the hotel’s location. |
longDescription | String | No | A long description of the hotel. This field is sent to the client on an as-approved basis. |
shortDescription | String | Yes | A short description of the hotel. |
checkInTime | String | Yes | The hotel’s check-in time in HH:MM 24 hour format |
checkOutTime | String | Yes | The hotel’s check-out time in HH:MM 24 hour format |
timeZone | String | Yes | The timezone of the area in which the hotel is located. |
adultAge | Integer | Yes | Any guest staying at the hotel whose age is equal or greater than this number is considered an adult. This is the minimum age required for check-in. |
defaultLanguage | String | No | The default language used by the hotel staff. |
adultOnly | Boolean | No | If true, the hotel allows only adults as guests. |
currencies | Array | Yes | An array of currency objects. The accepted currencies for the hotel. |
languages | Array | No | An array of language objects. |
creditCardTypes | Array | No | An array of creditCardType objects. |
bedtypes | Array | No | An array of the standard bedtype objects. |
amenities | Array | No | An array of the standard amenity objects. |
ageCategories | Array | Yes | An array of ageCategory objects |
checkInPolicy | String | Yes | Check-in policy description of the hotel |
images | Array | No | An array of the standard image objects. This field is sent to the client on an as-approved basis. |
Currency
Field | Datatype | Required | Description |
---|---|---|---|
code | String | Yes | The currency code. |
name | String | Yes | The full name of the currency. |
Credit Card Type
Field | Datatype | Required | Description |
---|---|---|---|
code | String | Yes | The credit card code. |
name | String | Yes | The full name of the credit card. |
Language
Field | Datatype | Required | Description |
---|---|---|---|
code | String | Yes | The language code. |
name | String | Yes | The language name. |
Mapping Provider
Field | Datatype | Required | Description |
---|---|---|---|
mappingProvider | String | Yes | Third Party Mapping Provider for Hotel Codes. This is client specific.
Ex: GIATA, VERVOTECH, etc. |
mappingCode | String | Yes | Code from the mapping provider or else the client's internal master code if no mapping provider is used.
|
AgeCategory
Field | Datatype | Required | Description |
---|---|---|---|
name | String | Yes | The name of the age category.
Possible values - INFANT, CHILD, ADULT, and SENIOR. The current version of the API only supports CHILD and ADULT. |
minAge | Integer | Yes | Minimum age for this age category. Value is inclusive. |
maxAge | Integer | Yes | Maximum age for this age category. Value is inclusive. |
Example
{ "messageId": "4ssafea795-7ae1-45c3-8d31-07788ebd2484", "updateType": "NEW", "hotel": { "code": "NYCMIL", "name": "Row NYC",
"starRating": 4, "defaultCurrencyCode": "USD", "maxRoomsBookable": 9, "numberOfRooms": 130, "numberOfFloors": 8, "addressLine1": "701 9th Avenue", "addressLine2": null, "city": "New York", "state": "New York", "stateCode": "NY", "country": "United States of America", "countryCode": "US", "zip": 55555, "phone1": "15521869-3600", "phone2": "11221121", "fax1": "11244-0644", "fax2": "22342-1123", "websiteUrl": "www.rownyc.com", "longitude": "-73.98857859999998", "latitude": "40.7588237", "longDescription": "Dummy long description", "shortDescription": "Dummy short description", "checkInPolicy": "check-in policy text", "checkInTime": "12:30", "checkOutTime": "11:00", "adultAge": 14, "timeZone": "America/New_York", "defaultLanguage": "en", "adultOnly": false, "currencies": [ { "code": "USD", "name": "United States Dollar" } ], "languages": [ { "code": "EN", "name": "English" } ],
"
mappingProviders":[
{
"mappingProvider": "GIATA", "mappingCode": "GIATACODE"
}
],
"creditCardTypes": [ { "code": "VS", "name": "Visa" }, { "code": "MC", "name": "MasterCard" }, { "code": "AX", "name": "American Express" } ], "bedtypes": [ { "code": "TDBL", "name": "Two Double Beds" }, { "code": "1FB", "name": "One Full Bed" }, { "code": "TWB", "name": "Two Twin Beds" } ], "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.