# 查询一次性支付授予记录

根据筛选条件查询一次性支付授予记录
**注意事项**：请求体中的多个筛选项为”且“的关系

## 请求

基本 | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/compensation/v1/lump_sum_payment/query
HTTP Method | POST
接口频率限制 | [10 次/秒](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
支持的应用类型 | Custom App
权限要求<br>**调用该 API 所需的权限。开启其中任意一项权限即可调用** | 一次性支付读权限(corehr:compensation.lump_sum_payment:read)
字段权限要求 | **注意事项**：该接口返回体中存在下列敏感字段，仅当开启对应的权限后才会返回；如果无需获取这些字段，则不建议申请<br>获取用户 user ID(contact:user.employee_id:readonly)<br>获取一次性支付的绑定期内离职信息(corehr:compensation_lump_sum_payment.binding_period_offboarding_type:read)<br>获取一次性支付的应退回金额（税后）(corehr:compensation_lump_sum_payment.return_amount_after_tax:read)<br>获取一次性支付的应退回金额（税前）(corehr:compensation_lump_sum_payment.return_amount_before_tax:read)<br>获取一次性支付金额的申请发放日期(corehr:compensation_lump_sum_payment_detail.belong_time:read)

### 请求头

名称 | 类型 | 必填 | 描述
---|---|---|---
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"

### 查询参数

名称 | 类型 | 必填 | 描述
---|---|---|---
page_size | int | 是 | 分页大小<br>**示例值**：10<br>**数据校验规则**：<br>- 取值范围：`1` ～ `500`
page_token | string | 否 | 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果<br>**示例值**：eVQrYzJBNDNONlk4VFZBZVlSdzlKdFJ4bVVHVExENDNKVHoxaVdiVnViQT0=
user_id_type | string | 是 | 用户 ID 类型<br>**示例值**：open_id<br>**可选值有**：<br>- open_id：标识一个用户在某个应用中的身份。同一个用户在不同应用中的 Open ID 不同。[了解更多：如何获取 Open ID](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-obtain-openid)<br>- union_id：标识一个用户在某个应用开发商下的身份。同一用户在同一开发商下的应用中的 Union ID 是相同的，在不同开发商下的应用中的 Union ID 是不同的。通过 Union ID，应用开发商可以把同个用户在多个应用中的身份关联起来。[了解更多：如何获取 Union ID？](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-obtain-union-id)<br>- user_id：标识一个用户在某个租户内的身份。同一个用户在租户 A 和租户 B 内的 User ID 是不同的。在同一个租户内，一个用户的 User ID 在所有应用（包括商店应用）中都保持一致。User ID 主要用于在不同的应用间打通用户数据。[了解更多：如何获取 User ID？](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-obtain-user-id)<br>- people_corehr_id：以people_corehr_id来识别用户<br>**默认值**：`open_id`<br>**当值为 `user_id`，字段权限要求**：<br>获取用户 user ID(contact:user.employee_id:readonly)

### 请求体

名称 | 类型 | 必填 | 描述
---|---|---|---
ids | string\[\] | 否 | 一次性支付记录 id，可通过本接口获取<br>**示例值**：["7337149697626801708"]<br>**数据校验规则**：<br>- 长度范围：`0` ～ `500`
unique_ids | string\[\] | 否 | 一次性支付记录 unique_id，unique_id 在创建时由上游指定<br>**示例值**：["7337149697626801708"]<br>**数据校验规则**：<br>- 长度范围：`0` ～ `500`
user_ids | string\[\] | 否 | 员工id，具体类型由入参中的 user_id_type 指定<br>**示例值**：["7337149697626801708"]<br>**数据校验规则**：<br>- 长度范围：`0` ～ `500`
item_ids | string\[\] | 否 | 薪酬项 id（通过[【查询薪酬项】](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/item/list)) 接口进行查询）<br>**示例值**：["7337149697626801708"]<br>**数据校验规则**：<br>- 长度范围：`0` ～ `500`
create_time_gte | string | 否 | 创建时间大于等于值（东八区）<br>**示例值**："2023-04-01 12:34:56"<br>**数据校验规则**：<br>- 长度范围：`0` ～ `255` 字符
create_time_lte | string | 否 | 创建时间小于等于（东八区）<br>**示例值**："2023-04-01 12:34:56"<br>**数据校验规则**：<br>- 长度范围：`0` ～ `255` 字符
modify_time_gte | string | 否 | 更新时间大于等于值（东八区）<br>**示例值**："2023-04-01 12:34:56"<br>**数据校验规则**：<br>- 长度范围：`0` ～ `255` 字符
modify_time_lte | string | 否 | 更新时间小于等于值（东八区）<br>**示例值**："2023-04-01 12:34:56"<br>**数据校验规则**：<br>- 长度范围：`0` ～ `255` 字符
company_ids | string\[\] | 否 | 合同主体 id（通过[【查询合同主体】](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/list) 接口进行查询）<br>**示例值**：["7337149697626801708"]<br>**数据校验规则**：<br>- 长度范围：`0` ～ `500`
service_company_ids | string\[\] | 否 | 任职公司 id（通过[【查询任职公司】](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/list) 接口进行查询）<br>**示例值**：["7337149697626801708"]<br>**数据校验规则**：<br>- 长度范围：`0` ～ `500`
department_ids | string\[\] | 否 | 部门 id（部门id仅支持people_corehr_department_id，通过[【查询部门】](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/batch_get)接口进行查询）<br>**示例值**：["7337149697626801708"]<br>**数据校验规则**：<br>- 长度范围：`0` ～ `500`
job_family_ids | string\[\] | 否 | 序列 id（通过 [【查询序列】](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/list)接口进行查询）<br>**示例值**：["7337149697626801708"]<br>**数据校验规则**：<br>- 长度范围：`0` ～ `500`
job_level_ids | string\[\] | 否 | 职级 id（通过 [【查询职级】](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/list)接口进行查询）<br>**示例值**：["7337149697626801708"]<br>**数据校验规则**：<br>- 长度范围：`0` ～ `500`
work_location_ids | string\[\] | 否 | 工作地点 id（通过 [【查询工作地点】](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/list) 接口进行查询）<br>**示例值**：["7337149697626801708"]<br>**数据校验规则**：<br>- 长度范围：`0` ～ `500`
employee_type_ids | string\[\] | 否 | 员工类型 id（可通过 [【查询员工类型】](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/list) 接口进行查询）<br>**示例值**：["7337149697626801708"]<br>**数据校验规则**：<br>- 长度范围：`0` ～ `500`
onboard_date_gte | string | 否 | 员工入职日期大于等于值<br>**示例值**："2023-04-01"<br>**数据校验规则**：<br>- 长度范围：`0` ～ `255` 字符
onboard_date_lte | string | 否 | 员工入职日期小于等于值<br>**示例值**："2023-04-01"<br>**数据校验规则**：<br>- 长度范围：`0` ～ `255` 字符
offboard_date_gte | string | 否 | 员工离职日期大于等于值<br>**示例值**："2023-04-01"<br>**数据校验规则**：<br>- 长度范围：`0` ～ `255` 字符
offboard_date_lte | string | 否 | 员工离职日期小于等于值<br>**示例值**："2023-04-01"<br>**数据校验规则**：<br>- 长度范围：`0` ～ `255` 字符

### 请求体示例
```json
{
    "ids": [
        "7337149697626801708"
    ],
    "unique_ids": [
        "7337149697626801708"
    ],
    "user_ids": [
        "7337149697626801708"
    ],
    "item_ids": [
        "7337149697626801708"
    ],
    "create_time_gte": "2023-04-01 12:34:56",
    "create_time_lte": "2023-04-01 12:34:56",
    "modify_time_gte": "2023-04-01 12:34:56",
    "modify_time_lte": "2023-04-01 12:34:56",
    "company_ids": [
        "7337149697626801708"
    ],
    "service_company_ids": [
        "7337149697626801708"
    ],
    "department_ids": [
        "7337149697626801708"
    ],
    "job_family_ids": [
        "7337149697626801708"
    ],
    "job_level_ids": [
        "7337149697626801708"
    ],
    "work_location_ids": [
        "7337149697626801708"
    ],
    "employee_type_ids": [
        "7337149697626801708"
    ],
    "onboard_date_gte": "2023-04-01",
    "onboard_date_lte": "2023-04-01",
    "offboard_date_gte": "2023-04-01",
    "offboard_date_lte": "2023-04-01"
}
```

## 响应

### 响应体

名称 | 类型 | 描述
---|---|---
code | int | 错误码，非 0 表示失败
msg | string | 错误描述
data | \- | \-
page_token | string | 分页标记，当 has_more 为 true 时，会同时返回新的 page_token，否则不返回 page_token
has_more | boolean | 是否还有更多项
records | lump_sum_payment\[\] | 一次性支付记录列表
id | string | 一次性支付记录id
unique_id | string | 外部幂等id，由上游业务自由决定
user_id | string | 员工id，具体类型由入参中的 user_id_type 指定
total_amount | string | 总金额，字符串表达的数字
binding_period | int | 绑定期，单位为月
currency_id | string | 币种id
issuance_frequency | int | 发放次数
item_id | string | 薪酬项id
remark | string | 备注
issuance_detail_text | i18n | 发放规则描述文本
zh_cn | string | 中文描述
en_us | string | 英文描述
apply_source | int | 申请来源<br>**可选值有**：<br>- 1：Offer薪酬创建<br>- 2：导入<br>- 3：调级调薪创建<br>- 4：填报创建<br>- 5：开放平台创建<br>- 6：招聘内推创建<br>- 7：自动化规则创建
return_amount_before_tax | string | 应退回金额（税前）<br>**字段权限要求**：<br>获取一次性支付的应退回金额（税前）(corehr:compensation_lump_sum_payment.return_amount_before_tax:read)
return_amount_after_tax | string | 应退回金额（税后）<br>**字段权限要求**：<br>获取一次性支付的应退回金额（税后）(corehr:compensation_lump_sum_payment.return_amount_after_tax:read)
binding_period_offboarding_type | string | 绑定期内离职类型<br>**可选值有**：<br>- yes：绑定期内离职<br>- no：绑定期外离职<br>- default：无绑定期离职标识<br>**字段权限要求**：<br>获取一次性支付的绑定期内离职信息(corehr:compensation_lump_sum_payment.binding_period_offboarding_type:read)
create_time | string | 创建时间
modify_time | string | 更新时间
reference_period_start_date | string | 所属期开始日期
reference_period_end_date | string | 所属期结束日期
details | lump_sum_payment_detail\[\] | 发放明细列表
id | string | 一次性支付记录明细id
record_id | string | 一次性支付记录id
user_id | string | 员工id，具体类型由入参中的 user_id_type 指定
issuance_amount | string | 一次性支付明细发放金额，可转数字的字符串
issuance_status | string | 发放状态<br>**可选值有**：<br>- to_be_issued：应发放<br>- not_issued：不发放
issuance_way | string | 发放方式<br>**可选值有**：<br>- with_salary：随工资发放<br>- with_cash：现金发放<br>- with_year_end_bonus：随年终奖发放
issuance_time | string | 发放日期
currency_id | string | 币种id
belong_time | string | 申请发放日期<br>**字段权限要求**：<br>获取一次性支付金额的申请发放日期(corehr:compensation_lump_sum_payment_detail.belong_time:read)
create_time | string | 创建时间
modify_time | string | 更新时间
issuance_country_region_id | string | 发放国家ID（可通过[查询国家/地区信息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-country_region/search)进行查询）
issuance_pay_group_id | string | 发放薪资组ID（可通过[获取薪资组基本信息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/paygroup/list)<br>进行查询）

### 响应体示例
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "page_token": "eVQrYzJBNDNONlk4VFZBZVlSdzlKdFJ4bVVHVExENDNKVHoxaVdiVnViQT0=",
        "has_more": true,
        "records": [
            {
                "id": "7397033607132351532",
                "unique_id": "7402510801304718380_7309316347007764012_7402523725868058156_1726070400000_10000",
                "user_id": "7337149697626801708",
                "total_amount": "2000.00",
                "binding_period": 2,
                "currency_id": "6863329932261459464",
                "issuance_frequency": 3,
                "item_id": "7411039006180312620",
                "remark": "备注",
                "issuance_detail_text": {
                    "zh_cn": "分2次发放，第1次发放于员工入职月，第2次发放于员工入职1月",
                    "en_us": "It will be issued in 2 installments. The first installment will be issued in the month when the employee joins the company, and the second installment will be issued one month after the employee joins."
                },
                "apply_source": 1,
                "return_amount_before_tax": "2000.00",
                "return_amount_after_tax": "2000.00",
                "binding_period_offboarding_type": "yes",
                "create_time": "2024-08-01 12:34:56",
                "modify_time": "2024-08-01 12:34:56",
                "reference_period_start_date": "2024-08-01",
                "reference_period_end_date": "2024-08-01",
                "details": [
                    {
                        "id": "7395133551102200876",
                        "record_id": "7395133551102168108",
                        "user_id": "7337149697626801708",
                        "issuance_amount": "2000.00",
                        "issuance_status": "to_be_issued",
                        "issuance_way": "with_salary",
                        "issuance_time": "2024-08-01",
                        "currency_id": "6863329932261459464",
                        "belong_time": "2025-01-20",
                        "create_time": "2024-08-01 12:34:56",
                        "modify_time": "2024-08-01 12:34:56",
                        "issuance_country_region_id": "6862995757234914824",
                        "issuance_pay_group_id": "6862995757234914824"
                    }
                ]
            }
        ]
    }
}
```

### 错误码

HTTP状态码 | 错误码 | 描述 | 排查建议
---|---|---|---
400 | 2290001 | param is invalid | 参数异常，请检查入参
500 | 2290002 | server error | 服务端异常，请稍后重试

