> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Explore the Attendance open APIs, including capabilities, integration methods, and the full list of endpoints for attendance groups and scheduling.

This topic describes the capabilities of the Attendance open APIs and explains how to integrate them.

## What Is Attendance

Attendance is an official DingTalk app that provides organizations with an employee attendance management solution. It shows your team's status anytime, anywhere, gives **an at-a-glance view of who is present**, and **calculates attendance data automatically** without manual checks. For more information, see [Quick Start for Attendance Administrators](https://help.dingtalk.io/attendance/admin-quick-start.md).

Key features:

* **Multiple clock-in methods for various attendance scenarios**: Clock in by GPS location, Wi-Fi location, and more.
* **Unified management of in-office and field work for easier statistics**: Field clock-in tracks attendance for employees who are temporarily out of the office or on business trips.
* **Integrated leave and attendance approval for one-table attendance statistics**: Leave, overtime, outing, and business trip approvals are summarized and calculated automatically, so you no longer need to cross-check multiple reports.

## How to Enable Attendance

Attendance is an official app that DingTalk installs by default. Employees open and use it from Workbench in DingTalk.

* Mobile: DingTalk mobile client > Workbench

  On the DingTalk mobile client:

  1. Tap **Workbench** in the bottom navigation bar.
  2. Open the **Attendance** app.
* Desktop: DingTalk desktop client > Workbench

  On the DingTalk client, open **Workbench**. Under the **All Staff** section, select the **Attendance** app to begin setup.

## Open Capabilities Overview

### API List

Attendance offers a rich set of open APIs. Use these APIs to connect Attendance with your organization's business systems.

#### Attendance Group Management

| **API** | **API Description** | **API Version** |
| - | - | - |
| [Create an Attendance Group](https://help.dingtalk.io/open/development/attendance-group-write.md) | Call this API to create an attendance group. | Legacy |
| [Update an Attendance Group](https://help.dingtalk.io/open/development/attendance-group-update-interface.md) | Call this API to update attendance group information by attendance group ID. | Legacy |
| [Delete Attendance Groups](https://help.dingtalk.io/open/development/delete-attendance-group.md) | Call this API to delete attendance groups in batches. | Legacy |
| [Search Attendance Group Summaries](https://help.dingtalk.io/open/development/attendance-group-search.md) | Call this API to fuzzy search attendance groups by name and get their summary information. | Legacy |
| [Get Attendance Group Details](https://help.dingtalk.io/open/development/query-a-single-attendance-group.md) | Call this API to get attendance group details by attendance group ID. | Legacy |
| [Query Attendance Group Information by groupKey](https://help.dingtalk.io/open/development/queries-attendance-group-information-by-id.md) | Call this API to query attendance group information by attendance group ID. | Legacy |
| [Convert groupKey to groupId](https://help.dingtalk.io/open/development/convert-groupkey-to-groupid.md) | Call this API to convert the groupKey of an attendance group to its groupId. | Legacy |
| [Convert groupId to groupKey](https://help.dingtalk.io/open/development/groupid-to-groupkey.md) | Call this API to convert the groupId of an attendance group to its groupKey. | Legacy |
| [Batch Get Attendance Group Summaries](https://help.dingtalk.io/open/development/batch-query-of-simple-information-of-the-attendance-group.md) | Call this API to get summary information of all attendance groups in your organization by page. | Legacy |
| [Batch Get Attendance Group Details](https://help.dingtalk.io/open/development/batch-obtain-attendance-group-details.md) | Call this API to query the details of all attendance groups. | Legacy |
| [Get a User's Attendance Group](https://help.dingtalk.io/open/development/queries-a-user-attendance-group.md) | Call this API to get an employee's attendance group information. | Legacy |
| [Batch Add Attendance Members](https://help.dingtalk.io/open/development/batch-add-employees-under-the-attendance-group.md) | Call this API to add members to a specified attendance group in batches. | Legacy |
| [Update Attendance Members](https://help.dingtalk.io/open/development/attendance-group-member-update.md) | Call this API to update attendance group members. Add or remove users, departments, and attendance-exempt members. | Legacy |
| [Get Attendance Members](https://help.dingtalk.io/open/development/batch-query-of-attendance-group-members.md) | Call this API to get the members of an attendance group by the operator's user ID and the attendance group ID. | Legacy |
| [Get the User IDs of Attendance Members](https://help.dingtalk.io/open/development/query-attendance-group-personnel-information-in-batches.md) | Call this API to get the user IDs of all employees in an attendance group by page. | Legacy |
| [Batch Delete Attendance Members](https://help.dingtalk.io/open/development/batch-delete-employees-under-the-attendance-group.md) | Call this API to delete members from a specified attendance group in batches. | Legacy |
| [Query the List of Attendance Members](https://help.dingtalk.io/open/development/batch-query-of-employees-in-the-attendance-group.md) | Call this API to query the list of employees in a specified attendance group. | Legacy |
| [Check Whether a User Belongs to an Attendance Group](https://help.dingtalk.io/open/development/query-members-by-id.md) | Call this API to check whether a department or employee belongs to an attendance group. The API returns the IDs of the departments or employees that belong to the attendance group. | Legacy |
| [Batch Add Wi-Fi Information](https://help.dingtalk.io/open/development/batch-add-wifi-under-attendance-group.md) | Call this API to add Wi-Fi information to a specified attendance group in batches. | Legacy |
| [Batch Query Wi-Fi Information](https://help.dingtalk.io/open/development/batch-query-wifi-under-attendance-group.md) | Call this API to query the Wi-Fi list of a specified attendance group in batches. | Legacy |
| [Batch Remove Wi-Fi Information](https://help.dingtalk.io/open/development/batch-remove-wifi-under-attendance-group.md) | Call this API to remove Wi-Fi information from a specified attendance group in batches. | Legacy |
| [Batch Add Locations](https://help.dingtalk.io/open/development/atch-add-position-under-attendance-group.md) | Call this API to add locations (positions) to a specified attendance group in batches. | Legacy |
| [Batch Query Locations](https://help.dingtalk.io/open/development/batch-query-position-under-attendance-group.md) | Call this API to query the location (position) list of a specified attendance group in batches. | Legacy |
| [Batch Delete Locations](https://help.dingtalk.io/open/development/delete-position-in-batches-under-the-attendance-group.md) | Call this API to delete locations (positions) from a specified attendance group in batches. | Legacy |
| [Query Attendance Write Permissions](https://help.dingtalk.io/open/development/attendance-writing-operation-is-brand-new-query.md) | Query the operation permissions of employees within attendance groups. | New |

#### Attendance Clock-in

| **API** | **API Description** | **API Version** |
| - | - | - |
| [Get Clock-in Results](https://help.dingtalk.io/open/development/open-attendance-clock-in-data.md) | Call this API to return the actual clock-in results of employees in your organization. | Legacy |
| [Get Clock-in Details](https://help.dingtalk.io/open/development/attendance-clock-in-record-is-open.md) | Call this API to return the actual clock-in details of employees in your organization. | Legacy |
| [Upload Clock-In Records](https://help.dingtalk.io/open/development/upload-punch-records.md) | Call this API to upload card-swipe or facial recognition records from a third-party attendance system to DingTalk Attendance as DingTalk clock-in records. | New |

#### Attendance Shifts

| **API** | **API Description** | **API Version** |
| - | - | - |
| [Create a Shift](https://help.dingtalk.io/open/development/create-modify-shifts.md) | Call this API to create a DingTalk attendance shift. | Legacy |
| [Delete a Shift](https://help.dingtalk.io/open/development/delete-shift.md) | Call this API to delete an attendance shift by shift ID. | Legacy |
| [Search Shifts by Name](https://help.dingtalk.io/open/development/search-shifts-by-rank.md) | Call this API to fuzzy search shifts by name. The API returns shift names and IDs. | Legacy |
| [Get Shift Summaries](https://help.dingtalk.io/open/development/enterprise-shift-query-in-batches.md) | Call this API to query information about all shifts. | Legacy |
| [Get Shift Details](https://help.dingtalk.io/open/development/shift-query.md) | Call this API to query the details of a shift by shift ID. | Legacy |
| [Query Shift History](https://help.dingtalk.io/open/development/query-history-shifts.md) | Call this API to query shift history by shift ID and version. | Legacy |
| [Modify Clock-in Time Window Settings](https://help.dingtalk.io/open/development/modify-card-settings.md) | Call this API to modify the clock-in point settings of an attendance shift. | Legacy |

#### Attendance Scheduling

| **API** | **API Description** | **API Version** |
| - | - | - |
| [Query a User's Scheduling Information](https://help.dingtalk.io/open/development/query-scheduling-for-a-day.md) | Call this API to query a user's scheduling information for a specific workday. | Legacy |
| [Batch Query Users' Scheduling Information](https://help.dingtalk.io/open/development/query-batch-scheduling-information.md) | Call this API to query employees' scheduling information for workdays in batches. | Legacy |
| [Schedule Shifts for Shift-Based Attendance Groups](https://help.dingtalk.io/open/development/scheduling-system-attendance-group-scheduling.md) | Call this API to schedule shifts for members of a shift-based attendance group. | Legacy |
| [Query Scheduled Clock-in Results](https://help.dingtalk.io/open/development/query-the-results-of-a-batch-of-tasks.md) | Call this API to query the clock-in results of scheduled shifts. Results include clock-in time, late arrival, early leave, in-office, and field work information. | Legacy |
| [Query Organization Attendance Scheduling Details](https://help.dingtalk.io/open/development/interface-for-daily-full-query-of-attendance-scheduling-information.md) | Call this API to query attendance scheduling information for a specific day. | Legacy |
| [Batch Query Users' Scheduling Summaries](https://help.dingtalk.io/open/development/query-scheduling-summary-information.md) | Call this API to query users' scheduling summaries within a specified time period. | Legacy |

#### Attendance Rules

| **API** | **API Description** | **API Version** |
| - | - | - |
| [Get Overtime Rules by Page](https://help.dingtalk.io/open/development/retrieve-a-list-of-overtime-rules-by-page.md) | Call this API to get the list of overtime rules configured in Attendance by page. | New |
| [Get Makeup Clock-in Rules by Page](https://help.dingtalk.io/open/development/retrieve-a-list-of-replenishment-rules-by-page.md) | Call this API to get the list of makeup clock-in rules configured in Attendance by page. | New |
| [Batch Get Overtime Rule Settings](https://help.dingtalk.io/open/development/batch-retrieve-overtime-rules.md) | Call this API to get the setting details of multiple overtime rules in batches by overtime rule ID. | New |

#### Attendance Statistics

| **API** | **API Description** | **API Version** |
| - | - | - |
| [Check Whether the Smart Statistics Report Is Enabled](https://help.dingtalk.io/open/development/determine-whether-to-enable-attendance-intelligent-report.md) | Call this API to check whether your organization has enabled the smart attendance report. If the smart report is disabled, other statistics report APIs are unavailable. | Legacy |
| [Get User Attendance Data](https://help.dingtalk.io/open/development/obtain-the-attendance-update-data.md) | Call this API to get a specified user's attendance data for the day, including clock-in records, clock-in results, and approval lists. | Legacy |
| [Get Leave Data from Reports](https://help.dingtalk.io/open/development/obtains-the-holiday-data-from-the-smart-attendance-report.md) | Call this API to get leave data from the DingTalk smart attendance report by leave name and user ID. | Legacy |
| [Get Attendance Report Column Definitions](https://help.dingtalk.io/open/development/queries-the-enterprise-attendance-report-column.md) | Call this API to get the column information in your organization's smart attendance report. | Legacy |
| [Get Attendance Report Column Values](https://help.dingtalk.io/open/development/queries-the-column-value-of-the-attendance-report.md) | Call this API to get the column values of the DingTalk smart attendance report. | Legacy |

#### Leave Approval

| **API** | **API Description** | **API Version** |
| - | - | - |
| [Notify Approval Completion](https://help.dingtalk.io/open/development/api-processapprovefinish.md) | Call this API to notify Attendance that an approval is complete. Supports overtime, leave, outing, and business trip types. | Legacy |
| [Notify Approval Revocation](https://help.dingtalk.io/open/development/notify-the-attendance-to-modify-the-punch-result-when-the.md) | Call this API to notify Attendance that an approval is revoked. Supports overtime, leave, outing, business trip, and makeup clock-in types. | Legacy |
| [Notify Makeup Clock-in Approval](https://help.dingtalk.io/open/development/make-up-the-card-after-approval.md) | Call this API to notify Attendance that a makeup clock-in is approved. | Legacy |
| [Notify Shift Swap Approval](https://help.dingtalk.io/open/development/shift-change-operation-after-approval.md) | After a shift swap is approved, call this API to notify Attendance to perform the shift swap. Employees can swap shifts with themselves or with others. | Legacy |
| [Pre-calculate Duration](https://help.dingtalk.io/open/development/api-calculateduration.md) | Call this API to pre-calculate the duration of employees' overtime, business trips, and leave based on the scheduling in Attendance. | Legacy |
| [Calculate Leave Duration](https://help.dingtalk.io/open/development/calculate-leave-duration.md) | Call this API to get each employee's leave duration, calculated automatically based on scheduling rules. | Legacy |
| [Query Leave Status](https://help.dingtalk.io/open/development/query-status.md) | Call this API to query the leave status of a specified user in a specified organization within a specified time period. | Legacy |

#### Leave Management

| **API** | **API Description** | **API Version** |
| - | - | - |
| [Add a Leave Rule](https://help.dingtalk.io/open/development/add-holiday-rules.md) | Call this API to create a leave rule. | New |
| [Update a Leave Rule](https://help.dingtalk.io/open/development/update-holiday-rules.md) | Call this API to update the rules of a specified leave type. | New |
| [Delete a Leave Rule](https://help.dingtalk.io/open/development/api-for-deleting-holiday-types.md) | Call this API to delete a specified leave rule. | Legacy |
| [Query the Leave Rule List](https://help.dingtalk.io/open/development/holiday-type-query.md) | Call this API to query the list of leave rules in your organization. | Legacy |
| [Initialize Leave Balances](https://help.dingtalk.io/open/development/initialize-holiday-balance.md) | Call this API to initialize leave balances in batches. | Legacy |
| [Query Leave Balances](https://help.dingtalk.io/open/development/query-holiday-balance.md) | Call this API to get leave balance information by organization or employee by page. Each call returns 50 records. | Legacy |
| [Batch Update Leave Balances](https://help.dingtalk.io/open/development/bulk-update-holiday-balance.md) | Call this API to update leave balance information in batches. | Legacy |
| [Batch Query Employee Leave Balance Change Records](https://help.dingtalk.io/open/development/batch-query-employee-leave-balance-change-record.md) | Call this API to get leave balance records by employee by page. | Legacy |
| [Query User Attendance Holiday Information](https://help.dingtalk.io/open/development/obtain-user-attendance-and-holiday-information.md) | Call this API to query an employee's holiday information within a time period. | New |

### Callback Event List

Attendance supports multiple callback events, such as shift changes, attendance group changes, employee clock-in events, and employee overtime events. For more events, see the event subscription overview.

## Integration Solutions

To integrate more attendance capabilities into your organization's systems, refer to the following solutions:

* [Attendance Data Visualization: Real-Time Arrival Monitoring and Error Alerts](https://help.dingtalk.io/open/development/the-enterprise-big-screen-displays-the-attendance-of-employees.md)
* [Automatic Makeup Clock-in Sync: Update DingTalk Attendance Status in Real Time After Approval](https://help.dingtalk.io/open/development/the-replenishment-card-of-enterprise-self-developed-attendance-system-is-synchronized.md)
* [Attendance Rule Configuration: Batch Creation and Dynamic Adjustment of Attendance Groups](https://help.dingtalk.io/open/development/operation-related-to-attendance-group.md)
* [Attendance Member Assignment: Batch Member Enrollment and Precise Management](https://help.dingtalk.io/open/development/attendance-group-member-operations.md)
* [Daily Attendance Reports: Daily Statistics and Multi-Dimensional Data Analysis](https://help.dingtalk.io/open/development/obtain-the-employee-attendance-report-information.md)
* [Clock-in Data Sync: Automatically Upload Hardware Clock-in Records to DingTalk](https://help.dingtalk.io/open/development/enterprise-s-own-oa-approval-system-synchronized-to-dingtalk-during-holidays.md)
* [Leave and Attendance Approval Integration: Automatically Sync Leave and Attendance Data to DingTalk Attendance](https://help.dingtalk.io/open/development/attendance-synchronizes-information.md)

## Glossary

### Attendance Group

An attendance group is a set of attendance rules that the Organization Admin configures for employees. Create different types of attendance groups for the different job types in your organization.

> [!NOTE]
>
> Due to differences between the legacy and new API specifications, an attendance group is uniquely identified by either group\_id or groupKey. Call the [Convert groupKey to groupId](https://help.dingtalk.io/open/development/convert-groupkey-to-groupid.md) API to convert a groupKey value to its corresponding group\_id.

There are three types of attendance groups:

* **Fixed shift attendance group**: For employees with fixed working and rest hours, such as 9:00 to 18:00 daily with fixed weekends off.
* **Shift-based attendance group**: For employees who work early and late shifts, whose shifts vary by day, or whose days off must be scheduled.
* **Flexible working hours attendance group**: For employees with flexible working hours.

Sign in to the [DingTalk Admin Console](https://oa.dingtalk.io/?lang=en_US) and go to **Workbench > App Management > Attendance > Attendance Group Management** to add an attendance group.

### Leave Rule (leave\_code)

A leave rule is uniquely identified by leave\_code.

In the DingTalk Admin Console, go to **Leave Management** > **Leave Rules** to view and configure leave rules. Click **Add Leave** to create a leave rule. Each leave rule has the following attributes:

| Field | Description |
| - | - |
| Leave Name | Name of the leave type (e.g., Personal Leave, Time-off in Lieu, Sick Leave, Annual Leave, Maternity Leave, Paternity Leave, Marriage Leave) |
| Leave Unit | Minimum booking unit: by hour, by half-day, or by day |
| Duration Calculation Method | How leave duration is counted (e.g., by working day) |
| Paid | Whether the leave is paid or unpaid |
| Balance Rule | Balance limit (e.g., unlimited balance) |
| Scope | Who the rule applies to (e.g., the entire organization) |
| Actions | Edit or delete the rule |

### Shift

Bind a shift when you create an attendance group. A shift defines the clock-in times and working hours for employees in the attendance group. Customize attendance shifts to fit your organization's needs, including flexible clock-in, late arrival with late departure, early arrival with early departure, late arrival, and absenteeism settings.

Sign in to the [DingTalk Admin Console](https://oa.dingtalk.io/?lang=en_US) and go to **App Management > Attendance > Shift Management** to add a shift.

On the **Shift Management** page, click **Add Shift** to create a new shift. Existing shifts are listed with the following columns:

| Column | Description |
| - | - |
| **Shift Name** | Name of the shift (e.g., Default Shift) |
| **Attendance Time** | Working time range (e.g., 09:00–18:00) |
| **Actions** | **Edit** or **Delete** the shift |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.