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

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

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param UserEventOapiRequestVo 必须 打卡事件参数模型
  • └ biz_code
  • String
  • 必须
  • meeting_check_in_dt_calendar
  • 打卡业务代码
  • user_event_list
  • UserEventOapiVo []
  • 必须
  • 打卡事件列表
  • └ userid
  • String
  • 必须
  • 5c2f4657eb6378f
  • 员工id
  • └ event_name
  • String
  • 必须
  • 余杭门店巡查
  • 打卡事件名称
  • └ start_time
  • Number
  • 必须
  • 1590138915000
  • 打卡事件结束时间,单位毫秒
  • └ end_time
  • Number
  • 必须
  • 1590166923000
  • 打卡事件开始时间,单位毫秒
  • └ event_time_stamp
  • Number
  • 必须
  • 1590138915000
  • 打卡事件生成时间戳,单位毫秒
  • position_list
  • PositionOapiVo []
  • 必须
  • 位置列表
  • └ position_id
  • String
  • 必须
  • 8749809
  • 位置点id
  • └ position_type
  • Number
  • 必须
  • 101
  • 位置类型
  • └ biz_inst_id
  • String
  • 必须
  • 43refadf8743
  • 打卡业务实例id
  • └ event_id
  • String
  • 必须
  • 873439897343
  • 打卡事件外部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/sync");
OapiPbpEventSyncRequest req = new OapiPbpEventSyncRequest();
UserEventOapiRequestVo obj1 = new UserEventOapiRequestVo();
obj1.setBizCode("meeting_check_in_dt_calendar");
List<UserEventOapiVo> list3 = new ArrayList<UserEventOapiVo>();
UserEventOapiVo obj4 = new UserEventOapiVo();
list3.add(obj4);
obj4.setUserid("5c2f4657eb6378f");
obj4.setEventName("余杭门店巡查");
obj4.setStartTime(1590138915000L);
obj4.setEndTime(1590166923000L);
obj4.setEventTimeStamp(1590138915000L);
List<PositionOapiVo> list7 = new ArrayList<PositionOapiVo>();
PositionOapiVo obj8 = new PositionOapiVo();
list7.add(obj8);
obj8.setPositionId("8749809");
obj8.setPositionType(101L);
list5.setPositionList(list7);
obj4.setBizInstId("43refadf8743");
obj4.setEventId("873439897343");
obj1.setUserEventList(list3);
req.setParam(obj1);
OapiPbpEventSyncResponse 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

返回
顶部