Skip to main content
Call this API to pre-calculate an employee’s overtime, business trip, and leave durations based on scheduling in the attendance system.

API Call Description

For example, an employee is scheduled to work on November 2 (start time 09:00, end time 18:00) and has a day off on November 3. The employee plans to take leave from 09:00:00 on November 2 to 18:00:00 on November 3. Call this API to get the expected leave duration within this range. The result is only one day.
  • If an employee is not in an attendance group or has no shift scheduled on the leave date, the leave duration is calculated based on the default attendance time.
  • Configure the default attendance time at DingTalk mobile > Workbench > Attendance > Settings > More Settings > Leave and Attendance Approval > Default Attendance Time. For example: An employee is scheduled to work on November 2 (start time 09:00, end time 18:00) and has no shift scheduled on November 3. The default shift is 08:30–17:30. The employee plans to take leave from 09:00:00 on November 2 to 18:00:00 on November 3. Call this API to get the expected leave duration within this range. The result is 2 days.

Request

Basic Information

Request Header

Query Parameters

Request Body

Request Example

HTTP
Java
Python
PHP
Go
Node.js
C#

Response

Response Body

Response Body Example

Error Codes

If the API call returns an error, find the solution in the Global Error Codes document based on the error message.