获取当前用户[租户端用户]的子帐号列表

最近更新时间:9/29/2021, 9:14:32 PM作者:andrewren(任豪)

接口描述

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

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

接口类型:非OpenAPI

接口请求方式:GET

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

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

输入参数

Cookie: access_token=xxx
字段 类型 说明
Limit Query 返回条数限制
Offset Query 返回页数限制
SearchKey Query 根据昵称/联系邮箱/手机号查询用户信息
Role Query 用户角色,10代表SP用户

输出参数

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

Account

字段名 字段类型 字段描述
NickName String 昵称,用户名
Type Integer 账号类型,1:主账户 2:子账户
Role Integer 用户角色,0:普通用户 1:CP服务商 10:SP运营商 20:客户经理
Status Integer
AccountId Long 账号ID
MasterId Long 主账户AccountId
AccountName String 账户名,主账户登录邮箱, 子账户的创建名
ContactMail String 联系邮箱
ContactMobile String 联系手机

示例

示例1 请求例子

输入示例

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

输出示例

{
  "Code": 0,
  "Msg": "成功",
  "Total": 2,
  "sub_accounts": [
    {
      "AccountId": "526233914818170870",
      "AccountName": "331844xxx@qq.com",
      "RegisterType": 1,
      "AppId": 0,
      "NickName": "3318444",
      "Type": 1,
      "Role": 1,
      "Strategy": 20,
      "MasterId": "526233914818170870",
      "Status": 2,
      "ContactMailStatus": 2,
      "ContactMail": "331844xxx@qq.com",
      "ContactMobileStatus": 0,
      "ContactMobile": "1852092xxxx",
      "WxBindStatus": 1,
      "WxOpenId": "ofimgw5dD-DLCtiPrF4Pr6xxxx",
      "WxNickName": "jake",
      "AuthType": 1,
      "AuthStatus": 2,
      "AuthId": "526237206298234870",
      "IsAuthMod": 0,
      "ModAuthType": 0,
      "ModAuthId": "0",
      "CorpName": "",
      "MailBindStatus": 0,
      "WorkWxBindStatus": 0,
      "WorkWxUserId": "",
      "WorkWxCorpId": "",
      "MiniProgramBindStatus": 0,
      "MasterIsCp": false,
      "DeletedAt": "0001-01-01T00:00:00Z",
      "AuthTime": 0
    },
    {
      "AccountId": "526958957332270991",
      "AccountName": "kamfai",
      "RegisterType": 2,
      "AppId": 0,
      "NickName": "kamfai",
      "Type": 2,
      "Role": 0,
      "Strategy": 21,
      "MasterId": "526233914818170870",
      "Status": 2,
      "ContactMailStatus": 0,
      "ContactMail": "",
      "ContactMobileStatus": 0,
      "ContactMobile": "",
      "WxBindStatus": 0,
      "WxOpenId": "",
      "WxNickName": "",
      "AuthType": 0,
      "AuthStatus": 0,
      "AuthId": "0",
      "IsAuthMod": 0,
      "ModAuthType": 0,
      "ModAuthId": "0",
      "CorpName": "",
      "MailBindStatus": 0,
      "WorkWxBindStatus": 0,
      "WorkWxUserId": "",
      "WorkWxCorpId": "",
      "MiniProgramBindStatus": 0,
      "MasterIsCp": false,
      "DeletedAt": "0001-01-01T00:00:00Z",
      "AuthTime": 0
    }
  ]
}

错误码

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

错误码 描述