Managing room facilities
Use this endpoint to add, update or delete room-level facility details. Adding room facilities is similar to adding property facilities.
Adding or deleting the majority of the room facilities is a simple toggling on or off request.
Using this endpoint, you can :
To help troubleshoot any issues during implementation, you can also use the debugInfo switch.
To update specific property facilities make sure to specify only those facilities identifiers. The API updates only those facilities. The rest are ignored during the updates. For example, if your request contains room facilities with IDs [1(Coffee/Tea Maker) and 3(Minibar)], the endpoint updates only those room facilities with IDs 1 and 3.
Adding room facilities
PUT
https://supply-xml.booking.com/facilities-api/properties/{propertyId}/rooms/{roomsId}
Use the PUT
method to add room facilities for a property.
While adding room facilities, make sure to send an array of one or multiple facilities. Depending on whether you want to add or remove a facility, you can set the facility state to PRESENT
or MISSING
.
Request body example
The following is a request body example:
{ "data": [ { "room_facility_id": 1, "state": "PRESENT" }, { "room_facility_id": 3, "state": "MISSING" }, ... ] }
The above request updates room facilities with IDs (1 and 3) for the room with {roomId}. All other room facilities in the property are not affected by this request.
Adding additional room facility details
Currently, there are two room facilities that support specifying additional details:
linen (
room_facility_id
: 125)cribs (
room_facility_id
: 175)
For more information on the supported details, see the meta endpoint.
Request body example
The following is a request body example:
[ { "room_facility_id": 125, "state": "PRESENT", "room_facility_instances": [ { "linen_details": { "has_crib_linen": true, "has_fitted_sheet": true, "has_top_sheet": false, "has_blanket": true, "has_extra_blankets": true, "has_pillow": false, "has_mattress_protector": true } } ] }, { "room_facility_id": 175, "state": "PRESENT", "room_facility_instances": [ { "crib_details": { "is_foldable": true, "is_standalone": false } } ] } ]
Retrieving room facilities details added to a property
Use the GET
method to retrieve instance IDs (instanceId
s) along with the facility details for all the facility instances added to the room.
GET
https://supply-xml.booking.com/facilities-api/properties/{propertyId}/rooms/{roomsId}
Debugging support
To support you during the implementation of this API, you can use the debugInfo
parameter to add more verbosity to the responses and attach additional information. It simply attaches information from the meta endpoint to the GET response.
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.
To get the facility_type
parameter to understand what room_facility_id
:1 means and to get the corresponding ota_room_amenity_type
for the room facility (if its exist), you would need to add debugInfo=true
to the GET endpoint.
GET
https://supply-xml.booking.com/facilities-api/properties/{propertyId}/rooms/{roomsId}?debugInfo=true
Response body example
The following is a response body example:
{ "data": [ { "room_facility_id": 1, "state": "PRESENT", "room_facility_meta": { "room_facility_id": 1, "room_facility_type": "COFFEETEA_MAKER", "ota_room_amenity_type": 19, "booking_extended_legacy_code": 5001 } }, { "room_facility_id": 3, "state": "PRESENT", "room_facility_meta": { "room_facility_id": 3, "room_facility_type": "MINIBAR", "ota_room_amenity_type": 69, "booking_extended_legacy_code": 5003 } } ] }