Request
| Basic Information | |
|---|---|
| HTTP URL | https://api.dingtalk.io/topapi/attendance/shift/delete |
| HTTP Method | POST |
| Supported app types | appType-Internal app |
| Required permissions | permission-qyapi_attendance_group_manage-Attendance group management permission |
Query Parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| access_token | String | Yes | af21xxx | The app credential used to call this API. Obtain it by calling the Get the access_token of an Internal App API. |
Request Body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| op_user_id | String | Yes | user123 | The userId of the operator. |
| shift_id | Number | Yes | 2423 | The shift ID. Obtain the id parameter value by calling the Get Shift Summaries API. |
Request Example
curl -X POST "https://api.dingtalk.io/topapi/attendance/shift/delete" \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'access_token=032bc0xxxxc460ee' \
-d 'op_user_id=abc' \
-d 'shift_id=2423'
DingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/shift/delete");
OapiAttendanceShiftDeleteRequest req = new OapiAttendanceShiftDeleteRequest();
req.setOpUserId("user456");
req.setShiftId(2423L);
OapiAttendanceShiftDeleteResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());
import dingtalk.api
req=dingtalk.api.OapiAttendanceShiftDeleteRequest("https://api.dingtalk.io/topapi/attendance/shift/delete")
req.op_user_id="abc"
req.shift_id=2423
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 OapiAttendanceShiftDeleteRequest;
$req->setOpUserId("abc");
$req->setShiftId("2423");
$resp = $c->execute($req, $access_token, "https://api.dingtalk.io/topapi/attendance/shift/delete");
IDingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/shift/delete");
OapiAttendanceShiftDeleteRequest req = new OapiAttendanceShiftDeleteRequest();
req.OpUserId = "abc";
req.ShiftId = 2423L;
OapiAttendanceShiftDeleteResponse rsp = client.Execute(req, access_token);
Console.WriteLine(rsp.Body);
Response
Response Body
| Name | Type | Example | Description |
|---|---|---|---|
| errmsg | String | System error | The error message returned when the call fails. |
| errcode | Number | 0 | The return code. |
| success | Boolean | true | Indicates whether the call succeeded. - true: Success - false: Failed |
| request_id | String | 16apb7hw85jjw | The request ID. |
Response Body Example
{
"errcode": 0,
"success": true,
"request_id": "3lupjm5o0j7g"
}