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

# 打刻修正の承認通知

> 打刻修正リクエストが承認されたことを通知する勤怠 API です。userid、打刻修正日、シフト ID、承認フォーム情報などをパラメータに指定できます。

この API を呼び出して、勤怠の打刻修正リクエストが承認されたことを通知します。

## リクエスト

| **基本情報** | |
| - | - |
| HTTP URL | [https://api.dingtalk.io/topapi/attendance/approve/check](https://api.dingtalk.io/topapi/attendance/approve/check) |
| HTTP メソッド | POST |
| サポートされるアプリタイプ | appType-社内アプリ　appType-サードパーティ社内アプリ |
| 権限 | permission-qyapi\_attendance\_group\_manage-勤怠グループ管理権限 |

### クエリパラメータ

| 名前 | タイプ | 必須 | 例 | 説明 |
| - | - | - | - | - |
| access\_token | String | はい | bE74xxxx | この API の呼び出しに使用するアプリ認証情報です。   - 社内アプリの場合は、[社内アプリの access\_token を取得](https://help.dingtalk.io/ja/open/development/obtain-orgapp-token) API を呼び出して取得します。 - サードパーティ社内アプリの場合は、「サードパーティ組織の access\_token を取得」API を呼び出して取得します。 |

### リクエストボディ

| 名前 | タイプ | 必須 | 例 | 説明 |
| - | - | - | - | - |
| userid | String | はい | manager4220 | 社員のユーザー ID です。 |
| work\_date | String | はい | 2019-08-15 | 打刻修正の日付です。[ユーザーのシフト設定情報を一括照会](https://help.dingtalk.io/ja/open/development/query-batch-scheduling-information.md) API から返される work\_date の値を使用します。 |
| punch\_id | Number | はい | 176877195378 | 打刻修正の対象となるシフトの ID です。[ユーザーのシフト設定情報を一括照会](https://help.dingtalk.io/ja/open/development/query-batch-scheduling-information.md) API から返される shift\_id の値を使用します。 |
| punch\_check\_time | String | はい | 2019-08-15 08:00 | シフトの予定打刻時刻です。[ユーザーのシフト設定情報を一括照会](https://help.dingtalk.io/ja/open/development/query-batch-scheduling-information.md) API から返される plan\_check\_time の値を使用します。 |
| user\_check\_time | String | はい | 2019-08-15 07:59 | ユーザーが打刻した時刻です。 |
| approve\_id | String | はい | aasdv13124 | 承認フォームの ID です。任意の値を指定できます。 |
| jump\_url | String | はい | [https://open.dingtalk.io/](https://open.dingtalk.io/) | 承認フォームのリダイレクト先 URL です。 |
| tag\_name | String | はい | 打刻修正 | 承認フォームの名前です。 |

### リクエスト例

```curl theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "https://api.dingtalk.io/topapi/report/create?access_token=YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "create_report_param": {
   
    }
  }'
```

Java

```java theme={"theme":{"light":"github-light","dark":"github-dark"}}
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=打刻修正' \
-d 'user_check_time=2019-08-15+07%3A59' \
-d 'userid=dd_dd' \
-d 'work_date=2019-08-15'
```

Python

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
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="打刻修正"
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 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("打刻修正");
$resp = $c->execute($req, $access_token, "https://api.dingtalk.io/topapi/attendance/approve/check");
```

C#

```csharp theme={"theme":{"light":"github-light","dark":"github-dark"}}
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 = "打刻修正";
OapiAttendanceApproveCheckResponse rsp = client.Execute(req, access_token);
Console.WriteLine(rsp.Body);
```

## レスポンス

### レスポンスボディ

| 名前 | タイプ | 例 | 説明 |
| - | - | - | - |
| errcode | Number | 0 | 戻りコードです。 |
| errmsg | String | ok | 戻りコードの説明です。 |

### レスポンスボディの例

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "errcode":0,
  "errmsg":"ok"
}
```

### エラーコード

呼び出しでエラーが返された場合は、エラーメッセージをもとに[グローバルエラーコード](https://help.dingtalk.io/ja/open/development/server-api-error-codes-1.md)ドキュメントで解決方法を検索してください。


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