Last updated

Step 10 - Create facilities

Use the Facilities API to add property-level and unit-level facilities. This step contains two sub-tasks, adding:

Prerequisites

You must have completed the following steps:

  • Step 2 and have the property ID
  • Step 3 and have the Unit ID

Adding property facility

PUT
https://supply-xml.booking.com/facilities-api/properties/{propertyID}}

Path parameters

The following table describes the elements you must specify in the path:

ElementDescriptionTypeRequired/
Optional
Notes
propertyIDSpecifies the unique ID of the property.integerrequired

Request body parameters

The following table describes the elements you can add in the request body:

All parameters are optional unless otherwise noted.

ElementDescription
> facility_id[Required] Specifies the facility identifier.
> instancesContains instances of the facility.
>> restaurant_detailsContains details about the restaurant.
>>> name[Required] Name of the restaurant.
>>> guests_onlyBoolean indicating if the restaurant is only for guests.
>>> accept_reservationsBoolean indicating if the restaurant accepts reservations.
>>> outdoor_seatingBoolean indicating if outdoor seating is available.
>>> meal_types_listArray of meal types offered (HALAL, KOSHER, VEGETARIAN, etc.)
>>> ambiances_listArray of ambiance types (FAMILY_KIDS_FRIENDLY, ROMANTIC, etc.)
>>> open_for_meals_listArray indicating which meals are served (BREAKFAST, DINNER, etc.)
>>> cuisines_listArray of cuisine types offered (AMERICAN, DUTCH, etc.)
>>> is_buffetBoolean indicating if buffet service is available.
>>> is_alacarteBoolean indicating if a la carte service is available.
> state[Required] Current state of the facility (PRESENT).

Request body example

The following is a request body example:

[
    {
     "facility_id": 3,
     "instances": [
         {
                 "restaurant_details": {
                 "name":"ABC restaurant",
                 "guests_only": false,
                 "accept_reservations": false,
                 "outdoor_seating": true,
                 "meal_types_list": [
                     "HALAL",
                     "KOSHER",
                     "VEGETARIAN",
                     "VEGAN",
                     "GLUTEN_FREE",
                     "DAIRY_FREE"
                 ],
                 "ambiances_list": [
                     "FAMILY_KIDS_FRIENDLY",
                     "ROMANTIC"
                 ],
                 "open_for_meals_list": [
                     "BREAKFAST",
                     "DINNER"
                 ],
                 "cuisines_list": [
                     "AMERICAN",
                     "DUTCH",
                     "BRITISH",
                     "FRENCH"
                 ],
                 "is_buffet": false,
                 "is_alacarte": true
             }
         }
     ],
     "state": "PRESENT"
 }
]  

Response body example

The following is a successful response body example:

{
    "data": {
        "success": true
    },
    "warnings": [],
    "errors": [],
    "meta": {
        "ruid": "XXXXX-XXXXX-XXXXXXXXXXXX-XXXXXX"
    }
}

Adding room facilities

PUT
https://supply-xml.booking.com/facilities-api/properties/{propertyID}/rooms/{roomsID}

Path parameters

The following table describes the elements you must specify in the path:

ElementDescriptionTypeRequired/
Optional
Notes
propertyIDSpecifies the unique ID of the property.integerrequired
roomsIDSpecifies the unique ID of the unit/room.integerrequired

Request body parameters

The following table describes the elements you can add in the request body:

ElementDescription
room_facility_idSpecifies the unique ID of the room facility. For a complete list of available facility IDs, see the Facilities Meta endpoint.
stateSpecifies the state of the facility. Possible values are:
- PRESENT - The facility is present in the room.
- MISSING - The facility is missing in the room.

Request body example

The following is a request body example:

[
    {
      "room_facility_id": 8,
      "state": "PRESENT"
    },
    {
      "room_facility_id": 14,
      "state": "PRESENT"
    },
    {
      "room_facility_id": 17,
      "state": "PRESENT"
    },
    {
       "room_facility_id": 45,
        "state": "PRESENT"
      }
]

Response body example

The following is a successful response body example:

{
    "data": {
        "success": true
    },
    "warnings": [],
    "errors": [],
    "meta": {
        "ruid": "XXXXXXXXXXXXXXXXXXXXXXXXX"
    }
}