Skip to content

批量查询薪资项

批量查询薪资项

请求

项目
HTTP URLhttps://open.feishu.cn/open-apis/compensation/v1/items
HTTP MethodGET
接口频率限制10 次/秒
支持的应用类型custom
权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用corehr:compensation_item:read 获取基础薪酬的薪资项信息

请求头

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

查询参数

名称类型必填描述
page_sizeint分页大小
示例值:100
默认值100
数据校验规则
- 取值范围:1500
page_tokenstring分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果
示例值:5234233214

响应

响应体

名称类型描述
codeint错误码,非 0 表示失败
msgstring错误描述
data\--
  └ itemsitem\[\]薪资项信息列表
    └ idstring薪资项ID
    └ namestring薪资项名称
    └ descriptionstring薪资项描述
    └ category_idstring薪资项分类ID,详细信息可以通过批量获取薪资项分类信息接口查询获得
    └ value_typestring薪资项数值类型
可选值有
- money: 金额 - number: 数值 - percent: 百分比
    └ pay_off_frequency_typestring发放频率
可选值有
- year: 年 - half_year: 半年 - quarterly: 季度 - bimonthly: 双月 - month: 月 - biweekly: 双周 - week: 周 - day: 日 - hour: 小时
    └ decimal_placesint小数位数
    └ active_statusint启用状态
可选值有
- 1: 启用 - 0: 禁用
    └ i18n_namesi18n_content\[\]多语言名称
      └ localestring语言版本,例如:“zh-CN”、“en-US”
      └ valuestring语言名称
    └ i18n_descriptionsi18n_content\[\]多语言描述
      └ localestring语言版本,例如:“zh-CN”、“en-US”
      └ valuestring语言名称
  └ page_tokenstring分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token
  └ has_moreboolean是否还有更多项

响应体示例

json
{
    "code": 0,
    "msg": "success",
    "data": {
        "items": [
            {
                "id": "7196951947268589113",
                "name": "基本月薪",
                "description": "每月份的薪酬",
                "category_id": "7196951947268589223",
                "value_type": "money",
                "pay_off_frequency_type": "month",
                "decimal_places": 2,
                "active_status": 1,
                "i18n_names": [
                    {
                        "locale": "zh_cn",
                        "value": "中文名称"
                    }
                ],
                "i18n_descriptions": [
                    {
                        "locale": "zh_cn",
                        "value": "中文名称"
                    }
                ]
            }
        ],
        "page_token": "1234452132",
        "has_more": true
    }
}

错误码

HTTP状态码错误码描述排查建议
5002290001server error服务端异常
4002290002param invalid参数异常
5002290003rpc fail下游服务异常

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