Last updated

Managing bathroom facilities

Use the bathroom endpoints in the Facilities API to manage bathroom facilities in a property.

You can:

  • create, update or delete bathroom facilities.
  • retrieve bathroom facility details for a property.

Create, update or delete bathroom details

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

When creating or updating a bathroom facility, the request body differs based on whether the property is one of the following types:

  • Hotels
  • Homes
  • Hostels

For example, Apartment is classified as a Homes property type. To determine whether a property is classified as a hotel or home and get their respective OTA and Booking.com property codes, see Booking.com property codes.

Managing Hotel bathroom facilities

When creating, updating or deleting bathroom facilities for properties that are categorised as Hotels, consider the following:

  • You cannot edit specific bathrooms using IDs because you cannot create multiple bathroom instances.
  • You can select only two bathroom states:
    • shared_bathroom_state (PRESENT or MISSING)
    • private_bathroom_state (PRESENT or MISSING)
  • Specify the total number of bathrooms attached to the room using hotel_bathroom_details.number_of_bathrooms.

Path parameters

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

ElementDescriptionTypeRequired/
Optional
Notes
propertyIdSpecifies the unique ID of the property.integerrequiredMust be valid and connected to your account.
roomIDSpecifies the unique ID of the room to which the bathroom facility is added or updated.integerrequiredMust belong to the property.

Request body example

{
  "property_bathroom_details": {
    "bathrooms": [
      {
        "bathroom_type": "PRIVATE",
        "bathroom_location": "ENSUITE"
      },
      {
        "bathroom_type": "SHARED",
        "bathroom_location": "OPPOSITE_THE_ROOM"
      }
    ]
  }
}

For more examples, see the Bathrooms Open API specification under the Try it section.

Response body example

The following is a response snippet with a success message:

{
  "data": {
    "success": true
  },
  "warnings": [],
  "errors": [],
  "meta": {
    "ruid": "g497d724-54bb-4b48-8274-fafb59le127"
  }
}

Delete all Hotel bathrooms

To delete all bathroom facilities for a hotel:

  • Set both hotel_bathroom_details.shared_bathroom_state and hotel_bathroom_details.private_bathroom_state to MISSING.
  • Set hotel_bathroom_details.number_of_bathrooms to 0.

For example:

{
  "hotel_bathroom_details": {
    "shared_bathroom_state": "MISSING",
    "private_bathroom_state": "MISSING",
    "number_of_bathrooms": 0
  }
}

Managing Homes and Hostel bathroom facilities

When creating or updating bathroom facilities for properties that are categorised as Homes and Hostels, consider the following:

  • You can create multiple bathroom instances.
  • If bathrooms[0].id:{{ID}} is specified, then the endpoint updates the specified bathroom corresponding to the ID.
  • If bathrooms[].id is not specified, then the endpoint creates a new bathroom.

Request body example

{
  "property_bathroom_details": {
    "bathrooms": [
      {
        "bathroom_type": "PRIVATE",
        "bathroom_location": "ENSUITE"
      },
      {
        "bathroom_type": "SHARED",
        "bathroom_location": "OPPOSITE_THE_ROOM"
      }
    ]
  }
}

For more request body examples, see the Bathrooms Open API specification under the Try it section.

Deleting a Home bathroom facility

Note that the endpoint deletes any missing bathroom configuration in the request body. For example, if bathrooms[0].id:12345 is missing from the payload, then the endpoint deletes the bathroom facility with the ID 12345.

The endpoint uses overlay mode

When you update bathroom facilities make sure to provide all existing bathroom definitions. Note that because the endpoint uses the overlay mode, failing to specify any existing definitions will lead to the endpoint overwriting the existing definition with what you provide.

To delete all bathrooms: Provide an empty list in the payload. For example, property_bathroom_details.bathrooms:[]

Bathroom validation rules

This section lists the validation rules you should keep in mind when managing bathroom facilities.

Validations when managing bathroom facilities for Hotels

Make sure to specify the following required fields:

  • hotel_bathroom_details
  • hotel_bathroom_details.shared_bathroom_state: [PRESENT | MISSING]
  • hotel_bathroom_details.private_bathroom_state: [PRESENT | MISSING]
  • hotel_bathroom_details.number_of_bathrooms

Constraints:

  • The number_of_bathrooms must be within (0-20)
  • If bathroom_state is all MISSING, number_of_bathrooms should be 0
  • If bathroom_state contains PRESENT, number_of_bathrooms should be > 0

Validations when managing bathroom facilities for Homes

Make sure to specify the following required fields:

  • property_bathroom_details
  • property_bathroom_details.bathrooms[*].bathroom_type: [SHARED | PRIVATE]
  • property_bathroom_details.bathrooms[].size: must be (0-20)

Validations when managing bathroom facilities for Hostels

Make sure to specify the following required fields:

  • property_bathroom_details
  • property_bathroom_details.bathrooms[*].bathroom_type: [SHARED | PRIVATE]
  • property_bathroom_details.bathrooms[*].bathroom_location: [ENSUITE | NEXT_DOOR | DOWN_THE_HALL | OPPOSITE_THE_ROOM | IN_THE_HALLWAY | OTHER]
  • property_bathroom_details.bathrooms[*].hostel_bathroom_details
  • property_bathroom_details.bathrooms[*].hostel_bathroom_details.bathroom_facilities[*]

Constraints:

  • For private bathrooms:
    • bathroom_location must be [ENSUITE]
  • For shared bathrooms:
    • bathroom_location must be [NEXT_DOOR | DOWN_THE_HALL | OPPOSITE_THE_ROOM | IN_THE_HALLWAY | OTHER]
    • bathrooms[].hostel_bathroom_details.bathroom_facilities[] requires at least 1 of [SHOWER, TOILET, SINK, BATH] with count > 0
    • bathrooms[].hostel_bathroom_details.bathroom_facilities[].count required for [SHOWER, TOILET, SINK, BATH]
  • For private bathrooms:
    • num_guests_with_access_type not allowed
    • gender not allowed
  • For shared bathrooms:
    • num_guests_with_access_type required
    • gender required
    • bathroom_facilities[] type not allowed: is_paid option. Allowed types with is_paid options: [SLIPPERS, TOOTHBRUSH, SHAMPOO, CONDITIONER, BODY_SOAP, TOWEL]
  • Property type HOSTEL only allows:
    • 0-1 private bathrooms
    • 0-5 shared bathrooms

Request body parameters

ElementDescriptionTypeRequired/
Optional
NotesRoot parameter in HDCN
property_bathroom_detailsContainer for property-type bathroom details.objectOptionalUsed for property-type accommodations-
> bathroomsContains a list of bathroom configurations.arrayRequired if using property_bathroom_detailsMaximum 20 bathrooms-
>> bathroom_typeSpecifies if bathroom is private or shared.stringRequiredEnum: PRIVATE, SHARED-
>> bathroom_locationSpecifies the location of the bathroom.stringOptionalEnum: ENSUITE, NEXT_DOOR, DOWN_THE_HALL, OPPOSITE_THE_ROOM, IN_THE_HALLWAY, OTHER, INSIDE_THE_APARTMENT, INSIDE_OR_ATTACHED_TO_BEDROOM, INSIDE_THE_ROOM-
>>hostel_bathroom_detailsContains hostel-specific bathroom details.objectOptionalOnly applicable for hostel properties-
>>>genderSpecifies the gender designation for the bathroom.stringOptionalEnum: FEMALE, MALE, MIXED-
>>>num_guests_with_access_typeSpecifies the number of guests with access.stringOptionalEnum: NUMBER_LESS_THAN_5, NUMBER_5_TO_10, NUMBER_11_TO_20, NUMBER_21_TO_30, NUMBER_31_TO_40, NUMBER_41_TO_50, NUMBER_MORE_THAN_50-
>>>bathroom_facilitiesSpecifies the list of facilities in the bathroom.arrayRequired if using hostel_bathroom_details--
>>>>>> typeSpecifies the type of facility.stringRequiredEnum: SHOWER, TOILET, SINK, BATH, TOILET_PAPER, HAIR_DRYER, SLIPPERS, BIDET, TOOTHBRUSH, SHAMPOO, CONDITIONER, BODY_SOAP, TOWEL, HOT_WATER-
>>>>>> countSpecifies the number of this facility type.integerOptionalMin: 1, Max: 100-
>>>>>> is_paidSpecifies whether the facility is paid.booleanOptional--
hotel_bathroom_detailsContainer for hotel-type bathroom details.objectOptionalUsed for hotel-type accommodations-
> shared_bathroom_stateIndicates if shared bathroom is available.stringRequired if using hotel_bathroom_detailsEnum: MISSING, PRESENT-
> private_bathroom_stateIndicates if private bathroom is available.stringRequired if using hotel_bathroom_detailsPossible values are: MISSING, PRESENT-
> number_of_bathroomsSpecifies the total number of bathrooms.integerRequired if using hotel_bathroom_detailsMin: 0, Max: 20-
> private_bathroom_detailsContainer for private bathroom details.objectOptional--
>>typeSpecifies the type of private bathroom.stringOptionalPossible values are: DEFAULT, EXTERNAL_BATHROOM, ATTACHED_BATHROOM-
>>location_typeSpecifies the location of private bathroom.stringOptionalPossible values are: DEFAULT, NEXT_DOOR, DOWN_THE_HALL, ACROSS_FROM_THE_ROOM, IN_THE_LOBBY, OTHER-
>>location_otherSpecifies the custom location description.stringOptionalUsed when location_type is OTHER-

Response body elements

The following table describes the response elements:

ElementDescriptionTypeNotes
dataContains the response bodyobject-
successSpecifies whether the request completed successfully.boolean-
warningsContains any warnings in the request.object-
errorsContains any errors in the request.object-
metaContains metadata information about the response.object-
> ruidSpecifies the unique request ID.stringYou can share this ID with Booking.com customer support when you run into an issue. This can help in understanding what went wrong.

Retrieve bathroom facility details

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

Use this endpoint to retrieve the bathroom facilities for the specified listing.

Path parameters

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

ElementDescriptionTypeRequired/
Optional
Notes
propertyIdSpecifies the unique ID of the property.integerrequiredMust be valid and connected to your account.
roomIDSpecifies the unique ID of the room to get the bathroom facility details.integerrequiredMust belong to the property.

Response body example

The following is a response body snippet:

{
  "data": {
    "property_bathroom_details": {
      "bathrooms": [
        {
          "id": 325662717,
          "bathroom_type": "PRIVATE",
          "bathroom_location": "ENSUITE"
        },
        {
          "id": 325662718,
          "bathroom_type": "SHARED",
          "bathroom_location": "OPPOSITE_THE_ROOM"
        }
      ]
    }
  },
  "warnings": [],
  "errors": [],
  "meta": {
    "ruid": "94kk241-149f-4ec5-8632-3035cfb1l9b4"
  }
}

Response parameters

Field PathDescriptionTypeNotes
> dataContains the bathroom configuration details.object
>> property_bathroom_detailsContains bathroom details for property-type rooms.object
>>> bathroomsContains a list of bathroom configurations.array of objectsMaximum 20 bathrooms
>>>> bathroom_typeSpecifies if bathroom is private or shared.enumerated stringRequired. Supports: PRIVATE, SHARED
>>>> bathroom_locationSpecifies the location of the bathroom.enumerated stringSupports: ENSUITE, NEXT_DOOR, DOWN_THE_HALL, OPPOSITE_THE_ROOM, IN_THE_HALLWAY, OTHER, INSIDE_THE_APARTMENT, INSIDE_OR_ATTACHED_TO_BEDROOM, INSIDE_THE_ROOM
>>>> hostel_bathroom_detailsContains details specific to hostel bathrooms.object
>>>>> genderSpecifies the gender designation for the bathroom.enumerated stringSupports: FEMALE, MALE, MIXED
>>>>> num_guests_with_access_typeSpecifies the number of guests with access.enumerated stringSupports: NUMBER_LESS_THAN_5, NUMBER_5_TO_10, NUMBER_11_TO_20, NUMBER_21_TO_30, NUMBER_31_TO_40, NUMBER_41_TO_50, NUMBER_MORE_THAN_50
>>>>> bathroom_facilitiesContains the list of facilities in the bathroom.array of objectsRequired
>>>>>> typeSpecifies the type of facility.enumerated stringRequired. Supports: SHOWER, TOILET, SINK, BATH, TOILET_PAPER, HAIR_DRYER, SLIPPERS, BIDET, TOOTHBRUSH, SHAMPOO, CONDITIONER, BODY_SOAP, TOWEL, HOT_WATER
>>>>>> countSpecifies the number of this facility type.integerMin: 1, Max: 100
>>>>>> is_paidSpecifies whether the facility is paid.boolean
>> hotel_bathroom_detailsContains bathroom details for hotel-type rooms.object
>>> shared_bathroom_stateIndicates if shared bathroom is available.enumerated stringRequired. Supports: MISSING, PRESENT
>>> private_bathroom_stateIndicates if private bathroom is available.enumerated stringRequired. Supports: MISSING, PRESENT
>>> number_of_bathroomsSpecifies the total number of bathrooms.integerRequired. Min: 0, Max: 20
>>> private_bathroom_detailsContains the details about private bathroom.object
>>>> typeSpecifies the type of private bathroom.enumerated stringSupports: DEFAULT, EXTERNAL_BATHROOM, ATTACHED_BATHROOM
>>>> location_typeSpecifies the location of the private bathroom.enumerated stringSupports: DEFAULT, NEXT_DOOR, DOWN_THE_HALL, ACROSS_FROM_THE_ROOM, IN_THE_LOBBY, OTHER
>>>> location_otherSpecifies the custom location description.string