# 批量删除经常性支付记录

指定经常性支付记录ID，删除ID对应的经常性支付记录

## 请求

基本 | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/compensation/v1/recurring_payment/batch_remove
HTTP Method | POST
接口频率限制 | [10 次/秒](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
支持的应用类型 | Custom App
权限要求<br>**调用该 API 所需的权限。开启其中任意一项权限即可调用** | 经常性支付记录删除权限(corehr:compensation.recurring_payment:delete)

### 请求头

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

### 请求体

名称 | 类型 | 必填 | 描述
---|---|---|---
record_ids | string\[\] | 是 | 需要删除的记录ID（通过[【查询经常性支付记录】](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/recurring_payment/query) 接口进行查询）<br>**示例值**：["7397033607132351532"]<br>**数据校验规则**：<br>- 长度范围：`0` ～ `500`
reason | string | 否 | 原因<br>**示例值**："删除错误创建的数据"

### 请求体示例
```json
{
    "record_ids": [
        "7397033607132351532"
    ],
    "reason": "删除错误创建的数据"
}
```

## 响应

### 响应体

名称 | 类型 | 描述
---|---|---
code | int | 错误码，非 0 表示失败
msg | string | 错误描述
data | \- | \-
operate_results | recurring_payment_operate_result\[\] | 每条记录的操作结果
id | string | 操作记录的id
unique_id | string | 操作的记录的 unique_id
code | int | 操作结果状态码<br>**可选值有**：<br>- 0："Success" 操作成功<br>- 21280001："The format of the single payment amount is incorrect" 单次发放金额格式不正确<br>- 21280002："The format of the distribution start time is incorrect" 发放开始时间格式不正确<br>- 21280003："The format of the issuance end time is incorrect" 发放结束时间格式不正确<br>- 21270304："No permission for recurring payment record" 没有该经常性支付记录权限<br>- 21270305："The recurring payment type salary item does not exist" 经常性支付类型薪酬项不存在<br>- 21270306："The currency does not exist" 币种不存在<br>- 21270307："The distribution method does not exist" 发放方式不存在<br>- 21270308："The distribution start time is greater than the distribution end time" 发放开始时间大于发放结束时间<br>- 21270309："Employees are not covered by the remuneration rules" 员工不在薪酬项规则适用范围之内<br>- 21270310："The payment method does not match the salary item rules" 发放方式不匹配薪酬项规则<br>- 21270311："Currency mismatch compensation item rules" 币种不匹配薪酬项规则<br>- 21270312："The distribution start date is earlier than the current date and cannot be deleted" 发放开始日期早于当前日期不可删除<br>- 21270313："The recurring payment record does not exist" 该经常性支付记录不存在<br>- 21270314："Payment frequency does not match the salary item" 发放频率不匹配薪酬项
message | string | 操作结果描述

### 响应体示例
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "operate_results": [
            {
                "id": "7390583861280556588",
                "unique_id": "7390583861280556588",
                "code": 21270202,
                "message": "unique id conflict"
            }
        ]
    }
}
```

### 错误码

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

