Query Room List

Last Updated on : 2023-05-22 06:38:13download

Query the list of rooms under a specified home.

API address

GET: /v1.0/homes/{home_id}/rooms

Request parameter

Parameter name Type IN Required Description
home_id Long uri true The ID of a home.

Return parameter

Parameter name Type Description
result HomeAndRoomsRes The list of rooms.

Description of result

Parameter name Type Description
home_id Long The ID of a home.
name String The name of a home.
lon Double The longitude of a home.
lat Double The latitude of a home.
geo_name String The detailed address.
rooms List The list of rooms.

Description of rooms

Parameter name Type Description
room_id Long The ID of a room.
name String The name of a room.

Request example

GET: GET /v1.0/homes/337403/rooms

Return example

{ "result": { "geo_name": "Hangzhou Grand Center", "home_id": 337403, "lat": 30.302553689454005, "lon": 120.0640923396687, "name": "Test Home" "rooms": [ { "name":"Living Room", "room_id": 587609 }, { "name":"Master Bedroom", "room_id": 587610 }, { "name": "Second Bedroom", "room_id": 587611 } ] }, "success": true, "t": 1611394597651 }

Error code

For more information, see error code.