Booking Properties

Property

Creating a Property

Property Fields are as below: A property has a number of fields and informations, but the minimal required information for the creation of a Property are:

  • name
  • currencyCode
  • contactInfo
POST ${DOMAIN}/property
{
"name":"Vila 43",
"contactInfos":[{
"contactProfileType":"general"
}],
"currencyCode":"EUR"
}

Extensive Example

The aim of the operation is to generate the XML that will be exchange with the Booking Connectivity API. The example below has a more extensive example of a Property Creation

{
"code": 0,
"languageCode": "EN",
"name": "Vila 42",
"currencyCode": "EUR",
"facilityInfo": {
"guestRooms": [{
"amenities": [{
"roomAmenityCode": "AIR_CONDITIONING",
"quantity": 20
}]
}],
"restaurants": [{
"offerLunch": 1,
"cusineCodes": [
"American",
"British",
"Italian"
],
"operationSchedules": [{
"operationTimes": [{
"mon": "1",
"tue": "1",
"thur": "1",
"fri": "1",
"start": "16:00",
"end": "22:00"
},
{
"weds": "1",
"sun": "1",
"start": "14:00",
"end": "20:00"
}
]
}
],
"offerBrunch": 1,
"name": "Sofra",
"offerBreakfast": 1,
"tpa_extension": {
"dietaryOptions": [{
"id": 1,
"name": "halal"
},
{
"id": 2,
"name": "vegetarian"
}
]
},
"offerDinner": 1,
"features": [{
"descriptiveText": "buffet"
},
{
"descriptiveText": "a la carte"
},
{
"descriptiveText": "outdoor seating"
}
]
}],
"tpa_extensions": {
"dietaryOptions": [],
"standardPhrases": [],
"ambiances": [],
"routes": [],
"conditions": [],
"imageTags": []
}
},
"areaInfo": {
"tpa_extensions": {
"hotelierMessage": {
"language": "EN",
"text": "The only 3 start hotel in the city"
},
"dietaryOptions": [],
"standardPhrases": [],
"ambiances": [],
"routes": [],
"conditions": [],
"imageTags": []
},
"attractions": [{
"attractionCategoryCode": "MARKET",
"languageCode": "EN",
"name": "Morning market",
"distance": 2.2
},
{
"attractionCategoryCode": "RIVER",
"languageCode": "EN",
"name": "Syri i Kaltër",
"distance": 6.2
}
]
},
"contactInfos": [{
"addresses": [{
"postalCode": "1004",
"countryName": "Albania",
"addressLine": "Rr. Shemsi Haka",
"cityName": "Tirana",
"stateProv": "Tirana",
"hotelName": "Vila 42",
"stateCode": "AL"
}],
"phones": [{
"phoneNumber": "+491764343900"
},
{
"extension": "1",
"phoneNumber": "+35544522801"
}
],
"emails": [{
"email": "ylli@shamunaqe.com"
},
{
"email": "sam@parrot.com"
}
],
"contactProfileType": "general",
"names": [{
"jobTitle": "Reservations Manager",
"givenName": "Ylli",
"gender": "Male",
"surName": "Sarandas",
"language": "EN"
},
{
"jobTitle": "General Manager",
"givenName": "Yllka",
"gender": "Female",
"surName": "Ksamilase",
"language": "EN"
}
]
},
{
"emails": [{
"email": "support@realbookers.net"
}],
"contactProfileType": "reservations",
"names": [{
"jobTitle": "Reservations Manager",
"givenName": "Pionjer",
"gender": "Male",
"surName": "Vlora",
"language": "DE"
}]
}
],
"affiliationInfo": {
"awards": [{
"rating": 3,
"provider": "Ministria e Turizmit"
}]
}
}

Getting a Property

Assuming you have access to see a room, you can consult the values that the room has by going to:

GET ${DOMAIN}/property/$propertyId

TODO Get Rooms by Property

Get GuestRoomsByProperty

Guest Room

Creating a Guest Room

A property needs an inventory of rooms to sell to guests. This means room types have to be created. A room type contains details like a room's size, whether it's non-smoking, and which amenities it offers.

POST ${DOMAIN}/guestRoom
{
"target": "Test",
"hotelCode": "1",
"invStatusType": "Initial",
"property":1,
"occupancy": {
"maxOccupancy": "2"
},
"room": {
"nonsmoking": "1",
"roomType": "APARTMENT",
"sizeMeasurement": "100",
"sizeMeasurementUnit": "sqm"
},
"amenities": {
"amenity": [
{
"amenityCode": 2
},
{
"amenityCode": 15
},
{
"amenityCode": 20
},
{
"amenityCode": 33,
"configuration" : "STANDARD_ARRANGEMENT" ,
"value": "1"
}
]
},
"description": {
"text": "Double room",
"image": "https://bstatic.com/data/xphoto/max10000x10000/192/19248032.jpg",
"imageTagID": 13
}
}

Getting a Room

Assuming you have access to see a room, you can consult the values that the room has by going to:

GET ${DOMAIN}/guestRoom/$propertyId

Create Rates

The Endpoint to create a Hotel Rate is:

POST ${DOMAIN}/hotelProduct

Booking operates with the creation of Rates and Product. In order to map a rate to a Booking Product, the following request has to be send:

{
"primaryLangID": "en-US",
"target": "Test",
"property": 1,
"productNotifType": "New",
"roomTypes": [{
"roomTypeCode": "12345"
}],
"maxOccupancy": "3",
"ratesPlan": [{
"target": "Test",
"property": 1,
"hotelCode": "1",
"ratePlanNotifType": "New",
"name": "Standard Rate33",
"ratePlanCode": "1234"
}],
"mealPlan": [{
"code": 21,
"description": "Lunch",
"mapping": "B.com mealplan"
}],
"policyinfo": {
"checkInTime": "08:00",
"cancelPolicy": {
"cancelPenalty": [{
"policyCode": "12"
}]
},
"bookingRules": [{
"minAdvancedBookingOffset": "P1D"
}]
}
}

Availability

Endpoint

POST ${DOMAIN}/availability
{
"target": "Test",
"bookingLimit": "25",
"startDate": "2015-11-05",
"endDate": "2015-11-17",
"invTypeCode": "36745603",
"room": 7,
"ratePlanCode": "1278606",
"ratePlan": 1,
"minTime": "2",
"minMessageType": "SetMinLOS",
"maxTime": "5",
"maxMessageType": "SetMaxLOS",
"restriction":"Departure",
"restrictionStatus": "Open"
}

TODO Retrieving Availability

TODO (should be retrieved by passing requests of date range, and room)