获取当前用户[运营端用户]的子用户列表

最近更新时间:9/30/2021, 9:48:12 AM作者:andrewren(任豪)

接口描述

接口请求域名:http://sp.{工业环境域名}

接口请求URL:http://sp.{工业环境域名}/iam/subaccounts

接口类型:非OpenAPI

接口请求方式:GET

接口Cookie:sp_access_token=xxx

访问时需要在cookie中携带sp_access_token。

本接口用于获取运营端用户的子账号列表。

输入参数

参数名称 必选 类型 描述
Limit Integer 返回条数限制
Offset Integer 返回页数限制
SearchKey String 根据昵称/联系邮箱/手机号查询用户信息
Role Integer 用户角色,10代表SP用户

输出参数

参数名称 类型 描述
Code Integer 错误码
Msg String 错误信息
Accounts Account 账号信息
Total Integer 总数

Account

参数名称 类型 描述
AccountId String 账号ID
AccountName String 账号名
RegisterType Integer 注册类型
Type Integer 账号类型
Role Integer 角色
NickName String 昵称
MasterId String 主账号ID
Status Integer 状态
ContactMail String 联系邮箱
ContactMobile String 联系手机

示例

示例1 请求例子

输入示例

Cookie: sp_access_token=xxx
GET http://sp.{工业环境域名}/iam/subaccounts?Limit=10&Offset=0&SearchKey=xxx&Role=10

输出示例

{
    "Code": 0,
    "Msg": "成功",
    "Accounts": [
        {
            "AccountId": "525373123722219293",
            "AccountName": "316577xxx@qq.com",
            "RegisterType": 0,
            "Type": 2,
            "Role": 10,
            "NickName": "richard",
            "MasterId": "10001",
            "Status": 2,
            "ContactMail": "316577xxx@qq.com",
            "ContactMobile": "13727042xxx"
        },
        {
            "AccountId": "526056503426158471",
            "AccountName": "13609749xxx@163.com",
            "RegisterType": 0,
            "Type": 2,
            "Role": 10,
            "NickName": "test01",
            "MasterId": "10001",
            "Status": 2,
            "ContactMail": "13609749xxx@163.com",
            "ContactMobile": "13609749xxx"
        }
    ],
    "Total": 2
}

错误码

以下仅列出了接口业务逻辑相关的错误码

错误码 描述