Create one or more units
- Mock (schema only)https://developers.booking.com/_mock/connectivity/docs/openapispecs/rooms-api/rooms-api-specification-bulk/rooms-api/units
- Test using live endpointhttps://supply-xml.booking.com/rooms-api/units
- MULTI_ROOM_UNITS
- SINGLE_ROOM_UNITS
- MIXED_UNIT_TYPES
- MINIMAL_REQUIRED_FIELDS
curl -i -X POST \
https://developers.booking.com/_mock/connectivity/docs/openapispecs/rooms-api/rooms-api-specification-bulk/rooms-api/units \
-H 'Accept-Version: 1.0' \
-H 'Content-Type: application/json' \
-d '{
"units": [
{
"property_id": 123456,
"correlation_id": "corr-01",
"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
}
]
}
]
},
"unit_name_id": 4180,
"number_of_units": 5,
"smoking_policy": "SMOKING_AND_NONSMOKING",
"size": {
"value": 155,
"unit": "SQM"
},
"partner_reference_name": "Two-bedroom villa with living room",
"floor_numbers_located_on": [
2
],
"occupancy_details": {
"max_guests": 5,
"max_adults": 5,
"max_children": 4,
"max_infants": 4,
"max_infants_on_top": 0
},
"extra_beds_configuration": {
"extra_beds": 1,
"cribs": 0,
"is_crib_and_extra_bed_allowed": false
}
},
{
"property_id": 123456,
"correlation_id": "corr-02",
"configuration": {
"unit_type_id": 1,
"rooms": [
{
"type": "BEDROOM_SUBROOM",
"bed_configurations": [
{
"beds": [
{
"bed_type_id": 3,
"bed_count": 1
}
],
"is_default_configuration": true
}
]
},
{
"type": "LIVING_ROOM_SUBROOM"
}
]
},
"unit_name_id": 865,
"number_of_units": 3,
"smoking_policy": "NONSMOKING",
"size": {
"value": 75,
"unit": "SQM"
},
"partner_reference_name": "One-bedroom apartment",
"occupancy_details": {
"max_guests": 3,
"max_adults": 3,
"max_children": 2,
"max_infants": 0,
"max_infants_on_top": 2
},
"extra_beds_configuration": {
"extra_beds": 1,
"cribs": 1,
"is_crib_and_extra_bed_allowed": true
}
}
]
}'Response
Successful creation of two units
{ "data": { "units": [ … ] }, "errors": [], "warnings": [], "meta": { "ruid": "test-ruid" } }