批量更正经常性支付记录
批量更正经常性支付记录
请求
| 项目 | 值 |
|---|---|
| HTTP URL | https://open.feishu.cn/open-apis/compensation/v1/recurring_payment/batch_update |
| HTTP Method | POST |
| 接口频率限制 | 10 次/秒 |
| 支持的应用类型 | custom |
| 权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用 | corehr:compensation.recurring_payment:update 经常性支付记录更新权限 |
| 字段权限要求 | > Tip: 该接口返回体中存在下列敏感字段,仅当开启对应的权限后才会返回;如果无需获取这些字段,则不建议申请 contact:user.employee_id:readonly 获取用户 user ID |
请求头
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Authorization | string | 是 | tenant_access_token 值格式:"Bearer access_token" 示例值:"Bearer t-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token |
| Content-Type | string | 是 | 固定值:"application/json; charset=utf-8" |
查询参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
user_id_type | string | 否 | 用户 ID 类型 示例值:open_id 可选值有: - open_id: 标识一个用户在某个应用中的身份。同一个用户在不同应用中的 Open ID 不同。了解更多:如何获取 Open ID - union_id: 标识一个用户在某个应用开发商下的身份。同一用户在同一开发商下的应用中的 Union ID 是相同的,在不同开发商下的应用中的 Union ID 是不同的。通过 Union ID,应用开发商可以把同个用户在多个应用中的身份关联起来。了解更多:如何获取 Union ID? - user_id: 标识一个用户在某个租户内的身份。同一个用户在租户 A 和租户 B 内的 User ID 是不同的。在同一个租户内,一个用户的 User ID 在所有应用(包括商店应用)中都保持一致。User ID 主要用于在不同的应用间打通用户数据。了解更多:如何获取 User ID? - people_corehr_id: 以people_corehr_id来识别用户默认值: open_id当值为 user_id,字段权限要求: contact:user.employee_id:readonly 获取用户 user ID |
请求体
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
records | recurring_payment_for_update\[\] | 否 | 需更正的经常性支付记录 数据校验规则: - 长度范围: 0 ~ 500 |
└ id | string | 是 | 经常性支付记录id 示例值:"7397033607132351532" 数据校验规则: - 长度范围: 0 ~ 255 字符 |
└ each_amount | string | 是 | 每次发放金额 示例值:"10.00" 数据校验规则: - 长度范围: 0 ~ 255 字符 |
└ start_date | string | 是 | 发放开始时间 示例值:"2024-10-20" 数据校验规则: - 长度范围: 0 ~ 255 字符 |
└ end_date | string | 是 | 发放结束时间 示例值:"2025-03-20" 数据校验规则: - 长度范围: 0 ~ 255 字符 |
└ currency_id | string | 是 | 币种 id(通过【查询币种】) 接口进行查询) 示例值:"6863329932261459464" 数据校验规则: - 长度范围: 0 ~ 255 字符 |
└ issuance_type | string | 是 | 发放方式 示例值:"with_salary" 可选值有: - with_salary: 随工资发放 - with_cash: 现金发放 - with_physical_distribution: 实物发放 - with_year_end_bonus: 随年终奖发放 |
└ remark | string | 否 | 原因 示例值:"这是个备注" 数据校验规则: - 长度范围: 0 ~ 3000 字符 |
└ issuance_country_region_id | string | 否 | 发放国家id(可通过 https://open.larkoffice.com/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-country_region/search进行查询) 示例值:"6862995745046267400" 数据校验规则: - 长度范围: 0 ~ 255 字符 |
请求体示例
json
{
"records": [
{
"id": "7397033607132351532",
"each_amount": "10.00",
"start_date": "2024-10-20",
"end_date": "2025-03-20",
"currency_id": "6863329932261459464",
"issuance_type": "with_salary",
"remark": "这是个备注",
"issuance_country_region_id": "6862995745046267400"
}
]
}响应
响应体
| 名称 | 类型 | 描述 |
|---|---|---|
code | int | 错误码,非 0 表示失败 |
msg | string | 错误描述 |
data | \- | - |
└ operate_results | recurring_payment_operate_result\[\] | 每条记录的操作结果 |
└ id | string | 操作记录的id |
└ unique_id | string | 操作的记录的 unique_id |
└ code | int | 操作结果状态码 可选值有: - 0: "Success" 操作成功 - 21280001: "The format of the single payment amount is incorrect" 单次发放金额格式不正确 - 21280002: "The format of the distribution start time is incorrect" 发放开始时间格式不正确 - 21280003: "The format of the issuance end time is incorrect" 发放结束时间格式不正确 - 21270304: "No permission for recurring payment record" 没有该经常性支付记录权限 - 21270305: "The recurring payment type salary item does not exist" 经常性支付类型薪酬项不存在 - 21270306: "The currency does not exist" 币种不存在 - 21270307: "The distribution method does not exist" 发放方式不存在 - 21270308: "The distribution start time is greater than the distribution end time" 发放开始时间大于发放结束时间 - 21270309: "Employees are not covered by the remuneration rules" 员工不在薪酬项规则适用范围之内 - 21270310: "The payment method does not match the salary item rules" 发放方式不匹配薪酬项规则 - 21270311: "Currency mismatch compensation item rules" 币种不匹配薪酬项规则 - 21270312: "The distribution start date is earlier than the current date and cannot be deleted" 发放开始日期早于当前日期不可删除 - 21270313: "The recurring payment record does not exist" 该经常性支付记录不存在 - 21270314: "Payment frequency does not match the salary item" 发放频率不匹配薪酬项 - 21270315: "The distribution start date and end date overlap" 发放开始日期和结束日期有重叠 - 21270316: "Issuing country is empty" 发放国家为空 - 21270317: "Issuing country does not exist" 发放国家不存在 - 21270318: "The single payment amount cannot be 0" 单次发放金额不允许为0 |
└ message | string | 操作结果描述 |
响应体示例
json
{
"code": 0,
"msg": "success",
"data": {
"operate_results": [
{
"id": "7390583861280556588",
"unique_id": "7390583861280556588",
"code": 21270202,
"message": "uqniue id conflict"
}
]
}
}错误码
| HTTP状态码 | 错误码 | 描述 | 排查建议 |
|---|---|---|---|
| 400 | 2290001 | param is invalid | 参数异常 |
| 500 | 2290002 | server error | 服务端异常 |
