Request
| Basic Information | |
|---|---|
| HTTP URL | 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 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 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 -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'
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());
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)
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");
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
{
"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"
}