批量查询待入职信息
可通过本接口批量查询待入职人员信息,本接口不再推荐使用(个人信息相关数据不完整),请使用查询待入职接口获取更完整信息。
请求
| 项目 | 值 |
|---|---|
| HTTP URL | https://open.feishu.cn/open-apis/corehr/v1/pre_hires |
| HTTP Method | GET |
| 接口频率限制 | 1000 次/分钟、50 次/秒 |
| 支持的应用类型 | custom,isv |
| 权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用 开启任一权限即可 | corehr:corehr:readonly 获取核心人事信息 corehr:pre_hire:read 查看待入职人员信息 corehr:corehr 更新核心人事信息 corehr:pre_hire:write 读写待入职人员信息 |
请求头
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Authorization | string | 是 | tenant_access_token 值格式:"Bearer access_token" 示例值:"Bearer t-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token |
查询参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
page_token | string | 否 | 分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果 示例值:1231231987 |
page_size | string | 是 | 分页大小,最大值100,最小值 1 示例值:100 |
pre_hire_ids | string\[\] | 否 | 待入职ID列表,可通过搜索待入职接口获取 示例值:7140964208476371 数据校验规则: - 最大长度: 10 |
响应
响应体
| 名称 | 类型 | 描述 |
|---|---|---|
code | int | 错误码,非 0 表示失败 |
msg | string | 错误描述 |
data | \- | - |
└ items | pre_hire_query\[\] | 查询的待入职信息 |
└ ats_application_id | string | 招聘投递 ID ,可以通过获取投递列表接口获取 |
└ id | string | 待入职ID,可从待入职列表接口获取 |
└ hire_date | string | 入职日期,格式:"YYYY-MM-DD" |
└ employee_type | enum | 雇佣类型 |
└ enum_name | string | 枚举值 |
└ display | i18n\[\] | 枚举多语展示 |
└ lang | string | 名称信息的语言 |
└ value | string | 名称信息的内容 |
└ worker_id | string | 人员编号 |
└ employee_type_id | string | 人员类型,可通过【批量查询人员类型】接口获取 |
└ person_id | string | 个人信息 ID |
└ custom_fields | object_field_data\[\] | 自定义字段 |
└ field_name | string | 字段名 |
└ value | string | 字段值,是json转义后的字符串,根据元数据定义不同,字段格式不同(如123, 123.23, "true", ["id1","id2"], "2006-01-02 15:04:05") |
└ onboarding_status | enum | 入职状态 - preboarding:待入职 - day_one:准备就绪 - completed:已完成 - withdrawn:已撤销 - deleted:已删除,对应的系统操作是将待入职人员回退至 Offer 沟通阶段 |
└ enum_name | string | 枚举值 |
└ display | i18n\[\] | 枚举多语展示 |
└ lang | string | 名称信息的语言 |
└ value | string | 名称信息的内容 |
└ cost_center_rate | support_cost_center_item\[\] | 成本中心分摊信息 |
└ cost_center_id | string | 支持的成本中心id,详细信息可通过【搜索成本中心信息】接口查询获得 |
└ rate | int | 分摊比例 |
└ work_email_list | email\[\] | 工作邮箱 |
└ email | string | 邮箱号 |
└ is_primary | boolean | 是否为主要邮箱 |
└ is_public | boolean | 是否为公开邮箱 |
└ email_usage | enum | 邮箱用途,枚举值可通过文档【飞书人事枚举常量】邮箱用途(email_usage)枚举定义获得 |
└ enum_name | string | 枚举值 |
└ display | i18n\[\] | 枚举多语展示 |
└ lang | string | 名称信息的语言 |
└ value | string | 名称信息的内容 |
└ custom_fields | object_field_data\[\] | 自定义字段 |
└ field_name | string | 字段名 |
└ value | string | 字段值,是json转义后的字符串,根据元数据定义不同,字段格式不同(如123, 123.23, "true", ["id1","id2"], "2006-01-02 15:04:05") |
└ department_id | string | 部门ID,可通过【批量查询部门】接口获取 |
└ has_more | boolean | 是否还有更多项 |
└ page_token | string | 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token |
响应体示例
json
{
"code": 0,
"msg": "success",
"data": {
"items": [
{
"ats_application_id": "4719168654814483759",
"id": "154545454",
"hire_date": "2020-01-01",
"employee_type": {
"enum_name": "type_1",
"display": [
{
"lang": "zh-CN",
"value": "张三"
}
]
},
"worker_id": "1245646",
"employee_type_id": "正式",
"person_id": "656464648662",
"custom_fields": [
{
"field_name": "name",
"value": "\"Sandy\""
}
],
"onboarding_status": {
"enum_name": "type_1",
"display": [
{
"lang": "zh-CN",
"value": "张三"
}
]
},
"cost_center_rate": [
{
"cost_center_id": "6950635856373745165",
"rate": 100
}
],
"work_email_list": [
{
"email": "12456@test.com",
"is_primary": true,
"is_public": true,
"email_usage": {
"enum_name": "type_1",
"display": [
{
"lang": "zh-CN",
"value": "张三"
}
]
},
"custom_fields": [
{
"field_name": "name",
"value": "\"Sandy\""
}
]
}
],
"department_id": "656464648662"
}
],
"has_more": true,
"page_token": "1234452132"
}
}错误码
| HTTP状态码 | 错误码 | 描述 | 排查建议 |
|---|---|---|---|
| 400 | 1164005 | Tenant or operator not found | 入参不合法,请检查传入参数 |
| 400 | 1164301 | Request param is invalid, pls check | 请求参数不合法,请检查传入参数 |
| 400 | 1164401 | LookUp field is not a multi-LookUp | 查找类型的字段不合法(单值非多值),请检查传入参数 |
| 400 | 1164402 | LookUp field is not a single-LookUp | 查找类型不合法(多值非单值),请检查传入参数 |
| 400 | 1164403 | The record corresponding to the lookup field value does not exist | 被查询的记录不存在,请检查传入参数 |
| 400 | 1164404 | LookUp field value query failed | 查询字段失败,请检查传入参数 |
| 400 | 1164405 | LookUp field value type incorrect | 查询字段的类型不正确,请检查传入参数 |
| 400 | 1164406 | Boolean type field type error | 传入的Boolean类型字段不合法,请检查传入参数 |
| 400 | 1164407 | Text type field is not i18n | Text类型的字段不是i18N类型,请检查传入参数 |
| 400 | 1164408 | Text type field value exceeds maximum length | Text类型的字段长度超限,请检查传入参数 |
| 400 | 1164409 | Text type field is not string | Text类型字段不是字符串,请检查传入参数 |
| 400 | 1164410 | The format for i18n error | 类型转换为i18n时失败,请检查传入参数 |
| 400 | 1164411 | The content for i18n error | i18n类型的内容不合法,请检查传入参数 |
| 400 | 1164412 | Enum fields type errors | 枚举类型错误,请检查传入参数 |
| 400 | 1164413 | The number of digits is too long | 数字字段长度超限,请检查传入参数 |
| 400 | 1164414 | Datetime field type error | DateTime字段不合法,请检查传入参数 |
| 400 | 1164415 | Datetime field time type error | DateTime字段的时间不合法,请检查传入参数 |
| 400 | 1164416 | Datetime field date type error | DateTime字段的日期不合法,请检查传入参数 |
| 400 | 1164417 | Image field type error | 图片类型字段不合法,请检查传入参数 |
| 400 | 1164418 | The fileID of the image field does not exist | FileID对应的图片不存在,请检查传入参数 |
| 400 | 1164419 | The fileID of the attachment field does not exist | FileID对应的附件不存在,请检查传入参数 |
| 400 | 1164420 | Attachment field type error | 附件类型字段不合法,请检查传入参数 |
