Query User Information on Pages

Last Updated on : 2023-06-20 15:20:09download

Query the list of users based on the user ID list and merchant code.

API address

GET: /v1.1/iot-02/users

Request parameter

Parameter nameTypeINRequiredDescription
query_user_requestQueryUserRequestqueryfalseThe query criteria.
last_row_keyStringqueryfalseThe row key of the last entry on each page.
page_sizeIntegerqueryfalseThe number of items to be returned per page.

Description of query_user_request

Parameter nameTypeINRequiredDescription
user_nick_nameString falseThe nickname of a specified user.
user_idsString falseThe list of user IDs.
user_namesString falseThe list of account names.

Return parameter

Parameter nameTypeDescription
resultQueryMerUsersResponseThe returned result.

Description of result

Parameter nameTypeDescription
listListThe list of users.
last_row_keyStringThe row key of the last entry on each page.
page_sizeIntegerThe number of items to be returned per page.
has_nextBooleanSpecifies whether to return the next page.

Description of list

Parameter nameTypeDescription
user_nameStringThe username.
country_codeStringThe country code.
user_idStringTuya user ID.
user_nick_nameStringThe nickname of a specified user.
account_typeIntegerThe account type.
create_timeLongThe time when it is created.
tenant_codeStringThe code of a specified tenant.

Request example

GET: /v1.1/iot-02/users?merchantCode=****12323&last_row_key=xxid&page_size=20

Return example

{
    "result": {
        "last_row_key": "1480****472",
        "list": [
            {
                "create_time": 1641796814496,
                "user_name": "userFgMU",
                "user_nick_name": "abc",
                "country_code": "86",
                "user_id": "bay1****O7eE",
                "tenant_code": "aym0****1426"
            }
        ],
        "has_next": false,
        "page_size": 10
    },
    "t": 1641796817818,
    "success": true
}

Error code

For more information, see error code.