Skip to content

批量查询待入职信息

可通过本接口批量查询待入职人员信息,本接口不再推荐使用(个人信息相关数据不完整),请使用查询待入职接口获取更完整信息。

请求

项目
HTTP URLhttps://open.feishu.cn/open-apis/corehr/v1/pre_hires
HTTP MethodGET
接口频率限制1000 次/分钟、50 次/秒
支持的应用类型custom,isv
权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用 开启任一权限即可corehr:corehr:readonly 获取核心人事信息 corehr:pre_hire:read 查看待入职人员信息 corehr:corehr 更新核心人事信息 corehr:pre_hire:write 读写待入职人员信息

请求头

名称类型必填描述
Authorizationstringtenant_access_token 值格式:"Bearer access_token" 示例值:"Bearer t-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token

查询参数

名称类型必填描述
page_tokenstring分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果
示例值:1231231987
page_sizestring分页大小,最大值100,最小值 1
示例值:100
pre_hire_idsstring\[\]待入职ID列表,可通过搜索待入职接口获取
示例值:7140964208476371
数据校验规则
- 最大长度:10

响应

响应体

名称类型描述
codeint错误码,非 0 表示失败
msgstring错误描述
data\--
  └ itemspre_hire_query\[\]查询的待入职信息
    └ ats_application_idstring招聘投递 ID ,可以通过获取投递列表接口获取
    └ idstring待入职ID,可从待入职列表接口获取
    └ hire_datestring入职日期,格式:"YYYY-MM-DD"
    └ employee_typeenum雇佣类型
      └ enum_namestring枚举值
      └ displayi18n\[\]枚举多语展示
        └ langstring名称信息的语言
        └ valuestring名称信息的内容
    └ worker_idstring人员编号
    └ employee_type_idstring人员类型,可通过【批量查询人员类型】接口获取
    └ person_idstring个人信息 ID
    └ custom_fieldsobject_field_data\[\]自定义字段
      └ field_namestring字段名
      └ valuestring字段值,是json转义后的字符串,根据元数据定义不同,字段格式不同(如123, 123.23, "true", ["id1","id2"], "2006-01-02 15:04:05")
    └ onboarding_statusenum入职状态 - preboarding:待入职 - day_one:准备就绪 - completed:已完成 - withdrawn:已撤销 - deleted:已删除,对应的系统操作是将待入职人员回退至 Offer 沟通阶段
      └ enum_namestring枚举值
      └ displayi18n\[\]枚举多语展示
        └ langstring名称信息的语言
        └ valuestring名称信息的内容
    └ cost_center_ratesupport_cost_center_item\[\]成本中心分摊信息
      └ cost_center_idstring支持的成本中心id,详细信息可通过【搜索成本中心信息】接口查询获得
      └ rateint分摊比例
    └ work_email_listemail\[\]工作邮箱
      └ emailstring邮箱号
      └ is_primaryboolean是否为主要邮箱
      └ is_publicboolean是否为公开邮箱
      └ email_usageenum邮箱用途,枚举值可通过文档【飞书人事枚举常量】邮箱用途(email_usage)枚举定义获得
        └ enum_namestring枚举值
        └ displayi18n\[\]枚举多语展示
          └ langstring名称信息的语言
          └ valuestring名称信息的内容
      └ custom_fieldsobject_field_data\[\]自定义字段
        └ field_namestring字段名
        └ valuestring字段值,是json转义后的字符串,根据元数据定义不同,字段格式不同(如123, 123.23, "true", ["id1","id2"], "2006-01-02 15:04:05")
    └ department_idstring部门ID,可通过【批量查询部门】接口获取
  └ has_moreboolean是否还有更多项
  └ page_tokenstring分页标记,当 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状态码错误码描述排查建议
4001164005Tenant or operator not found入参不合法,请检查传入参数
4001164301Request param is invalid, pls check请求参数不合法,请检查传入参数
4001164401LookUp field is not a multi-LookUp查找类型的字段不合法(单值非多值),请检查传入参数
4001164402LookUp field is not a single-LookUp查找类型不合法(多值非单值),请检查传入参数
4001164403The record corresponding to the lookup field value does not exist被查询的记录不存在,请检查传入参数
4001164404LookUp field value query failed查询字段失败,请检查传入参数
4001164405LookUp field value type incorrect查询字段的类型不正确,请检查传入参数
4001164406Boolean type field type error传入的Boolean类型字段不合法,请检查传入参数
4001164407Text type field is not i18nText类型的字段不是i18N类型,请检查传入参数
4001164408Text type field value exceeds maximum lengthText类型的字段长度超限,请检查传入参数
4001164409Text type field is not stringText类型字段不是字符串,请检查传入参数
4001164410The format for i18n error类型转换为i18n时失败,请检查传入参数
4001164411The content for i18n errori18n类型的内容不合法,请检查传入参数
4001164412Enum fields type errors枚举类型错误,请检查传入参数
4001164413The number of digits is too long数字字段长度超限,请检查传入参数
4001164414Datetime field type errorDateTime字段不合法,请检查传入参数
4001164415Datetime field time type errorDateTime字段的时间不合法,请检查传入参数
4001164416Datetime field date type errorDateTime字段的日期不合法,请检查传入参数
4001164417Image field type error图片类型字段不合法,请检查传入参数
4001164418The fileID of the image field does not existFileID对应的图片不存在,请检查传入参数
4001164419The fileID of the attachment field does not existFileID对应的附件不存在,请检查传入参数
4001164420Attachment field type error附件类型字段不合法,请检查传入参数

内容来源:飞书开放平台 · 自动爬取整理