Query Home List

Last Updated on : 2024-01-11 05:58:21download

Based on the user ID, query the list of homes where the specified user belongs.

API address

GET: /v1.0/users/{uid}/homes

Request parameter

Parameter nameTypeINRequiredDescription
uidStringuritrueThe user ID.

Return parameter

Parameter nameTypeDescription
resultListThe returned result.

Description of result

Parameter nameTypeDescription
home_idLongThe home ID.
nameStringThe name of the specified home.
lonDoubleThe longitude.
latDoubleThe latitude.
geo_nameStringThe detailed address.
roleStringThe role.

Request example

GET: /v1.0/users/ay152896****0qLVPu/homes

Return example

{
    "tid": "5f9f26317d3811ee82c7664ef4d3e193",
    "result": [
        {
            "role": "OWNER",
            "lon": 120.06379847441336,
            "name": "My Home",
            "home_id": 1600008315,
            "lat": 30.302736025227816,
            "geo_name": "Hangzhou Grand Center"
        },
        {
            "role": "OWNER",
            "lon": 0,
            "name": "My Home 2",
            "home_id": 165000289,
            "lat": 0,
            "geo_name": ""
        }
    ],
    "t": 1699339157175,
    "success": true
}

Error code

For more information, see error code.