Request
| Basic Information | |
|---|---|
| HTTP URL | https://api.dingtalk.io/topapi/attendance/group/positions/remove |
| 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 | 4c9ebd2b1534xxxx | 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_userid | String | No | user01 | The user ID of the operator. |
| group_key | String | Yes | CEDDFxxxx | The attendance group ID. Note If your attendance group identifier is group_id, call the Convert groupId to groupKey API to convert group_id to group_key. |
| position_key_list | String | Yes | C384Fxxxx | The list of keys of the positions to delete. Obtain the keys by calling the Batch Query Locations API. Delete up to 100 locations per call. |
Request Example
curl -X POST "https://api.dingtalk.io/topapi/attendance/group/positions/remove" \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'access_token=25961xxxx7912f13' \
-d 'group_key=0151E022xxxx72A1A917E876' \
-d 'op_userid=123456' \
-d 'position_key_list=%22123%22%2C%22123%22'
DingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/group/positions/remove");
OapiAttendanceGroupPositionsRemoveRequest req = new OapiAttendanceGroupPositionsRemoveRequest();
req.setOpUserid("user01");
req.setGroupKey("CEDDFxxxx");
req.setPositionKeyList("C384Fxxxx");
OapiAttendanceGroupPositionsRemoveResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());
import dingtalk.api
req=dingtalk.api.OapiAttendanceGroupPositionsRemoveRequest("https://api.dingtalk.io/topapi/attendance/group/positions/remove")
req.op_userid="123456"
req.group_key="0151E02xxxx17E876"
req.position_key_list="["123","123"]"
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 OapiAttendanceGroupPositionsRemoveRequest;
$req->setOpUserid("123456");
$req->setGroupKey("0151E02xxxx17E876");
$req->setPositionKeyList("[\"123\",\"123\"]");
$resp = $c->execute($req, $access_token, "https://api.dingtalk.io/topapi/attendance/group/positions/remove");
IDingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/group/positions/remove");
OapiAttendanceGroupPositionsRemoveRequest req = new OapiAttendanceGroupPositionsRemoveRequest();
req.OpUserid = "123456";
req.GroupKey = "0151E0xxxx17E876";
req.PositionKeyList = ""123","123"";
OapiAttendanceGroupPositionsRemoveResponse rsp = client.Execute(req, access_token);
Console.WriteLine(rsp.Body);
Response
Response Body
| Name | Type | Example | Description |
|---|---|---|---|
| result | Result | The returned result. | |
| success_list | String[] | [“C384Fxxxx”] | The list of successfully deleted items. |
| error_info_list | ErrorInfo[] | The list of errors. | |
| failure_list | String[] | [“C384Fxxxx”] | The list of items that failed to be deleted. |
| msg | String | business fault | The error description. |
| code | String | 1000 | The error code. |
| errcode | Number | 0 | The return code. |
| errmsg | String | ok | The description of the return code. |
| success | Boolean | true | Indicates whether the call succeeded. - true: Success - false: Failed |
| request_id | String | 1493be6v5yefm | The request ID. |
Response Body Example
{
"errcode": 0,
"errmsg":"ok",
"result": {
"error_info_list": [
{
"code": "1000",
"failure_list": [
"C384Fxxxx"
],
"msg": "business fault"
}
],
"success_list": [
"C384Fxxxx"
]
},
"success": true,
"request_id": "1493be6v5yefm"
}