Skip to content

Manage room facilities

Use the GET and the PUT endpoints to:

  • Retrieve room facilities set for a property.
  • Add, modify or delete room facilities.

Retrieve room facilities set for a property.

Request

Retrieve the facility details for all the facility instances added to the rooms

Path
propertyIdinteger, (int32)required
roomIdintegerrequired
Query
debugInfostring

When set to true, attaches room facility metadata (facility names, OTA codes, allowed detail types) to each item in the response. Significantly increases payload size. Do not use in production environments.

Default:"false"
import java.net.*;
import java.net.http.*;
import java.util.*;
import java.nio.charset.StandardCharsets;
import java.util.stream.Collectors;

public class App {
  public static void main(String[] args) throws Exception {
    var httpClient = HttpClient.newBuilder().build();

    HashMap<String, String> params = new HashMap<>();
    params.put("debugInfo", "false");

    var query = params.keySet().stream()
      .map(key -> key + "=" + URLEncoder.encode(params.get(key), StandardCharsets.UTF_8))
      .collect(Collectors.joining("&"));

    var host = "https://developers.booking.com";
    var propertyId = "YOUR_propertyId_PARAMETER";
    var roomId = "YOUR_roomId_PARAMETER";
    var pathname = "/_mock/connectivity/docs/openapispecs/facilities-api/facilities-api-specification/facilities-api/properties/%7BpropertyId%7D/rooms/%7BroomId%7D";
    var request = HttpRequest.newBuilder()
      .GET()
      .uri(URI.create(host + pathname + '?' + query))
      .build();

    var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());

    System.out.println(response.body());
  }
}

Responses

OK

Bodyapplication/json
dataArray of objects(RoomFacilityResponse)
warningsArray of objects(ApiError)
errorsArray of objects(ApiError)
metaobject(ResponseMeta)
Response
{ "data": [], "warnings": [], "errors": [], "meta": { "ruid": "59b721b1-7d21-4cce-b847-79e5ccb6399f" } }