dingtalk.oapi.pbp.event.result.sync (打卡事件结果同步)

钉钉多场景打卡业务,开放小闹钟入口,接入方同步打卡事件【结果】到打卡平台。

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param UserEventResultOapiRequestVo 必须 打卡事件结果模型
  • └ biz_code
  • String
  • 必须
  • meeting_check_in_dt_calendar
  • 打卡业务代码
  • └ userid
  • String
  • 必须
  • 5c2f4657eb6378f
  • 员工id
  • └ result
  • Number
  • 必须
  • 2
  • 打卡事件结果,2:成功,3:失败
  • └ invalid_event
  • Boolean
  • 必须
  • true
  • 是否失效当前事件,不可重复打卡:true,可重复打卡:false
  • punch_position
  • PositionOapiVo
  • 必须
  • 打卡成功的位置信息
  • └ position_id
  • String
  • 必须
  • 8749809
  • 打卡成功的位置点id
  • └ position_type
  • Number
  • 必须
  • 101
  • 打卡成功的位置类型
  • └ event_id
  • String
  • 必须
  • 873439897343
  • 打卡事件外部id,唯一键
  • └ biz_inst_id
  • String
  • 必须
  • 43refadf8743
  • 打卡业务实例id

响应参数

名称 类型 示例值 描述
errcode Number 0 错误码
errmsg String OK 描述

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/pbp/event/result/sync");
OapiPbpEventResultSyncRequest req = new OapiPbpEventResultSyncRequest();
UserEventResultOapiRequestVo obj1 = new UserEventResultOapiRequestVo();
obj1.setBizCode("meeting_check_in_dt_calendar");
obj1.setUserid("5c2f4657eb6378f");
obj1.setResult(2L);
obj1.setInvalidEvent(true);
PositionOapiVo obj2 = new PositionOapiVo();
obj2.setPositionId("8749809");
obj2.setPositionType(101L);
obj1.setPunchPosition(obj2);
obj1.setEventId("873439897343");
obj1.setBizInstId("43refadf8743");
req.setParam(obj1);
OapiPbpEventResultSyncResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());

响应示例

  • JSON示例
{
    "errcode":0,
    "errmsg":"OK"
}

异常示例

  • JSON示例
{
	"errcode":88,
	"errmsg":"ding talk error"
}

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部