员工身份(EIAM)
 修改用户兼职兼岗
   接口
 # 权限
身份管理API是以应用维度授权的,在调用接口前需为不同的应用设置接口权限,详情请参考API权限。
| 权限代码 | 描述 | 
|---|---|
| user_all | 用户管理接口的读写权限 | 
| all | 全部接口读写权限 | 
# 请求说明
PUT https://{your_domain}/api/v2/tenant/users/{user_id}/part-time-job/{job_id}
# 请求头
| 参数名 | 中文名称 | 必须 | 类型 | 描述 | 
|---|---|---|---|---|
| Authorization | 授权 | 是 | String | 格式:Bearer {access_token} | 
| Content-Type | 内容类型 | 是 | String | 固定值:application/json; charset=utf-8 | 
# 请求示例
{
    "org_code": "10000",
    "position_code": "IDaaS_Java_Developer",
    "title_code": "Senior_Engineer"
}
1
2
3
4
5
2
3
4
5
根据请求的用户ID参数修改用户的兼职兼岗信息。
# 请求参数
| 参数名 | 中文名称 | 必须 | 类型 | 描述 | 
|---|---|---|---|---|
| user_id | 用户id | 是 | String | 要修改的用户ID | 
| job_id | 兼职兼岗id | 是 | String | 要修改的兼职兼岗ID | 
| org_code | 组织编码 | 是 | String | 兼职机构编码 | 
| position_code | 职位编码 | 否 | String | 兼任职位,不传递此参数则置空 | 
| title_code | 职务编码 | 否 | String | 兼任职务,不传递此参数则置空 | 
# 返回示例
成功示例:
HTTP/1.1 200 OK
Content-Type: application/json
{
  "job_id": "20201028102749564-9082-DC8CD2722"
}
错误示例:
HTTP/1.1 400 Bad Request
{
  "error_msg": "用户不存在",
  "error_code": "USER.0001"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
# 返回参数
| 参数名 | 中文名称 | 类型 | 描述 | 
|---|---|---|---|
| job_id | 兼职id | String | 
# 错误码
| 状态码 | 错误码 | 错误信息 | 处理措施 | 
|---|---|---|---|
| 400 | ENT.CONFIG.0031 | 任职管理功能未开启,请先开启此功能 | 请先在企业中心开启任职管理 | 
| The job management function is not enabled, please enable this function first | |||
| 400 | ORG.0001 | 组织不存在 | 请检查对应组织是否存在 | 
| Organization does not exist | |||
| 400 | JOB.POSITION.0001 | 职位不存在 | 请检查对应职位是否存在 | 
| Position does not exist | |||
| 400 | JOB.TITLE.0001 | 职务不存在 | 请检查对应职务是否存在 | 
| Job title does not exist | |||
| 400 | USER.0001 | 用户不存在 | 请检查对应用户是否存在 | 
| User does not exist | |||
| 400 | USER.0093 | 用户任职信息不存在 | 请检查对应岗位是否存在 | 
| The user's employment information does not exist | |||
| 400 | USER.0094 | 用户任职信息中的组织不能为空 | 请填写岗位信息中的组织 | 
| The organization in the user's employment information cannot be empty | |||
| 400 | USER.0095 | 用户任职信息中的职位不能为空 | 请填写岗位信息中的职位 | 
| The position in the user's employment information cannot be empty | |||
| 400 | USER.0096 | 用户任职信息中的职务不能为空 | 请填写岗位信息中的职务 | 
| The job title in the user's employment information cannot be empty | |||
| 400 | USER.0097 | 用户任职信息中的职位不在所选组织下 | 请检查岗位信息中的职职位是否在对对应的组织下 | 
