Contains Rooms API specification
Contains Rooms API specification
curl -i -X GET \
'https://developers.booking.com/_mock/connectivity/docs/openapispecs/rooms-api/rooms-api-specification/rooms-api/properties/{property-id}/units?debug_info=false'{ "data": [ { … } ], "warnings": [ { … } ], "errors": [ { … } ], "meta": { "ruid": "string" } }
$.unit_type[*].id and $.unit_type[*].is_active) for unit creation/update$.unit_type[*].valid_property_categories)BEDROOM_SUBROOM or LIVING_ROOM_SUBROOM, at least one of the rooms must have bedsGUEST_ROOM$.unit_names)One or more floors where the unit is located; 0 is a ground floor
Maximum number of children eligible for the children rate (the rest are charged as adults), must be less than or equal to number of children. If not specified, defaults to max_children.
curl -i -X POST \
'https://developers.booking.com/_mock/connectivity/docs/openapispecs/rooms-api/rooms-api-specification/rooms-api/properties/{property-id}/units' \
-H 'Content-Type: application/json' \
-d '{
"configuration": {
"unit_type_id": 31,
"rooms": [
{
"type": "BEDROOM_SUBROOM",
"bed_configurations": [
{
"beds": [
{
"bed_type_id": 6,
"bed_count": 1
},
{
"bed_type_id": 1,
"bed_count": 1
}
],
"is_default_configuration": true
}
]
},
{
"type": "BEDROOM_SUBROOM",
"bed_configurations": [
{
"beds": [
{
"bed_type_id": 1,
"bed_count": 3
}
],
"is_default_configuration": true
}
]
},
{
"type": "LIVING_ROOM_SUBROOM",
"bed_configurations": [
{
"beds": [
{
"bed_type_id": 5,
"bed_count": 1
}
],
"is_default_configuration": true
}
]
},
{
"type": "LIVING_ROOM_SUBROOM"
}
]
},
"unit_name_id": 4180,
"number_of_units": 5,
"smoking_policy": "SMOKING_AND_NONSMOKING",
"size": {
"value": 155,
"unit": "SQM"
},
"partner_reference_name": "Example two-bedroom villa",
"floor_numbers_located_on": [
2
],
"occupancy_details": {
"max_guests": 5,
"max_adults": 5,
"max_children": 4,
"max_infants": 4,
"max_infants_on_top": 0
},
"max_children_that_pay_children_rate": 2,
"extra_beds_configuration": {
"extra_beds": 1,
"cribs": 0,
"is_crib_and_extra_bed_allowed": false
}
}'{ "data": { "unit_id": 0, "configuration": { … }, "unit_name_id": 0, "number_of_units": 0, "smoking_policy": "SMOKING", "size": { … }, "partner_reference_name": "string", "floor_numbers_located_on": [ … ], "occupancy": { … }, "occupancy_details": { … }, "extra_beds_configuration": { … }, "max_children_that_pay_children_rate": 49, "unit_name_fallback": "string" }, "warnings": [ { … } ], "errors": [ { … } ], "meta": { "ruid": "string" } }
curl -i -X DELETE \
'https://developers.booking.com/_mock/connectivity/docs/openapispecs/rooms-api/rooms-api-specification/rooms-api/properties/{property-id}/units/{unit-id}'{ "data": {}, "warnings": [ { … } ], "errors": [ { … } ], "meta": { "ruid": "string" } }
Learn how to effectively use the Try it feature in the Rooms API documentation.
Use the Try it feature to send test request examples to the API endpoints directly from the developer portal and depending on the selected environment either see static, pre-built responses or dynamic responses from a test property.