API Call Description
This API updates a leave balance by adding to or subtracting from the existing balance. It does not affect the leave quota that the employee has already used. The following example illustrates the process:- Call the Add leave rules API to create a standard leave type. Then call the Initialize leave balance API to set the initial balance to 8 days.
- Call this API to update John’s leave balance with quota_num_per_day set to 900. The resulting record adds 1 day to the existing balance.
- John submits a leave request Approval form of this leave type in DingTalk for 2 days. A record that deducts 2 days is generated.
- Call this API to update John’s leave balance with quota_num_per_day set to 1000. The resulting record adds 1 day, and the final balance is 8 days. In the Admin Console, leave management in the Attendance app includes Leave rules, Employee leave balance, Leave approval settings, and Leave record export. On the Employee leave balance page, Export or Batch update balances, and open an employee’s record to view their leave usage history by leave type. Each usage entry shows the time, the change (for example, +5.0 days added automatically by the system according to the leave rule), the valid period, and the reason.