> ## 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.

# Query Scheduling Clock-In Results

> Call this API to batch query scheduling clock-in results by schedule ID, returning attendance type, planned and actual clock-in times.

Call this API to query scheduling clock-in results by schedule ID and get the attendance type, planned clock-in time, last modified time, and other information.

## Request

| **Basic Information** | |
| - | - |
| HTTP URL | [https://api.dingtalk.io/topapi/attendance/schedule/result/listbyids](https://api.dingtalk.io/topapi/attendance/schedule/result/listbyids) |
| HTTP Method | POST |
| Supported app types | appType-Internal app　appType-Third-party enterprise app |
| Required permissions | permission-qyapi\_attendance\_group\_read-Attendance group query permission |

### Query Parameters

| Name | Type | Required | Example | Description |
| - | - | - | - | - |
| access\_token | String | Yes | bE74xxxx | The app credential used to call this API.   - For an Internal app, obtain it by calling the [Get the access\_token of an Internal App](https://help.dingtalk.io/open/development/obtain-orgapp-token) API. - For a Third-party enterprise app, obtain it by calling the Get the access\_token of a Third-party Enterprise App API. |

### Request Body

| Name | Type | Required | Example | Description |
| - | - | - | - | - |
| op\_user\_id | String | Yes | manager123 | The userId of the operator. |
| schedule\_ids | String | Yes | 144872188723,144872188722 | The schedule IDs. Call the [Query Organization Attendance Scheduling Details](https://help.dingtalk.io/open/development/interface-for-daily-full-query-of-attendance-scheduling-information.md) API to get the plan\_id parameter value. Separate multiple schedule IDs with commas. Each call supports up to 100 schedule IDs. |

### Request Example

```curl theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "https://api.dingtalk.io/topapi/attendance/schedule/result/listbyids" \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'access_token=711cexxxx8ce772' \
-d 'op_user_id=dd_dd' \
-d 'schedule_ids=1234%2C3214'
```

Java

```java theme={"theme":{"light":"github-light","dark":"github-dark"}}
DingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/schedule/result/listbyids");
OapiAttendanceScheduleResultListbyidsRequest req = new OapiAttendanceScheduleResultListbyidsRequest();
req.setOpUserId("user456");
req.setScheduleIds("16xxxx530,160xxxx12");
OapiAttendanceScheduleResultListbyidsResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());
```

Python

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import dingtalk.api

req=dingtalk.api.OapiAttendanceScheduleResultListbyidsRequest("https://api.dingtalk.io/topapi/attendance/schedule/result/listbyids")

req.op_user_id="dd_dd"
req.schedule_ids="[1234,3214]"
try:
  resp= req.getResponse(access_token)
  print(resp)
except Exception,e:
  print(e)
```

PHP

```php theme={"theme":{"light":"github-light","dark":"github-dark"}}
include "TopSdk.php";
date_default_timezone_set('Asia/Shanghai');

$c = new DingTalkClient(DingTalkConstant::$CALL_TYPE_OAPI, DingTalkConstant::$METHOD_POST , DingTalkConstant::$FORMAT_JSON);
$req = new OapiAttendanceScheduleResultListbyidsRequest;
$req->setOpUserId("dd_dd");
$req->setScheduleIds("[1234,3214]");
$resp = $c->execute($req, $access_token, "https://api.dingtalk.io/topapi/attendance/schedule/result/listbyids");
```

C#

```csharp theme={"theme":{"light":"github-light","dark":"github-dark"}}
IDingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/schedule/result/listbyids");
OapiAttendanceScheduleResultListbyidsRequest req = new OapiAttendanceScheduleResultListbyidsRequest();
req.OpUserId = "dd_dd";
req.ScheduleIds = "1234,3214";
OapiAttendanceScheduleResultListbyidsResponse rsp = client.Execute(req, access_token);
Console.WriteLine(rsp.Body);
```

## Response

### Response Body

| Name | Type | Example | Description |
| - | - | - | - |
| result | TopScheduleResultVo\[] | demo | The query results. |
| check\_type | String | OnDuty | The attendance type:   - **Onduty**: Clock in - **OffDuty**: Clock out |
| gmt\_modified | Date | 2020-11-11 19:03:21 | The last modified time. |
| plan\_check\_time | Date | 2020-11-11 19:03:20 | The planned clock-in time. |
| corp\_id | String | dingxxxxx1c1 | The organization ID. |
| base\_check\_time | Date | 2020-11-11 19:03:00 | The planned clock-in time after adjustment by rules such as allowed late arrival and early leave. |
| group\_id | Number | 67xxxx4 | The attendance group ID. |
| gmt\_create | Date | 2020-11-11 19:03:21 | The created time. |
| user\_id | String | user123 | The userId of the user. |
| work\_date | Date | 2020-11-11 00:00:00 | The workday, which indicates the specific day of the schedule. |
| id | Number | 11xxxx19 | The clock-in result ID. |
| location\_result | String | Normal | The clock-in location result:   - **Normal**: Normal clock-in - **NotSigned**: Not clocked in - **Outside**: Field work |
| is\_legal | String | Y | Indicates whether the clock-in has an error:   - **N**: No - **Y**: Yes |
| time\_result | String | Normal | The clock-in time result:   - **Normal**: Normal clock-in - **NotSigned**: Not clocked in - **Late**: Late arrival - **SeriousLate**: Serious late arrival - **Absenteeism**: Absenteeism due to late arrival - **Early**: Early leave |
| record\_id | Number | 48xxxx644 | The clock-in record. |
| user\_check\_time | Date | 2020-11-11 19:03:20 | The clock-in time. |
| schedule\_id | Number | 5672xxxx63 | The schedule ID. |
| success | Boolean | true | Indicates whether the request succeeded.   - **true**: Success - **false**: Failed |
| errcode | Number | 0 | The return code. |
| errmsg | String | ok | The description of the return code. |
| request\_id | String | 6k9c3cvix353 | The request ID. |

### Response Body Example

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "errcode": 0,
  "errmsg":"ok",
  "result": [
    {
      "base_check_time": "2020-11-11 19:03:00",
      "check_type": "OnDuty",
      "corp_id": "dingxxxxx1c1",
      "gmt_create": "2020-11-11 19:03:21",
      "gmt_modified": "2020-11-11 19:03:21",
      "group_id": 67xxxx4,
      "id": 11xxxx19,
      "is_legal": "Y",
      "location_result": "Normal",
      "plan_check_time": "2020-11-11 19:03:20",
      "record_id": 48xxxx644,
      "schedule_id": 16xxxx812,
      "time_result": "Normal",
      "user_check_time": "2020-11-11 19:03:20",
      "user_id": "user456",
      "work_date": "2020-11-11 00:00:00"
    }
  ],
  "success": true,
  "request_id": "6k9c3cvix353"
}
```

### Error Codes

If a call to this API returns an error, find a solution in the [Global Error Codes](https://help.dingtalk.io/open/development/server-api-error-codes-1.md) document based on the error message.


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