Skip to content

Managing property facilities

Use this endpoint to add, update or delete property-level facility details.

You can:

For multi-instance facilities, supports updating specific facility instances

To update specific facility instances of a multi-instance facility, make sure to specify the instance identifiers (instance_id) for the facilities. The API updates only those specific facility instances.

Adding single-instance facilities

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

Apart from swimming pool, restaurant, and parking facilities which are multi-instance facilities, you can add all other facilities by just specifying whether they are available at the property. Depending on whether you want to add or remove a facility, you can either set the facility state to PRESENT or MISSING. While adding property facilities, you can specify one or multiple facilities in the same request.

Note that setting the state to MISSING is equivalent to deleting the facility from the property.

Request body example

Make sure to send an array in the request body even when adding or updating one facility. The following request body example adds facility ID 418 and removes facility ID 419.

[
  {
    "facility_id": 418,
    "state": "PRESENT"
  },
  {
    "facility_id": 419,
    "state": "MISSING"
  }
]

Adding single-instance facility with additional details

Let's use the hiking facility as an example. You can add this facility by specifying the state = PRESENT or MISSING. However, you can also specify additional details for this facility, namely:

  • OnsiteDetails.
  • SurchargeDetails.
Use the meta endpoint response

Use the response from the meta endpoint to understand all the supported facility details.

Sample meta response showing hiking facility:

 {
    "facility_id": 70,
    "booking_extended_legacy_code": 5020,
    "facility_name": "HIKING",
    "allowed_details_list": [
        "ONSITE_DETAILS",
        "SURCHARGE_DETAILS"
    ]
}

Request body example

The following request body adds the facility ID 70 and specifies more details.

[
    {
        "facility_id": 70,
        "instances": [
            {
                "on_site_details": {
                    "onsite_type": "OFFSITE"
                },
                "surcharge_details": {
                    "surcharge_type": "FREE"
                }
            }
        ],
        "state": "PRESENT"
    },
    ...
]

Response body example

The following is a response snippet for the hiking facility using the meta endpoint:

...
{
  "facility_id": 70,
  "booking_extended_legacy_code": 5020,
  "facility_name": "HIKING",
  "allowed_details_list": [
    "SurchargeDetails",
    "OnsiteDetails"
  ]
}
...	

Adding multi-instance facilities

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

Multi-instance facilities allow you to add multiple instances of a facility. For example, multiple restaurants or parking lots on the property. All multi-instance facilities require you to provide certain mandatory parameters depending on the facility.

When you successfully create a multi-instance facility for a property, the endpoint creates an instance ID (instanceId) for each instance of the facility. Use the instance ID to further manage the specific instances of the facility at the property.

You can add multiple instances in a single request or add additional instances later.

We currently support three multi-instance facilities:

  • Parking (facility_id: 2). Diamond Parking and Q-Park are instances of parking facilities.

  • Restaurant (facility_id: 3)

  • Swimming pool (facility_id: 433).

Before adding a multi-instance facility

Use the meta endpoint response, and look for the required_details_list property under a specific facility to identify the list of required parameters that you must provide. The required details differ based on the facility to add. To understand the data model of the required details, see the Schema section in the Open API specification.

For example, to add a Restaurant facility, you must provide restaurant details as a JSON body. You can look for the Restaurant_Details in the schema section to understand how to build your request body.

Overlays facility instances for multi-instance facilities

Before adding a multi-instance facility, make sure that the facility is already not added to the property. When updating an existing facility, make sure to specify all existing instances of the facility. Otherwise, the endpoint deletes the omitted facility instances. To avoid overlay, include instance IDs of all the facility instances.

Request body example

Let's consider adding parking as a multi-instance facility. To add a facility with two parking instances, you can provide instance IDs of both Diamond Parking and Q-Park. If instanceId is null, 0 or missing, the endpoint adds a new facility instance.

The following request body example adds two parking instances.

[
  {
    "facility_id": 2,
    "instances": [
      {
        "parking_details": {
          "name": "Diamond Parking",
          "parking_location": "NEARBY",
          "parking_access": "ONLY_GUESTS",
          "parking_reservation": "NEEDED"
        },
        "payment_details": {
          "charge_mode": "FREE"
        }
      },
      {
        "parking_details": {
          "name": "Q-Park",
          "parking_location": "ON_SITE",
          "parking_access": "GENERAL_PUBLIC",
          "parking_reservation": "NOT_NEEDED"
        },
        "payment_details": {
          "charge_mode": "FREE"
        }
      }
    ],
    "state": "PRESENT"
  }
]

Updating an existing facility instances

Use the PUT method to update a facility instance. To update a multi-instance facility, make sure to provide the facility instance ID (instanceId).

You can get the instance ID details using the GET request.

Overlays instances of existing multi-instance facilities

To update a multi-instance facility, you must provide instance IDs of all instances of that facility. Otherwise, the endpoint deletes the omitted instances. To avoid overlay, include the instance IDs of all the facility instances.

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

Request body example

Let's consider that a property has both Diamond parking and Q-park facility instances added. The following request updates the Diamond parking location to ON_SITE and removes the Q-Park parking instance_id: 62497396.

[
  {
    "facility_id": 2,
    "instances": [
      {
        "instance_id": 62497395,
        "parking_details": {
          "name": "Diamond Parking",
          "parking_location": "ON_SITE",
          "parking_access": "ONLY_GUESTS",
          "parking_reservation": "NEEDED"
        },
        "payment_details": {
          "charge_mode": "FREE"
        }
      }
    ],
    "state": "PRESENT"
  }
]

Deleting an existing property facility

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

To delete the facility or all instances of a multi-instance facility (for example: all parking facility), you can change the facility state to missing:

Request body example

The following request body removes the facility ID:2 from the property.

[
  {
    "facility_id": 2,
    "state": "MISSING"
  }
]

Retrieving facilities details added to a property

Use the GET method to retrieve instance IDs (instanceIds) along with the facility details for all the facility instances added to the property.

GET
https://supply-xml.booking.com/facilities-api/properties/{propertyId}

Response body example

The following is a response body example:

{
  "facility_id": 2,
  "instances": [
    {
      "instance_id": 62497395,
      "parking_details": {
        "name": "Diamond Parking",
        "parking_type": "UNKNOWN_PARKING_TYPE",
        "parking_location": "NEARBY",
        "parking_access": "ONLY_GUESTS",
        "parking_reservation": "NEEDED",
        "max_height_m": 0.0,
        "has_valet_service": "NOT_SPECIFIED",
        "has_onsite_staff": "NOT_SPECIFIED",
        "has_gated_parking": "NOT_SPECIFIED",
        "has_security_cameras": "NOT_SPECIFIED",
        "has_ev_charging_station": "NOT_SPECIFIED",
        "has_accessible_parking_spots": "NOT_SPECIFIED"
      },
      "payment_details": {
        "charge_mode": "FREE"
      }
    },
    {
      "instance_id": 62497396,
      "parking_details": {
        "name": "Q-Park",
        "parking_type": "UNKNOWN_PARKING_TYPE",
        "parking_location": "ON_SITE",
        "parking_access": "GENERAL_PUBLIC",
        "parking_reservation": "NOT_NEEDED",
        "max_height_m": 0.0,
        "has_valet_service": "NOT_SPECIFIED",
        "has_onsite_staff": "NOT_SPECIFIED",
        "has_gated_parking": "NOT_SPECIFIED",
        "has_security_cameras": "NOT_SPECIFIED",
        "has_ev_charging_station": "NOT_SPECIFIED",
        "has_accessible_parking_spots": "NOT_SPECIFIED"
      },
      "payment_details": {
        "charge_mode": "FREE"
      }
    }
  ],
  "state": "PRESENT"
}

Activating verbose response

To add more verbosity to the API responses and see additional information, use the debugInfo parameter . The endpoint then returns information from the meta endpoint in the GET response.

Large payload

Adding this parameter increases the response payload size and is only intended for debugging purposes. Avoid using this flag in your production environment, unless you are debugging.

Use the debugInfo=true query parameter to attach facility metadata objects to each facility instance.

GET
https://supply-xml.booking.com/facilities-api/properties/{propertyId}?debugInfo=true

Response example

The following is a response example:

{
  "facility_id": 7,
  "state": "PRESENT",
  "property_facility_meta": {
    "facility_id": 7,
    "ota_hotel_amenity_type": 165,
    "facility_type": "BAR",
    "details_list": [
      "TEMPORARY_CLOSED_DETAILS"
    ]
  }
}

To get the facility_type parameter to understand what facilityId:2 means and to get the corresponding OTA_code for the facility (if its exist), you would need to add the debugInfo=true to the GET endpoint.

Response example

Expand this section to view the full response of the GET method with `debugInfo=true`
{
  "data": [
    {
      "facility_id": 2,
      "instances": [
        {
          "instance_id": 158203640,
          "parking_details": {
            "name": "Basement Parking",
            "parking_type": "PARKING_LOT",
            "parking_location": "NEARBY",
            "parking_access": "ONLY_GUESTS",
            "parking_reservation": "NEEDED",
            "max_height_m": 0.0,
            "has_valet_service": "PRESENT",
            "has_onsite_staff": "PRESENT",
            "has_gated_parking": "NOT_SPECIFIED",
            "has_security_cameras": "PRESENT",
            "has_ev_charging_station": "PRESENT",
            "has_accessible_parking_spots": "PRESENT"
          },
          "payment_details": {
            "charge_mode": "PAID",
            "charge_details": {
              "price": 10.0,
              "frequency": "PER_STAY"
            }
          }
        },
        {
          "instance_id": 158203641,
          "parking_details": {
            "name": "Q-Park",
            "parking_type": "UNKNOWN_PARKING_TYPE",
            "parking_location": "ON_SITE",
            "parking_access": "GENERAL_PUBLIC",
            "parking_reservation": "NOT_NEEDED",
            "max_height_m": 0.0,
            "has_valet_service": "NOT_SPECIFIED",
            "has_onsite_staff": "NOT_SPECIFIED",
            "has_gated_parking": "NOT_SPECIFIED",
            "has_security_cameras": "NOT_SPECIFIED",
            "has_ev_charging_station": "NOT_SPECIFIED",
            "has_accessible_parking_spots": "NOT_SPECIFIED"
          },
          "payment_details": {
            "charge_mode": "FREE"
          }
        }
      ],
      "state": "PRESENT",
      "property_facility_meta": {
        "facility_id": 2,
        "facility_name": "PARKING",
        "allowed_details_list": [
          "PaymentDetails",
          "ParkingDetails"
        ],
        "required_details_list": [
          "ParkingDetails",
          "PaymentDetails"
        ]
      }
    },
    {
      "facility_id": 3,
      "instances": [
        {
          "instance_id": 4139235,
          "restaurant_details": {
            "name": "Tastymenu",
            "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",
      "property_facility_meta": {
        "facility_id": 3,
        "ota_hotel_amenity_type": 76,
        "facility_name": "RESTAURANT",
        "allowed_details_list": [
          "TemporarilyClosedDetails",
          "RestaurantDetails",
          "ScheduleDetails"
        ],
        "required_details_list": [
          "RestaurantDetails"
        ]
      }
    },
    {
      "facility_id": 8,
      "state": "PRESENT",
      "property_facility_meta": {
        "facility_id": 8,
        "ota_hotel_amenity_type": 1,
        "facility_name": "TWENTY_FOUR_HOUR_FRONT_DESK"
      }
    },
    {
      "facility_id": 47,
      "instances": [
        {
          "payment_details": {
            "charge_mode": "FREE"
          },
          "internet_details": {
            "area": "PUBLIC_AREAS",
            "type": "WIFI",
            "wifi_info": {
              "network_name": "",
              "speed_download": 0.0,
              "speed_upload": 0.0
            }
          }
        }
      ],
      "state": "PRESENT",
      "property_facility_meta": {
        "facility_id": 47,
        "facility_name": "INTERNET_SERVICES",
        "allowed_details_list": [
          "PaymentDetails",
          "InternetDetails"
        ]
      }
    },
    {
      "facility_id": 96,
      "state": "PRESENT",
      "property_facility_meta": {
        "facility_id": 96,
        "facility_name": "WIRELESS_LAN"
      }
    },
    {
      "facility_id": 220,
      "state": "MISSING",
      "property_facility_meta": {
        "facility_id": 220,
        "booking_extended_legacy_code": 5076,
        "facility_name": "BEACH_CHAIRS_LOUNGERS",
        "allowed_details_list": [
          "SurchargeDetails"
        ]
      }
    },
    {
      "facility_id": 221,
      "instances": [
        {
          "surcharge_details": {
            "surcharge_type": "DEFAULT"
          }
        }
      ],
      "state": "PRESENT",
      "property_facility_meta": {
        "facility_id": 221,
        "booking_extended_legacy_code": 5077,
        "facility_name": "BEACH_UMBRELLAS",
        "allowed_details_list": [
          "SurchargeDetails"
        ]
      }
    },
    {
      "facility_id": 433,
      "instances": [
        {
          "instance_id": 189740709,
          "swimming_pool_details": {
            "name": "rooftop pool",
            "swimming_pool_type": "OUTDOOR",
            "availability_type": "SEASONABLE",
            "allowed_age_type": "ALL_AGES",
            "has_loungers": false,
            "has_water_slide": true,
            "has_pool_bar": true,
            "has_pool_cover": true,
            "has_free_towels": true,
            "has_pool_toys": true,
            "has_sun_umbrellas": true,
            "has_fence_around_pool": true,
            "has_snake_trap": true,
            "is_shared": true,
            "is_rooftop": true,
            "is_shallow_end": true,
            "is_infinity": true,
            "is_heated": true,
            "is_salt_water": true,
            "is_pool_with_view": true,
            "is_plunge_pool": true
          },
          "surcharge_details": {
            "surcharge_type": "PAID"
          }
        }
      ],
      "state": "PRESENT",
      "property_facility_meta": {
        "facility_id": 433,
        "booking_extended_legacy_code": 5154,
        "facility_name": "SWIMMING_POOL",
        "allowed_details_list": [
          "TemporarilyClosedDetails",
          "ScheduleDetails",
          "SwimmingPoolDetails",
          "SurchargeDetails"
        ],
        "required_details_list": [
          "SwimmingPoolDetails"
        ]
      }
    }
  ],
  "warnings": [],
  "errors": [],
  "meta": {
    "ruid": "97bd7e03-4df3-46f3-bb03-aa63e12c3034"
  }
}