Bedrooms & Beds

Configure the rooms and beds at your property.

Overview

The Spaces API allows you to define the sleeping arrangements at your properties. This article describes how to Create, Remove, and Edit space details, as well as editing a space's beds.

Creating a Room

To retrieve the supported room and bed enums, use these endpoints:

Available Endpoints

Key Parameters

Path ParameterTypeDescriptionRequired
unitTypeIdstringThe property's ID.✔️
Body ParameterTypeDescriptionRequired
_idstringThe property's ID.✔️
namestringName of the space. E.g., Living Room or Bedroom 1.
typestringRoom type. Can be either SHARED_SPACE or BEDROOM.
airbnb_room_idstringFor Airbnb listings only. Take this from Airbnb.
bedsobjectA list of the beds in the space.
otherobjectA list of other bed types.

Beds Object

Body ParameterTypeDescriptionRequired
KING_BEDnumberThe number of king-size beds in the room.
QUEEN_BEDnumberThe number of queen-size beds in the room.
DOUBLE_BEDnumberThe number of double beds in the room.
SINGLE_BEDnumberThe number of single beds in the room.
SOFA_BEDnumberThe number of sofa beds in the room.
AIR_MATTRESSnumberThe number of air mattresses in the room.
BUNK_BEDnumberThe number of bunk beds in the room.

Other Object

Body ParameterTypeDescriptionRequired
FLOOR_MATTRESSnumberThe number of floor mattresses in the room.
WATER_BEDnumberThe number of water beds in the room.
TODDLER_BEDnumberThe number of toddler beds in the room.
CRIBnumberThe number of baby cribs in the room.

📘

You only need to include the the relevant bed types in the beds and other objects.

Bedroom Example

Request

curl 'https://open-api.guesty.com/v1/properties/spaces/unit-type/64f03f9094d741004fda977d/add' \
--header 'accept: application/json; charset=utf-8' \
--header 'content-type: application/json' \
--data '{
    "beds": {
        "QUEEN_BED": 2
    },
    "other": {
        "CRIB": 1
    },
    "name": "Bedroom 2",
    "type": "BEDROOM"
}'
var myHeaders = new Headers();
myHeaders.append("accept", "application/json; charset=utf-8");
myHeaders.append("content-type", "application/json");

var raw = JSON.stringify({
  "beds": {
    "QUEEN_BED": 2
  },
  "other": {
    "CRIB": 1
  },
  "name": "Bedroom 2",
  "type": "BEDROOM"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'manual'
};

fetch("https://open-api.guesty.com/v1/properties/spaces/unit-type/64f03f9094d741004fda977d/add", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://open-api.guesty.com/v1/properties/spaces/unit-type/64f03f9094d741004fda977d/add',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => false,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "beds": {
        "QUEEN_BED": 2
    },
    "other": {
        "CRIB": 1
    },
    "name": "Bedroom 2",
    "type": "BEDROOM"
}',
  CURLOPT_HTTPHEADER => array(
    'accept: application/json; charset=utf-8',
    'content-type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

import http.client
import json

conn = http.client.HTTPSConnection("open-api.guesty.com")
payload = json.dumps({
  "beds": {
    "QUEEN_BED": 2
  },
  "other": {
    "CRIB": 1
  },
  "name": "Bedroom 2",
  "type": "BEDROOM"
})
headers = {
  'accept': 'application/json; charset=utf-8',
  'content-type': 'application/json'
}
conn.request("POST", "/v1/properties/spaces/unit-type/64f03f9094d741004fda977d/add", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Response

{
    "unitTypeId": "64f03f9094d741004fda977d",
    "bedroomsAllowed": true,
    "spaces": [
        {
            "_id": "64f0427db4f3990038e25375",
            "accountId": "62a8a2be2e53190032102a6e",
            "unitTypeId": "64f03f9094d741004fda977d",
            "beds": {
                "KING_BED": 0,
                "QUEEN_BED": 0,
                "DOUBLE_BED": 0,
                "SINGLE_BED": 0,
                "SOFA_BED": 0,
                "AIR_MATTRESS": 0,
                "BUNK_BED": 0
            },
            "name": "Default bedroom",
            "other": {
                "FLOOR_MATTRESS": 0,
                "WATER_BED": 0,
                "TODDLER_BED": 0,
                "CRIB": 0
            },
            "roomNumber": 1,
            "type": "BEDROOM"
        },
        {
            "_id": "650abb9734998c003b251257",
            "beds": {
                "KING_BED": 1,
                "QUEEN_BED": 0,
                "DOUBLE_BED": 0,
                "SINGLE_BED": 0,
                "SOFA_BED": 0,
                "AIR_MATTRESS": 0,
                "BUNK_BED": 0
            },
            "other": {
                "FLOOR_MATTRESS": 0,
                "WATER_BED": 0,
                "TODDLER_BED": 0,
                "CRIB": 1
            },
            "name": "Bedroom 1",
            "type": "BEDROOM",
            "accountId": "62a8a2be2e53190032102a6e",
            "unitTypeId": "64f03f9094d741004fda977d",
            "roomNumber": 2
        },
        {
            "_id": "650abbf5b2c6e8002bc2ebdb",
            "beds": {
                "KING_BED": 0,
                "QUEEN_BED": 2,
                "DOUBLE_BED": 0,
                "SINGLE_BED": 0,
                "SOFA_BED": 0,
                "AIR_MATTRESS": 0,
                "BUNK_BED": 0
            },
            "other": {
                "FLOOR_MATTRESS": 0,
                "WATER_BED": 0,
                "TODDLER_BED": 0,
                "CRIB": 1
            },
            "name": "Bedroom 2",
            "type": "BEDROOM",
            "accountId": "62a8a2be2e53190032102a6e",
            "unitTypeId": "64f03f9094d741004fda977d",
            "roomNumber": 3
        }
    ]
}

Shared Space Example

Request

curl 'https://open-api.guesty.com/v1/properties/spaces/unit-type/64f03f9094d741004fda977d/add' \
--header 'accept: application/json; charset=utf-8' \
--header 'content-type: application/json' \
--data '{
    "beds": {
        "SOFA_BED": 1
    },
    "name": "Living Room",
    "type": "SHARED_SPACE"
}'
var myHeaders = new Headers();
myHeaders.append("accept", "application/json; charset=utf-8");
myHeaders.append("content-type", "application/json");

var raw = JSON.stringify({
  "beds": {
    "SOFA_BED": 1
  },
  "name": "Living Room",
  "type": "SHARED_SPACE"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'manual'
};

fetch("https://open-api.guesty.com/v1/properties/spaces/unit-type/64f03f9094d741004fda977d/add", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://open-api.guesty.com/v1/properties/spaces/unit-type/64f03f9094d741004fda977d/add',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => false,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "beds": {
        "SOFA_BED": 1
    },
    "name": "Living Room",
    "type": "SHARED_SPACE"
}',
  CURLOPT_HTTPHEADER => array(
    'accept: application/json; charset=utf-8',
    'content-type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

import http.client
import json

conn = http.client.HTTPSConnection("open-api.guesty.com")
payload = json.dumps({
  "beds": {
    "SOFA_BED": 1
  },
  "name": "Living Room",
  "type": "SHARED_SPACE"
})
headers = {
  'accept': 'application/json; charset=utf-8',
  'content-type': 'application/json'
}
conn.request("POST", "/v1/properties/spaces/unit-type/64f03f9094d741004fda977d/add", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Response

{
    "unitTypeId": "64f03f9094d741004fda977d",
    "bedroomsAllowed": true,
    "spaces": [
        {
            "_id": "650abc34c9da7b003a35dce9",
            "beds": {
                "KING_BED": 0,
                "QUEEN_BED": 0,
                "DOUBLE_BED": 0,
                "SINGLE_BED": 0,
                "SOFA_BED": 1,
                "AIR_MATTRESS": 0,
                "BUNK_BED": 0
            },
            "other": {
                "FLOOR_MATTRESS": 0,
                "WATER_BED": 0,
                "TODDLER_BED": 0,
                "CRIB": 0
            },
            "name": "Living Room",
            "type": "SHARED_SPACE",
            "accountId": "62a8a2be2e53190032102a6e",
            "unitTypeId": "64f03f9094d741004fda977d",
            "roomNumber": 0
        },
        {
            "_id": "64f0427db4f3990038e25375",
            "accountId": "62a8a2be2e53190032102a6e",
            "unitTypeId": "64f03f9094d741004fda977d",
            "beds": {
                "KING_BED": 0,
                "QUEEN_BED": 0,
                "DOUBLE_BED": 0,
                "SINGLE_BED": 0,
                "SOFA_BED": 0,
                "AIR_MATTRESS": 0,
                "BUNK_BED": 0
            },
            "name": "Default bedroom",
            "other": {
                "FLOOR_MATTRESS": 0,
                "WATER_BED": 0,
                "TODDLER_BED": 0,
                "CRIB": 0
            },
            "roomNumber": 1,
            "type": "BEDROOM"
        },
        {
            "_id": "650abb9734998c003b251257",
            "beds": {
                "KING_BED": 1,
                "QUEEN_BED": 0,
                "DOUBLE_BED": 0,
                "SINGLE_BED": 0,
                "SOFA_BED": 0,
                "AIR_MATTRESS": 0,
                "BUNK_BED": 0
            },
            "other": {
                "FLOOR_MATTRESS": 0,
                "WATER_BED": 0,
                "TODDLER_BED": 0,
                "CRIB": 1
            },
            "name": "Bedroom 1",
            "type": "BEDROOM",
            "accountId": "62a8a2be2e53190032102a6e",
            "unitTypeId": "64f03f9094d741004fda977d",
            "roomNumber": 2
        },
        {
            "_id": "650abbf5b2c6e8002bc2ebdb",
            "beds": {
                "KING_BED": 0,
                "QUEEN_BED": 2,
                "DOUBLE_BED": 0,
                "SINGLE_BED": 0,
                "SOFA_BED": 0,
                "AIR_MATTRESS": 0,
                "BUNK_BED": 0
            },
            "other": {
                "FLOOR_MATTRESS": 0,
                "WATER_BED": 0,
                "TODDLER_BED": 0,
                "CRIB": 1
            },
            "name": "Bedroom 2",
            "type": "BEDROOM",
            "accountId": "62a8a2be2e53190032102a6e",
            "unitTypeId": "64f03f9094d741004fda977d",
            "roomNumber": 3
        }
    ]
}

Removing a Room

Use the Retrieve spaces for a complex or Retrieve spaces for a unit-type requests to get the space IDs necessary for this action. unitTypeId isn't required.

Available Endpoints

Key Parameters

Path ParameterTypeDescriptionRequired
spaceIdstringThe ID of the space you wish to remove from the listing.✔️

Example

In this example, Bedroom 2 seen in the examples above is deleted.

Request

curl --request POST 'https://open-api.guesty.com/v1/properties/spaces/space/650abbf5b2c6e8002bc2ebdb/remove' \
--header 'accept: application/json; charset=utf-8'
var myHeaders = new Headers();
myHeaders.append("accept", "application/json; charset=utf-8");

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  redirect: 'manual'
};

fetch("https://open-api.guesty.com/v1/properties/spaces/space/650abbf5b2c6e8002bc2ebdb/remove", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://open-api.guesty.com/v1/properties/spaces/space/650abbf5b2c6e8002bc2ebdb/remove',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => false,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => array(
    'accept: application/json; charset=utf-8'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

import http.client

conn = http.client.HTTPSConnection("open-api.guesty.com")
payload = ''
headers = {
  'accept': 'application/json; charset=utf-8'
}
conn.request("POST", "/v1/properties/spaces/space/650abbf5b2c6e8002bc2ebdb/remove", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Response

The remaining spaces at the property are returned in the API response.

{
    "unitTypeId": "64f03f9094d741004fda977d",
    "bedroomsAllowed": true,
    "spaces": [
        {
            "_id": "650abc34c9da7b003a35dce9",
            "beds": {
                "KING_BED": 0,
                "QUEEN_BED": 0,
                "DOUBLE_BED": 0,
                "SINGLE_BED": 0,
                "SOFA_BED": 1,
                "AIR_MATTRESS": 0,
                "BUNK_BED": 0
            },
            "other": {
                "FLOOR_MATTRESS": 0,
                "WATER_BED": 0,
                "TODDLER_BED": 0,
                "CRIB": 0
            },
            "name": "Living Room",
            "type": "SHARED_SPACE",
            "accountId": "62a8a2be2e53190032102a6e",
            "unitTypeId": "64f03f9094d741004fda977d",
            "roomNumber": 0
        },
        {
            "_id": "64f0427db4f3990038e25375",
            "accountId": "62a8a2be2e53190032102a6e",
            "unitTypeId": "64f03f9094d741004fda977d",
            "beds": {
                "KING_BED": 0,
                "QUEEN_BED": 0,
                "DOUBLE_BED": 0,
                "SINGLE_BED": 0,
                "SOFA_BED": 0,
                "AIR_MATTRESS": 0,
                "BUNK_BED": 0
            },
            "name": "Default bedroom",
            "other": {
                "FLOOR_MATTRESS": 0,
                "WATER_BED": 0,
                "TODDLER_BED": 0,
                "CRIB": 0
            },
            "roomNumber": 1,
            "type": "BEDROOM"
        },
        {
            "_id": "650abb9734998c003b251257",
            "beds": {
                "KING_BED": 1,
                "QUEEN_BED": 0,
                "DOUBLE_BED": 0,
                "SINGLE_BED": 0,
                "SOFA_BED": 0,
                "AIR_MATTRESS": 0,
                "BUNK_BED": 0
            },
            "other": {
                "FLOOR_MATTRESS": 0,
                "WATER_BED": 0,
                "TODDLER_BED": 0,
                "CRIB": 1
            },
            "name": "Bedroom 1",
            "type": "BEDROOM",
            "accountId": "62a8a2be2e53190032102a6e",
            "unitTypeId": "64f03f9094d741004fda977d",
            "roomNumber": 2
        }
    ]
}

Editing a Room

Use this action to edit the name and type of space. To retrieve the supported room types, use List room-types.

Available Endpoints

Key Parameters

Path ParameterTypeDescriptionRequired
spaceIdstringThe ID of the space to edit.✔️
Body ParameterTypeDescriptionRequired
namestringName of the space. E.g., Living Room or Bedroom 1.
typestringRoom type. Can be either SHARED_SPACE or BEDROOM.
airbnb_room_idstringFor Airbnb listings only. Take this from Airbnb.

Example

This example transforms the shared space created earlier into a bedroom.

Request

curl --request PATCH 'https://open-api.guesty.com/v1/properties/spaces/space/650abc34c9da7b003a35dce9/details' \
--header 'accept: application/json; charset=utf-8' \
--header 'content-type: application/json' \
--data '
{
  "type": "BEDROOM",
  "name": "Bedroom 3"
}
'
var myHeaders = new Headers();
myHeaders.append("accept", "application/json; charset=utf-8");
myHeaders.append("content-type", "application/json");

var raw = JSON.stringify({
  "type": "BEDROOM",
  "name": "Bedroom 3"
});

var requestOptions = {
  method: 'PATCH',
  headers: myHeaders,
  body: raw,
  redirect: 'manual'
};

fetch("https://open-api.guesty.com/v1/properties/spaces/space/650abc34c9da7b003a35dce9/details", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://open-api.guesty.com/v1/properties/spaces/space/650abc34c9da7b003a35dce9/details',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => false,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PATCH',
  CURLOPT_POSTFIELDS =>'
{
  "type": "BEDROOM",
  "name": "Bedroom 3"
}
',
  CURLOPT_HTTPHEADER => array(
    'accept: application/json; charset=utf-8',
    'content-type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

import http.client
import json

conn = http.client.HTTPSConnection("open-api.guesty.com")
payload = json.dumps({
  "type": "BEDROOM",
  "name": "Bedroom 3"
})
headers = {
  'accept': 'application/json; charset=utf-8',
  'content-type': 'application/json'
}
conn.request("PATCH", "/v1/properties/spaces/space/650abc34c9da7b003a35dce9/details", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Response

{
    "unitTypeId": "64f03f9094d741004fda977d",
    "bedroomsAllowed": true,
    "spaces": [
        {
            "_id": "650abc34c9da7b003a35dce9",
            "beds": {
                "KING_BED": 0,
                "QUEEN_BED": 0,
                "DOUBLE_BED": 0,
                "SINGLE_BED": 0,
                "SOFA_BED": 1,
                "AIR_MATTRESS": 0,
                "BUNK_BED": 0
            },
            "other": {
                "FLOOR_MATTRESS": 0,
                "WATER_BED": 0,
                "TODDLER_BED": 0,
                "CRIB": 0
            },
            "name": "Bedroom 3",
            "type": "BEDROOM",
            "accountId": "62a8a2be2e53190032102a6e",
            "unitTypeId": "64f03f9094d741004fda977d",
            "roomNumber": 0
        },
        {
            "_id": "64f0427db4f3990038e25375",
            "accountId": "62a8a2be2e53190032102a6e",
            "unitTypeId": "64f03f9094d741004fda977d",
            "beds": {
                "KING_BED": 0,
                "QUEEN_BED": 0,
                "DOUBLE_BED": 0,
                "SINGLE_BED": 0,
                "SOFA_BED": 0,
                "AIR_MATTRESS": 0,
                "BUNK_BED": 0
            },
            "name": "Default bedroom",
            "other": {
                "FLOOR_MATTRESS": 0,
                "WATER_BED": 0,
                "TODDLER_BED": 0,
                "CRIB": 0
            },
            "roomNumber": 1,
            "type": "BEDROOM"
        },
        {
            "_id": "650abb9734998c003b251257",
            "beds": {
                "KING_BED": 1,
                "QUEEN_BED": 0,
                "DOUBLE_BED": 0,
                "SINGLE_BED": 0,
                "SOFA_BED": 0,
                "AIR_MATTRESS": 0,
                "BUNK_BED": 0
            },
            "other": {
                "FLOOR_MATTRESS": 0,
                "WATER_BED": 0,
                "TODDLER_BED": 0,
                "CRIB": 1
            },
            "name": "Bedroom 1",
            "type": "BEDROOM",
            "accountId": "62a8a2be2e53190032102a6e",
            "unitTypeId": "64f03f9094d741004fda977d",
            "roomNumber": 2
        }
    ]
}

Editing a Room's Beds

This request lets you update the bed types and number of beds within a space at a listing. To retrieve the supported bed types, use List bed-types.

Available Endpoints

Key Parameters

Path ParameterTypeDescriptionRequired
spaceIdstringThe ID of the space being edited.✔️
Body ParameterTypeDescriptionRequired
bedsobjectA list of the beds in the space. Refer to the Beds Object table above.
otherobjectA list of other bed types. Refer to the Other Object table above.

Other Object

Body ParameterTypeDescriptionRequired
FLOOR_MATTRESSnumberThe number of floor mattresses in the room.
WATER_BEDnumberThe number of water beds in the room.
TODDLER_BEDnumberThe number of toddler beds in the room.
CRIBnumberThe number of baby cribs in the room.

Example

This example continues on from the previous one. Bedroom 3 receives a double bed and the sofa bed is removed.

Request

curl 'https://open-api.guesty.com/v1/properties/spaces/space/650abc34c9da7b003a35dce9/edit' \
--header 'accept: application/json; charset=utf-8' \
--header 'content-type: application/json' \
--data '{
    "beds": {
        "DOUBLE_BED": 1,
        "SOFA_BED": 0
    }
}'
var myHeaders = new Headers();
myHeaders.append("accept", "application/json; charset=utf-8");
myHeaders.append("content-type", "application/json");

var raw = JSON.stringify({
  "beds": {
    "DOUBLE_BED": 1,
    "SOFA_BED": 0
  }
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'manual'
};

fetch("https://open-api.guesty.com/v1/properties/spaces/space/650abc34c9da7b003a35dce9/edit", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://open-api.guesty.com/v1/properties/spaces/space/650abc34c9da7b003a35dce9/edit',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => false,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "beds": {
        "DOUBLE_BED": 1,
        "SOFA_BED": 0
    }
}',
  CURLOPT_HTTPHEADER => array(
    'accept: application/json; charset=utf-8',
    'content-type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

import http.client
import json

conn = http.client.HTTPSConnection("open-api.guesty.com")
payload = json.dumps({
  "beds": {
    "DOUBLE_BED": 1,
    "SOFA_BED": 0
  }
})
headers = {
  'accept': 'application/json; charset=utf-8',
  'content-type': 'application/json'
}
conn.request("POST", "/v1/properties/spaces/space/650abc34c9da7b003a35dce9/edit", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Response

{
    "unitTypeId": "64f03f9094d741004fda977d",
    "bedroomsAllowed": true,
    "spaces": [
        {
            "_id": "650abc34c9da7b003a35dce9",
            "beds": {
                "KING_BED": 0,
                "QUEEN_BED": 0,
                "DOUBLE_BED": 1,
                "SINGLE_BED": 0,
                "SOFA_BED": 0,
                "AIR_MATTRESS": 0,
                "BUNK_BED": 0
            },
            "other": {
                "FLOOR_MATTRESS": 0,
                "WATER_BED": 0,
                "TODDLER_BED": 0,
                "CRIB": 0
            },
            "name": "Bedroom 3",
            "type": "BEDROOM",
            "accountId": "62a8a2be2e53190032102a6e",
            "unitTypeId": "64f03f9094d741004fda977d",
            "roomNumber": 0
        },
        {
            "_id": "64f0427db4f3990038e25375",
            "accountId": "62a8a2be2e53190032102a6e",
            "unitTypeId": "64f03f9094d741004fda977d",
            "beds": {
                "KING_BED": 0,
                "QUEEN_BED": 0,
                "DOUBLE_BED": 0,
                "SINGLE_BED": 0,
                "SOFA_BED": 0,
                "AIR_MATTRESS": 0,
                "BUNK_BED": 0
            },
            "name": "Default bedroom",
            "other": {
                "FLOOR_MATTRESS": 0,
                "WATER_BED": 0,
                "TODDLER_BED": 0,
                "CRIB": 0
            },
            "roomNumber": 1,
            "type": "BEDROOM"
        },
        {
            "_id": "650abb9734998c003b251257",
            "beds": {
                "KING_BED": 1,
                "QUEEN_BED": 0,
                "DOUBLE_BED": 0,
                "SINGLE_BED": 0,
                "SOFA_BED": 0,
                "AIR_MATTRESS": 0,
                "BUNK_BED": 0
            },
            "other": {
                "FLOOR_MATTRESS": 0,
                "WATER_BED": 0,
                "TODDLER_BED": 0,
                "CRIB": 1
            },
            "name": "Bedroom 1",
            "type": "BEDROOM",
            "accountId": "62a8a2be2e53190032102a6e",
            "unitTypeId": "64f03f9094d741004fda977d",
            "roomNumber": 2
        }
    ]
}