Request
| Basic Information | |
|---|---|
| HTTP URL | https://api.dingtalk.io/topapi/attendance/approve/check |
| HTTP Method | POST |
| Supported app types | appType-Internal app appType-Third-party enterprise app |
| Permissions | permission-qyapi_attendance_group_manage-Attendance group management 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, call the Get the access_token of an internal app API to obtain it. - For a Third-party enterprise app, call the Get the access_token of a third-party organization API to obtain it. |
Request Body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| userid | String | Yes | manager4220 | The user ID of the employee. |
| work_date | String | Yes | 2019-08-15 | The date of the makeup clock-in. Use the work_date value returned by the Query user scheduling information in batches API. |
| punch_id | Number | Yes | 176877195378 | The ID of the shift to make up. Use the shift_id value returned by the Query user scheduling information in batches API. |
| punch_check_time | String | Yes | 2019-08-15 08:00 | The scheduled clock-in time of the shift. Use the plan_check_time value returned by the Query user scheduling information in batches API. |
| user_check_time | String | Yes | 2019-08-15 07:59 | The time the user clocked in. |
| approve_id | String | Yes | aasdv13124 | The ID of the approval form. This is a custom value. |
| jump_url | String | Yes | https://open.dingtalk.io/ | The redirect URL of the approval form. |
| tag_name | String | Yes | Makeup clock-in | The name of the approval form. |
Request Example
curl -X POST "https://api.dingtalk.io/topapi/report/create?access_token=YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"create_report_param": {
}
}'
curl -X POST "https://api.dingtalk.io/topapi/attendance/approve/check" \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'access_token=1eddxxxxca1a1' \
-d 'approve_id=aasdv13124' \
-d 'jump_url=https%3A%2F%2Fxxx.xxx' \
-d 'punch_check_time=2019-08-15+08%3A00' \
-d 'punch_id=12345' \
-d 'tag_name=Makeup+clock-in' \
-d 'user_check_time=2019-08-15+07%3A59' \
-d 'userid=dd_dd' \
-d 'work_date=2019-08-15'
import dingtalk.api
req=dingtalk.api.OapiAttendanceApproveCheckRequest("https://api.dingtalk.io/topapi/attendance/approve/check")
req.userid="dd_dd"
req.work_date="2019-08-15"
req.punch_id=12345
req.punch_check_time="2019-08-15 08:00"
req.user_check_time="2019-08-15 07:59"
req.approve_id="aasdv13124"
req.jump_url="https://xxx.xxx"
req.tag_name="Makeup clock-in"
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 OapiAttendanceApproveCheckRequest;
$req->setUserid("dd_dd");
$req->setWorkDate("2019-08-15");
$req->setPunchId("12345");
$req->setPunchCheckTime("2019-08-15 08:00");
$req->setUserCheckTime("2019-08-15 07:59");
$req->setApproveId("aasdv13124");
$req->setJumpUrl("https://xxx.xxx");
$req->setTagName("Makeup clock-in");
$resp = $c->execute($req, $access_token, "https://api.dingtalk.io/topapi/attendance/approve/check");
IDingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/approve/check");
OapiAttendanceApproveCheckRequest req = new OapiAttendanceApproveCheckRequest();
req.Userid = "dd_dd";
req.WorkDate = "2019-08-15";
req.PunchId = 12345L;
req.PunchCheckTime = "2019-08-15 08:00";
req.UserCheckTime = "2019-08-15 07:59";
req.ApproveId = "aasdv13124";
req.JumpUrl = "https://xxx.xxx";
req.TagName = "Makeup clock-in";
OapiAttendanceApproveCheckResponse rsp = client.Execute(req, access_token);
Console.WriteLine(rsp.Body);
Response
Response Body
| Name | Type | Example | Description |
|---|---|---|---|
| errcode | Number | 0 | The return code. |
| errmsg | String | ok | The description of the return code. |
Response Body Example
{
"errcode":0,
"errmsg":"ok"
}