# 恢复入职

通过本接口对指定已撤销的待入职员工执行恢复入职操作，对应入职管理页面恢复入职按钮

## 请求

基本 | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/corehr/v2/pre_hires/restore_flow_instance
HTTP Method | POST
接口频率限制 | [100 次/分钟](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
支持的应用类型 | Custom App、Store App
权限要求<br>**调用该 API 所需的权限。开启其中任意一项权限即可调用** | 恢复入职(corehr:pre_hire:restore_flow_instance)

### 请求头

名称 | 类型 | 必填 | 描述
---|---|---|---
Authorization | string | 是 | `tenant_access_token`<br>**值格式**："Bearer `access_token`"<br>**示例值**："Bearer t-7f1bcd13fc57d46bac21793a18e560"<br>[了解更多：如何选择与获取 access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)
Content-Type | string | 是 | **固定值**："application/json; charset=utf-8"

### 请求体

名称 | 类型 | 必填 | 描述
---|---|---|---
pre_hire_id | string | 是 | 待入职ID,可从[待入职列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/search)接口获取<br>**示例值**："7345005664477775407"
confirm_workforce | boolean | 否 | 是否强制占编；true为强制占编；false为非强制占编<br>**示例值**：false

### 请求体示例
```json
{
    "pre_hire_id": "7345005664477775407",
    "confirm_workforce": false
}
```

## 响应

### 响应体

名称 | 类型 | 描述
---|---|---
code | int | 错误码，非 0 表示失败
msg | string | 错误描述
data | \- | \-
success | boolean | 是否成功恢复入职

### 响应体示例
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "success": true
    }
}
```

### 错误码

HTTP状态码 | 错误码 | 描述 | 排查建议
---|---|---|---
400 | 1161001 | param is invalid | 请填写正确的参数
500 | 1161000 | Server system error | 系统出现问题，如需帮助，请咨询[技术支持](https://applink.feishu.cn/TLJpeNdW)。
503 | 1161204 | Requset timeout | 请求超时，请稍后重试
429 | 1161604 | QPS over limit | 接口请求过多，请稍后重试
400 | 1161116 | A conflict occurred as multiple people are operating at the same time. Please refresh the page and try again later. | 多人同时操作发生冲突，请稍后刷新页面后重试
400 | 1161097 | Permission denied, please contact the administrator. | 无权限操作，请联系管理员
400 | 1161105 | You don't have the permission to view the prehire, or the prehire does not exist | 无权限查看该待入职人员，或该待入职人员不存在
400 | 1161129 | Unable to submit this task as pre-hire is in the \"{{label}}\" stage. | 该待入职人员当前状态为「{{label}}」，无法进行此操作
400 | 1161063 | workforce has exceed | 校验中心，校验 & 预占编失败
400 | 1161034 | Incorrect work email format. Please fill in a valid email address. | 「工作邮箱」格式不正确，请填写有效邮箱
400 | 1161035 | Incorrect work email domain. | 「工作邮箱」域名错误
400 | 1161036 | Work email is duplicate with an active individual in the system. | 「工作邮箱」与系统中的在职人员重复
400 | 1161118 | Work email is duplicate with the existing mailbox in the Feishu business mailbox. | 工作邮箱与飞书企业邮箱中已存在的邮箱重复
400 | 1161119 | Work email is duplicate with an offboarded individual in the system, can be viewed in the Feishu Enterprise Mailbox Recycle Bin. | 工作邮箱与系统中的离职人员重复，可在飞书企业邮箱回收站中查看此邮箱
400 | 1161120 | Currently, there is no permission to edit the work email of the person being operated on. You can modify the address book settings by accessing the application permissions in the 'Feishu HR Application Management' interface within the 'Feishu Management Backend' | 暂无被操作人工作邮箱编辑权限，可在「飞书管理后台」的飞书人事应用管理界面，找到应用权限以修改通讯录设置
400 | 1161121 | Incorrect email format, work email need to be lowercase | 「工作邮箱」格式不正确，字母需为小写
400 | 1161122 | Incorrect email format, special character in work email | 「工作邮箱」格式不正确，存在特殊字符
400 | 1161123 | Incorrect email format | 「工作邮箱」格式不正确
400 | 1161124 | Incorrect email format, the total length of the email exceeds 20 characters | 「工作邮箱」格式不正确，总长度需小于等于 20 位
400 | 1161125 | Work email already exists in the account LDAP | 「工作邮箱」在账号 LDAP 已存在
400 | 1161126 | There are sensitive words in the email prefix | 邮箱前缀包含敏感词
400 | 1161127 | Duplicate with the existing mailbox | 与系统中已存在的邮箱重复

