主题
查询外部联系人 3.5.5.Beta1+
接口说明
请求URL:http[s]://{网关地址}/minos-platform/outuser/get
请求方式: GET
请求内容类型: application/json
响应内容类型: application/json
请求说明
请求体
| 字段名 | 参数名 | 必填 | 类型 | 描述 |
|---|---|---|---|---|
| 用户名(账户) | userAccount | *M | String | 用户名(账户) 与otherId是映射关系,userAccount、otherId、phone不能同时为空或者三个都填写优先匹配规则是userAccount>otherId>phone |
| 校外编号 | otherId | *M | String | 校外编号,该用户在三方自身系统的登录标识(客户内唯一),与userAccount是映射关系, userAccount、otherId不能同时为空或者三者都填写优先匹配规则是userAccount>otherId>phone |
| 手机号3.6.1.SP6+ | phone | *M | String | 手机号,userAccount、otherId和phone不能同时为空或者三个都填写优先匹配规则是userAccount>otherId>phone 。 |
请求示例
json
{
"userAccount":"external00000022",
"otherId":"pang"
}1
2
3
4
2
3
4
响应说明
响应体
数据格式:
JSON
| 字段名 | 参数名 | 是否必填 | 类型 | 描述 |
|---|---|---|---|---|
| 返回码 | errcode | M | String | 0 成功,其他为不成功 |
| 返回码描述 | errmsg | O | String | 返回码描述 |
| 返回对象 | data | O | UserInfo | 返回的对象信息 |
| 字段名 | 参数名 | 是否必填 | 类型 | 描述 |
|---|---|---|---|---|
| 用户名(账户) | userAccount | M | String | 用户名(账户),在金智系统中唯一,与otherId是映射关系 |
| 三方id | otherId | O | String | 三方Id,该用户在三方自身系统的登录标识(客户内唯一),与userAccount是映射关系 |
| 人员姓名 | userName | M | String | 人员姓名 |
| 手机号 | phone | M | String | 手机号 |
| 身份证件类型代码 | certTypeId | O | String | 身份证件类型代码 0:居民身份证 1:护照 2:港澳台居民身份证 4:旅行证据 5:其他 |
| 身份证件号 | certCode | O | String | 身份证件号 |
| 身份分类code | categoryCode | M | String | 身份分类code |
| 工作单位 | workplace | O | String | 工作单位 |
| 责任部门code | departmentCode | O | String | 责任部门code |
| 有效期(开始) | startTime | M | String | 有效期(开始) |
| 有效期(结束) | endTime | M | String | 有效期(结束) |
| 离校年份 | leaveYear | O | String | 离校年份 格式为:yyyy |
| 离校部门code | leaveDepartmentCode | O | String | 离校部门code |
| 申请备注 | applyRemark | O | String | 申请备注 |
响应示例
json
{
"errcode": "0",
"errmsg": "success",
"traceId": "OpenV2Api_1085158621824122880",
"data": {
"wid": "1085157888127057920",
"userAccount": "external00000022",
"otherId": "pang",
"userName": "月半",
"phone": "161****0011",
"certTypeId": "0",
"certCode": "320115*********663",
"categoryCode": "10010000",
"workplace": "工作单位",
"departmentCode": "jg004",
"startTime": "2023-03-07 11:11",
"endTime": "2023-03-06 12:12",
"leaveYear": "2023",
"leaveDepartmentCode": "jg004",
"applyRemark": "申请备注"
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
错误码
| 错误码 | 描述 |
|---|---|
| 111001 | 必填参数不能为空 |
| 111002 | 请求参数格式错误 |
Demo
java
// 创建客户端
Client client = new DefaultClient(BASE_URL, APP_ID, APP_SECRET);
// 创建请求对象
OutUserGetRequest request = new OutUserGetRequest();
// request.setOtherId("outusertest001");
request.setPhone("15987654321");
BaseResponse response = client.execute(request);
//调用成功,则处理业务逻辑
if (response.isSuccess()) {
//.....
}
System.out.println(String.format("errcode:%s,errmsg:%s",response.getErrcode(),response.getErrmsg()));
System.out.println(response);
Assert.assertTrue(response.isSuccess());1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15

