文档中心 > API类目 > 智慧园区API

alibaba.campus.core.employee.byaccountids.get (通过PassportId列表查询入驻公司员工信息)

根据用户ID和公司ID获取员工信息列表

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
work_bench_context WorkBenchContext 可选 平台权限统一校验
  • └ system_id
  • String
  • 可选
  • 1
  • 系统id
  • └ company_id
  • Number
  • 可选
  • 1
  • 公司id
  • └ campus_id
  • Number
  • 可选
  • 1
  • 园区id
account_ids String 必须 1,2,3 需要查询的员工信息id,查多个员工以“,”分割

响应参数

名称 类型 示例值 描述
result CollectionResult result CollectionResult
  • contents
  • Content []
  • content
  • 员工信息
  • └ is_deleted
  • Boolean
  • n
  • 删除标记位
  • └ dept_id
  • Number
  • 321
  • 部门Id
  • └ avatar
  • String
  • www
  • 头像
  • └ nick_name
  • String
  • 小明
  • 昵称
  • └ work_no
  • String
  • 231546
  • 工号
  • └ name
  • String
  • 张明
  • 姓名
  • └ company_id
  • Number
  • 29
  • 公司Id
  • └ employee_id
  • Number
  • 234541
  • 员工Id
  • └ account_id
  • Number
  • 487123
  • passportId
  • └ company_name
  • String
  • 测试公司
  • 员工所在公司名称
  • └ dept_name
  • String
  • 研发部
  • 员工所在部门
  • └ sex
  • String
  • M
  • 性别
  • └ position
  • String
  • 经理
  • 职位
  • └ super_emp_id
  • Number
  • 231456
  • 上司Id
  • └ mobile
  • String
  • 13212341234
  • 手机号码
  • └ total_count
  • Number
  • 123
  • 1
  • └ request_id
  • String
  • 1
  • 1
  • └ error_code
  • String
  • 1
  • 1
  • └ error_msg
  • String
  • 1
  • 1
  • └ success
  • Boolean
  • false
  • 1
  • └ error_level
  • String
  • 1
  • 1
  • └ error_ext_info
  • String
  • 1
  • 1

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCampusCoreEmployeeByaccountidsGetRequest req = new AlibabaCampusCoreEmployeeByaccountidsGetRequest();
AlibabaCampusCoreEmployeeByaccountidsGetRequest.WorkBenchContext obj1 = new AlibabaCampusCoreEmployeeByaccountidsGetRequest.WorkBenchContext();
obj1.setSystemId("1");
obj1.setCompanyId(1L);
obj1.setCampusId(1L);
req.setWorkBenchContext(obj1);
req.setAccountIds("1,2,3");
AlibabaCampusCoreEmployeeByaccountidsGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_campus_core_employee_byaccountids_get_response>
    <result>
        <contents>
            <content>
                <is_deleted>n</is_deleted>
                <dept_id>321</dept_id>
                <avatar>www</avatar>
                <nick_name>小明</nick_name>
                <work_no>231546</work_no>
                <name>张明</name>
                <company_id>29</company_id>
                <employee_id>234541</employee_id>
                <account_id>487123</account_id>
                <company_name>测试公司</company_name>
                <dept_name>研发部</dept_name>
                <sex>M</sex>
                <position>经理</position>
                <super_emp_id>231456</super_emp_id>
                <mobile>13212341234</mobile>
            </content>
        </contents>
        <total_count>123</total_count>
        <request_id>1</request_id>
        <error_code>1</error_code>
        <error_msg>1</error_msg>
        <success>false</success>
        <error_level>1</error_level>
        <error_ext_info>1</error_ext_info>
    </result>
</alibaba_campus_core_employee_byaccountids_get_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部