# Delete vacation grant records

Delete the issuance records in the Feishu personnel leave system, Leave Management - Leave Management - [Issuance Records](https://example.feishu.cn/people/workforce-management/manage/leave/leave_admin/granting_record) (only supports deleting records where the source of issuance is "manual issuance" or "external system issuance").

**Notice**：Only available on Feishu CoreHR.

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id
HTTP Method | DELETE
Rate Limit | [1000 per minute、50 per second](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
Supported app types | Custom App、Store App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.**<br>Enable any scope from the list | Update leave granting records(corehr:leave_granting_record:write)<br>Update core HR information(corehr:corehr)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer t-7f1bcd13fc57d46bac21793a18e560"<br>[How to choose and get access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)

### Path parameters

Parameter | Type | Description
---|---|---
leave_granting_record_id | string | Vacation Issuance Record ID, which can be obtained from [Create Vacation Issuance Record](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave_granting_record/create)<br>**Example value**: "6893014062142064135"

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-

### Response body example
```json
{
    "code": 0,
    "msg": "success",
    "data": {}
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
400 | 1160001 | No tenant ID | No tenant ID
400 | 1160002 | Invalid granting unit | Invalid granting unit
400 | 1160003 | Invalid effective date | Invalid effective date
400 | 1160004 | Invalid granting quantity | Invalid granting quantity
400 | 1160005 | Accessed data object not found | Accessed data object not found,please check leaveTypeID
400 | 1160006 | Employment not found | Employment not found,please check employmentID
400 | 1160007 | Leave plan version not found | Leave plan version not found
400 | 1160008 | Error occurred while checking if the employee is eligible for the vacation plan | Error occurred while checking if the employee is eligible for the vacation plan
400 | 1160009 | Accrual rule not found | Accrual rule not found
400 | 1160010 | Granting record already exists | Granting record already exists
500 | 1160011 | Error occurred when getting employment information | Error occurred when getting employment information
500 | 1160012 | An exception occurs in the database | Please contact [technical support](https://applink.feishu.cn/TLJpeNdW).
500 | 1160013 | Error occurred while checking if the employee is eligible for the vacation plan. | Error occurred while checking if the employee is eligible for the vacation plan.
500 | 1160014 | Error occurred when calculate accrual record | Error occurred when calculate accrual record
400 | 1160024 | There is a subclass for the leave type, but the subclass ID has not been passed | There is a subclass for the leave type, but the subclass ID has not been passed
400 | 1160025 | The granting quantity range is from -9999 to 9999 | The granting quantity range is from -9999 to 9999
400 | 1160026 | The number of decimal places of the granted quantity cannot exceed 6 | The number of decimal places of the granted quantity cannot exceed 6
400 | 1160027 | The length of the granting reason cannot exceed 3000 | The length of the granting reason cannot exceed 3000
500 | 1160028 | There is an error in the unit conversion configuration in the granting rule | There is an error in the unit conversion configuration in the granting rule
400 | 1160029 | The leave type has been deactivated | The leave type has been deactivated
500 | 1169999 | Unknown error | Please contact [technical support](https://applink.feishu.cn/TLJpeNdW).
500 | 1160015 | Internal error | Please contact [technical support](https://applink.feishu.cn/TLJpeNdW).
400 | 1160016 | Invalid param | Check against the imported parameters of the interface document, whether the parameters are missed, the format is wrong, etc. (for example, the numerical parameters pass letters, the date format is wrong, etc.)
400 | 1160017 | User not found | User not found
500 | 1160018 | Invalid leave balance calculate Conf | Invalid leave balance calculate Conf
500 | 1160019 | The calculation result of leave balance is empty | The calculation result of leave balance is empty
400 | 1160020 | When calculating the leave balance, there is no leave plan version that matches the employee | When calculating the leave balance, there is no leave plan version that matches the employee
400 | 1160021 | For the leave type that is not granted according to the cycle, balance calculation is not supported | For the leave type that is not granted according to the cycle, balance calculation is not supported
400 | 1160022 | The data of the leave plan version is invalid | The data of the leave plan version is invalid
500 | 1160023 | Error occurred when calculating the leave balance | Error occurred when calculating the leave balance
400 | 1160030 | The length of the granted unique ID cannot exceed 64 | The length of the granted unique ID cannot exceed 64
400 | 1160031 | This granting record cannot be edited or deleted | This granting record cannot be edited or deleted
400 | 1160032 | The expiration time of this granting record is invalid | The expiration time of this granting record is invalid
400 | 1160033 | The effective date is after the granting date | The effective date is after the granting date
400 | 1160034 | The expiration date format is incorrect | The expiration date format is incorrect
400 | 1160035 | No permission to access the employee data | No permission to access the employee data

