English
English
简体中文
Contact Us
Register
Log In

Query Room List

Last Updated on : 2023-06-20 15:35:48download

Query the list of rooms under a specified home.

API address

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

Request parameter

Parameter nameTypeINRequiredDescription
home_idLonguritrueThe ID of a home.

Return parameter

Parameter nameTypeDescription
resultHomeAndRoomsResThe list of rooms.

Description of result

Parameter nameTypeDescription
home_idLongThe ID of a home.
nameStringThe name of a home.
lonDoubleThe longitude of a home.
latDoubleThe latitude of a home.
geo_nameStringThe detailed address.
roomsListThe list of rooms.

Description of rooms

Parameter nameTypeDescription
room_idLongThe ID of a room.
nameStringThe 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.