企业内部开发 服务端API 打卡 管理打卡规则
管理打卡规则
最后更新:2023/12/18
可联系渠道经理采购或代理智慧硬件接口已支持设备 联系渠道经理
管理打卡规则
最后更新:2023/12/18

目录

  • 创建打卡规则
  • 获取打卡规则
  • 修改打卡规则
  • 清空打卡规则数组元素
  • 删除打卡规则
  • 打卡规则字段说明
  • 错误信息列表
  • 创建打卡规则

    企业可通过自建应用或授权的代开发应用,为企业添加打卡规则。

    请求方式:POST(HTTPS
    请求地址:https://qyapi.weixin.qq.com/cgi-bin/checkin/add_checkin_option?access_token=ACCESS_TOKEN
    请求示例:

    {
        "effective_now": true,
        "group": {
            "grouptype": 1,
            "groupname": "打卡规则1",
            "checkindate": [
                {
                    "workdays": [
                        1,
                        2,
                        3,
                        4,
                        5
                    ],
                    "checkintime": [
                        {
                            "time_id": 1,
                            "work_sec": 36000,
                            "off_work_sec": 43200,
                            "remind_work_sec": 35400,
                            "remind_off_work_sec": 43200,
                            "earliest_work_sec": 35040,
                            "latest_work_sec": 37020,
                            "earliest_off_work_sec": 43140,
                            "latest_off_work_sec": 43800
                        }
                    ],
                    "flex_on_duty_time": 0,
                    "flex_off_duty_time": 0
                }
            ],
            "sync_holidays": true,
            "need_photo": true,
            "note_can_use_local_pic": false,
            "wifimac_infos": [
                {
                    "wifiname": "Tencent-WiFi-1",
                    "wifimac": "c0:7b:bc:37:f8:d3"
                }
            ],
            "allow_checkin_offworkday": true,
            "allow_apply_offworkday": true,
            "loc_infos": [
                {
                    "lat": 30547030,
                    "lng": 104062890,
                    "loc_title": "腾讯成都大厦",
                    "loc_detail": "四川省成都市武侯区高新南区天府三街",
                    "distance": 300
                }
            ],
            "range": {
                "party_id": [],
                "userid": [
                    "xiaoxioa"
                ],
                "tagid": []
            },
            "white_users": [
                "xiaoxioa"
            ],
            "type": 0,
            "reporterinfo": {
                "reporters": [
                    {
                        "userid": "xiaoxioa"
                    }
                ]
            },
            "ot_info_v2": {
                "workdayconf": {
                    "allow_ot": true,
                    "type": 0
                }
            },
            "allow_apply_bk_cnt": -1,
            "option_out_range": 0,
            "use_face_detect": true,
            "allow_apply_bk_day_limit": -1,
            "open_face_live_detect": true,
            "buka_limit_next_month": -1,
            "sync_out_checkin": true,
            "buka_remind": {
                "open_remind": true,
                "buka_remind_day": 28,
                "buka_remind_month": 0
            },
    		"buka_restriction":0
        }
    }

    参数说明:

    参数是否必填说明
    access_token调用接口凭证。自建应用或代开发应用的access_token
    group视情况而定打卡规则详细定义,具体见打卡规则字段说明
    effective_now是否立即生效, 默认为false
    注意:
    1.创建打卡规则时,groupid无需传入,该字段会被忽略。
    2.附常见错误信息列表

    权限说明:
    调用的应用需要满足如下的权限:

    应用类型权限要求
    自建应用配置到「打卡 - 可调用接口的应用」中
    代开发应用具有「打卡」权限
    第三方应用暂不支持

    注: 从2023年12月1日0点起,不再支持通过系统应用secret调用接口,存量企业暂不受影响 查看详情

    返回结果:

    {
        "errcode": 0,
        "errmsg": "ok"
    }

    参数说明:

    参数类型说明
    errcodeint32返回码
    errmsgstring错误码描述

    获取打卡规则

    获取企业所有打卡规则

    修改打卡规则

    企业可通过自建应用或授权的代开发应用,修改该应用为企业创建的打卡规则。

    请求方式:POST(HTTPS
    请求地址:https://qyapi.weixin.qq.com/cgi-bin/checkin/update_checkin_option?access_token=ACCESS_TOKEN
    请求示例:

    {
        "effective_now": true,
        "group": {
            "groupid": 1,
            "grouptype": 1,
            "groupname": "打卡规则1",
            "checkindate": [
                {
                    "workdays": [
                        1,
                        2,
                        3,
                        4,
                        5
                    ],
                    "checkintime": [
                        {
                            "time_id": 1,
                            "work_sec": 36000,
                            "off_work_sec": 43200,
                            "remind_work_sec": 35400,
                            "remind_off_work_sec": 43200,
                            "earliest_work_sec": 35040,
                            "latest_work_sec": 37020,
                            "earliest_off_work_sec": 43140,
                            "latest_off_work_sec": 43800
                        }
                    ],
                    "flex_on_duty_time": 0,
                    "flex_off_duty_time": 0
                }
            ],
            "sync_holidays": true,
            "need_photo": true,
            "note_can_use_local_pic": false,
            "wifimac_infos": [
                {
                    "wifiname": "Tencent-WiFi-1",
                    "wifimac": "c0:7b:bc:37:f8:d3"
                }
            ],
            "allow_checkin_offworkday": true,
            "allow_apply_offworkday": true,
            "loc_infos": [
                {
                    "lat": 30547030,
                    "lng": 104062890,
                    "loc_title": "腾讯成都大厦",
                    "loc_detail": "四川省成都市武侯区高新南区天府三街",
                    "distance": 300
                }
            ],
            "range": {
                "party_id": [],
                "userid": [
                    "xiaoxioa"
                ],
                "tagid": []
            },
            "white_users": [
                "xiaoxioa"
            ],
            "type": 0,
            "reporterinfo": {
                "reporters": [
                    {
                        "userid": "xiaoxioa"
                    }
                ]
            },
            "ot_info_v2": {
                "workdayconf": {
                    "allow_ot": true,
                    "type": 0
                }
            },
            "allow_apply_bk_cnt": -1,
            "option_out_range": 0,
            "use_face_detect": true,
            "allow_apply_bk_day_limit": -1,
            "open_face_live_detect": true,
            "buka_limit_next_month": -1,
            "sync_out_checkin": true,
            "buka_remind": {
                "open_remind": true,
                "buka_remind_day": 28,
                "buka_remind_month": 0
            }
        }
    }

    参数说明:

    参数是否必填说明
    access_token调用接口凭证。自建应用或代开发应用的access_token
    group视情况而定打卡规则详细定义,具体见打卡规则字段说明
    effective_now是否立即生效, 默认false
    注意:
    1.修改打卡规则时,groupid须传入,否则会报错。
    2.打卡规则仅可由该规则的创建应用修改。
    3.group定义存在多层结构体嵌套,对于group.*一级的字段:
     a.若该字段为数组且调用端无传入或传入空元素数组,则理解为不更新该数组字段;
     b.若该字段为数组且调用端有传入,理解为覆盖该数组字段( 即清空原有数组,保留传入的数组 );
     c.若该字段非数组且调用端有传入,理解为覆盖该字段,及递归的所有字段;
     d.若该字段非数组且调用端无传入,理解为不更新该字段。
    4.若想清空group.*一级的字段:
     a.若该字段为数组,可以使用清空规则数组元素接口
     b.若该字段非数组,则直接传入空元素即可;
    5.附常见错误信息列表

    权限说明:
    调用的应用需要满足如下的权限:

    应用类型权限要求
    自建应用配置到「打卡 - 可调用接口的应用」中
    代开发应用具有「打卡」权限
    第三方应用暂不支持

    注: 从2023年12月1日0点起,不再支持通过系统应用secret调用接口,存量企业暂不受影响 查看详情

     

    返回结果:

    {
        "errcode": 0,
        "errmsg": "ok"
    }

    参数说明:

    参数类型说明
    errcodeint32返回码
    errmsgstring错误码描述

    清空打卡规则数组元素

    企业可通过自建应用或授权的代开发应用,修改该应用为企业创建的打卡规则。

    请求方式:POST(HTTPS
    请求地址:https://qyapi.weixin.qq.com/cgi-bin/checkin/clear_checkin_option_array_field?access_token=ACCESS_TOKEN
    请求示例:

    {
      "groupid":1,
      "clear_field":[1,2,3],
      "effective_now":true
    }

    参数说明:

    参数是否必填说明
    access_token调用接口凭证。自建应用或代开发应用的access_token
    groupid打卡规则id
    clear_field清空的字段标识:
    1-清空spe_workdays字段; 2-清空spe_offdays字段; 3-清空wifimac_infos字段; 4-清空loc_infos字段( wifimac_infos和loc_infos不可同时为空 )
    effective_now是否立即生效,默认false
    1.打卡规则仅可由该规则的创建应用修改。

    权限说明:
    调用的应用需要满足如下的权限:

    应用类型权限要求
    自建应用配置到「打卡 - 可调用接口的应用」中
    代开发应用具有「打卡」权限
    第三方应用暂不支持

    注: 从2023年12月1日0点起,不再支持通过系统应用secret调用接口,存量企业暂不受影响 查看详情

     

    返回结果:

    {
        "errcode": 0,
        "errmsg": "ok"
    }

    参数说明:

    参数类型说明
    errcodeint32返回码
    errmsgstring错误码描述

    删除打卡规则

    企业可通过自建应用或授权的代开发应用,修改该应用为企业创建的打卡规则。

    请求方式:POST(HTTPS
    请求地址:https://qyapi.weixin.qq.com/cgi-bin/checkin/del_checkin_option?access_token=ACCESS_TOKEN
    请求示例:

    {
    	"groupid":1,
    	"effective_now":true
    }

    参数说明:

    参数是否必填说明
    access_token调用接口凭证。自建应用或代开发应用的access_token
    groupid删除的打卡规则id
    effective_now是否立即生效,默认false
    1.打卡规则仅可由该规则的创建应用删除。

    权限说明:
    调用的应用需要满足如下的权限:

    应用类型权限要求
    自建应用配置到「打卡 - 可调用接口的应用」中
    代开发应用具有「打卡」权限
    第三方应用暂不支持

    注: 从2023年12月1日0点起,不再支持通过系统应用secret调用接口,存量企业暂不受影响 查看详情

     

    返回结果:

    {
        "errcode": 0,
        "errmsg": "ok"
    }

    参数说明:

    参数类型说明
    errcodeint32返回码
    errmsgstring错误码描述

    打卡规则字段说明

    参数是否必填适用的规则类型说明
    groupid更新是必填所有类型打卡规则id
    grouptype所有类型规则类型: 1-固定时间上下班;2-按班次上下班;3-自由上下班
    groupname所有类型规则名
    checkindate特定类型必填固定时间上下班打卡时间,「固定上时间上下班」类型时必填
    checkindate.workdays特定类型必填固定时间上下班
    自由签到
    工作日。若为固定时间上下班或自由签到,则1到6分别表示星期一到星期六,0表示星期日
    checkindate.checkintime特定类型必填固定时间上下班工作日上下班打卡时间信息
    checkindate.checkintime.time_id特定类型必填固定时间上下班时段标识,规则内唯一,大于0,小于99999
    checkindate.checkintime.work_sec特定类型必填固定时间上下班上班时间(距0点秒数,整分钟)
    checkindate.checkintime.off_work_sec特定类型必填固定时间上下班下班时间(距0点秒数,整分钟)
    checkindate.checkintime.remind_work_sec特定类型必填固定时间上下班上班提醒时间(距0点秒数,整分钟)
    checkindate.checkintime.remind_off_work_sec特定类型必填固定时间上下班下班提醒时间(距0点秒数,整分钟)
    checkindate.checkintime.allow_rest否,默认false固定时间上下班是否需要休息
    checkindate.checkintime.rest_begin_time否(allow rest为true的时候需要有)固定时间上下班休息开始时间,设置时需要将allow_rest设置为true
    checkindate.checkintime.rest_end_time否 (allow rest为true的时候需要有)固定时间上下班休息截止时间,设置时需要将allow_rest设置为true
    checkindate.checkintime.earliest_work_sec特定类型必填固定时间上下班上班最早时间(距0点秒数,整分钟)
    checkindate.checkintime.latest_work_sec特定类型必填固定时间上下班上班最晚时间(距0点秒数,整分钟)
    checkindate.checkintime.earliest_off_work_sec特定类型必填固定时间上下班下班最早时间(距0点秒数,整分钟)
    checkindate.checkintime.latest_off_work_sec特定类型必填固定时间上下班下班最晚时间(距0点秒数,整分钟)
    checkindate.checkintime.no_need_checkon否,默认false固定时间上下班不需要打上班卡(默认需要打卡)
    checkindate.checkintime.no_need_checkoff否,默认false固定时间上下班不需要打下班卡(默认需要打卡)
    checkindate.flex_time固定时间上下班弹性时间,晚于上班\早于下班不算迟到,单位ms
    旧字段,openapi创建和修改规则时无法使用该字段
    checkindate.allow_flex否,默认为false固定时间上下班是否允许弹性时间
    开启弹性打卡时,需要设置【迟到早退】或者【早到早走晚到晚走】其中一项
    checkindate.flex_on_duty_time否,有值时需要allow flex为true固定时间上下班允许迟到时间,单位:秒
    checkindate.flex_off_duty_time否,有值时需要allow flex为true固定时间上下班允许早退时间,单位:秒
    checkindate.max_allow_arrive_early否,有值时需要allow flex为true固定时间上下班当日允许早到早走最大时间,单位:秒
    checkindate.max_allow_arrive_late否,有值时需要allow flex为true固定时间上下班当日允许晚到晚走最大时间,单位:秒,max_allow_arrive_early、max_allow_arrive_early与flex_on_duty_time、flex_off_duty_time互斥,当设置其中一组时,另一组数值置0
    checkindate.late_rule否,有值时需要allow flex为true固定时间上下班晚走晚到时间规则信息
    checkindate.late_rule.offwork_after_time否,有值时需要allow_offwork_after_time为true固定时间上下班晚走的时间,距离最晚一个下班的时间单位:秒
    不超过600分钟
    checkindate.late_rule.onwork_flex_time否,有值时需要allow_offwork_after_time为true固定时间上下班第二天第一个班次允许迟到的弹性时间单位:秒
    不超过600分钟
    checkindate.late_rule.allow_offwork_after_time否,默认false固定时间上下班是否允许超时下班(下班晚走次日晚到)允许时onwork_flex_time,offwork_after_time才有意义
    checkindate.late_rule.timerules否,有值时需要allow_offwork_after_time为true固定时间上下班晚走晚到时间规则(timerules不为空,优先使用timerules)
    checkindate.late_rule.timerules.offwork_after_time否,有值时需要allow_offwork_after_time为true固定时间上下班晚走的时间 距离最晚一个下班的时间单位:秒
    不超过600分钟
    checkindate.late_rule.timerules.onwork_flex_time否,有值时需要allow_offwork_after_time为true固定时间上下班第二天第一个班次允许迟到的弹性时间单位:秒
    不超过600分钟
    spe_workdays固定时间上下班特殊工作日
    个数不超过366
    spe_workdays.timestamp固定时间上下班特殊日期-必须打卡日期时间戳,type为2时开始时间
    spe_workdays.notes固定时间上下班特殊日期备注
    字节长度不超过40
    spe_workdays.checkintime固定时间上下班特殊工作日的上下班打卡时间配置
    spe_workdays.checkintime.time_id固定时间上下班时段标识,规则内唯一,大于0,小于99999
    spe_workdays.checkintime.work_sec固定时间上下班上班时间(距0点秒数,整分钟)
    spe_workdays.checkintime.off_work_sec固定时间上下班下班时间(距0点秒数,整分钟)
    spe_workdays.checkintime.remind_work_sec固定时间上下班上班提醒时间(距0点秒数,整分钟)
    spe_workdays.checkintime.remind_off_work_sec固定时间上下班下班提醒时间(距0点秒数,整分钟)
    spe_workdays.type固定时间上下班类型,0时间点,1时间段,2两周重复
    type=0时,表示单个日期,填写timestamp时间戳
    type=1时,表示时间段,填写begtime和endtime(这里是闭区间,包括两端的时间)
    type=2时,表示按两周重复,填写timestamp和endtime,timestamp表示开始的日期,endtime表示结束时间
    spe_workdays.begtime固定时间上下班type为1时表示开始时间
    spe_workdays.endtime固定时间上下班type为1,2时表示结束时间
    开始时间和结束时间均传的为某天的零点时间戳,两端为闭区间,包括结束时间的那天
    spe_offdays所有类型特殊非工作日
    个数不超过366
    spe_offdays.timestamp所有类型特殊日期-不用打卡日期时间戳,type为2时开始时间
    spe_offdays.notes所有类型特殊日期备注
    spe_offdays.type所有类型类型,0时间点,1时间段,2两周重复
    spe_offdays.begtime所有类型type为1时表示开始时间
    spe_offdays.endtime所有类型type为1,2时表示结束时间
    sync_holidays否,默认为true所有类型是否同步法定节假日
    need_photo否,默认为false所有类型是否需要拍照,默认false
    wifimac_infos所有类型WIFI信息
    wifimac_infos与loc_infos不能同时为空
    wifimac_infos.wifiname所有类型WiFi打卡地点名称
    wifimac_infos.wifimac所有类型WIFI的无线路由器MAC地址
    note_can_use_local_pic否,默认为true所有类型备注不允许上传本地图片,默认可以使用本地图片
    allow_checkin_offworkday否,默认false固定时间上下班固定上下班是否允许非工作日打卡,默认不允许
    loc_infos所有类型地点信息
    wifimac_infos与loc_infos不能同时为空
    loc_infos.lat所有类型位置打卡地点纬度,是实际纬度的1000000倍,与腾讯地图一致采用GCJ-02坐标系统标准
    loc_infos.lng所有类型位置打卡地点经度,是实际经度的1000000倍,与腾讯地图一致采用GCJ-02坐标系统标准
    loc_infos.loc_title所有类型位置打卡地点名称
    loc_infos.loc_detail所有类型位置打卡地点详情
    loc_infos.distance所有类型允许打卡范围(米)
    range是 (至少有一种)所有类型人员信息
    range.party_id所有类型打卡人员中,部门节点的id
    range.userid所有类型打卡人员中,单个打卡人员节点的userid
    range.tagid所有类型打卡人员中,标签节点的标签id
    white_users所有类型白名单
    type否,默认为0所有类型打卡方式
    0-手机,2-考勤机,3-手机/考勤机
    reporterinfo所有类型汇报人
    reporterinfo.reporters所有类型汇报对象,每个汇报人用userid表示
    reporterinfo.reporters.userid所有类型vid
    reporterinfo.reporters.tagid所有类型标签id
    allow_apply_offworkday否,默认false所有类型是否允许补卡,默认不允许
    allow_apply_bk_cnt否,默认-1所有类型每月最多补卡次数,默认-1表示不限制
    allow_apply_bk_day_limit否,默认-1所有类型允许补卡时限,默认-1表示不限制 ,1表示当天,2表示当天和昨天,最大不超过180天
    buka_limit_next_month否,默认-1所有类型补卡截止日期:次月第n天不能补卡,-1表示不开启截止日期
    option_out_range否,默认为0所有类型范围外打卡
    0-不在公司范围内视为异常,1-不在公司范围内视为外勤,2-禁止不在公司范围内打卡
    schedulelist特定类型必填按班次上下班自定义排班规则所有排班
    schedulelist.schedule_id特定类型必填按班次上下班班次id,规则内唯一
    必须存在schedule_id=0的排班,班次名称为休息,且不能有checkintime字段
    schedulelist.schedule_name特定类型必填按班次上下班班次名称
    规则内唯一
    schedulelist.time_section特定类型必填按班次上下班班次上下班时段信息
    schedulelist.time_section.time_id特定类型必填按班次上下班与checkindate.checkintime定义一致
    schedulelist.time_section.work_sec特定类型必填按班次上下班同checkintime里的定义
    schedulelist.time_section.off_work_sec特定类型必填按班次上下班同checkintime里的定义
    schedulelist.time_section.remind_work_sec特定类型必填按班次上下班上班提醒时间,表示为距离当天0点的秒数。
    schedulelist.time_section.remind_off_work_sec特定类型必填按班次上下班下班提醒时间,表示为距离当天0点的秒数。
    schedulelist.time_section.allow_rest否,默认为false按班次上下班是否需要休息
    schedulelist.time_section.rest_begin_time否 (allow rest为true的时候需要有)按班次上下班休息开始时间,设置时需要将allow_rest设置为true
    schedulelist.time_section.rest_end_time否(allow rest为true的时候需要有)按班次上下班休息截止时间,设置时需要将allow_rest设置为true
    schedulelist.time_section.earliest_work_sec特定类型必填按班次上下班上班最早时间,单位:秒
    需要是60的倍数
    schedulelist.time_section.latest_work_sec特定类型必填按班次上下班上班最晚时间,单位:秒
    需要是60的倍数
    schedulelist.time_section.earliest_off_work_sec特定类型必填按班次上下班下班最早时间,单位:秒
    需要是60的倍数
    schedulelist.time_section.latest_off_work_sec特定类型必填按班次上下班下班最晚时间,单位:秒
    需要是60的倍数
    schedulelist.time_section.no_need_checkon否,默认false按班次上下班不需要打上班卡,默认需要打卡
    schedulelist.time_section.no_need_checkoff否,默认false按班次上下班不需要打下班卡,默认需要打卡
    schedulelist.allow_flex否,默认true按班次上下班是否允许弹性时间
    开启弹性打卡时,需要设置【迟到早退】或者【早到早走晚到晚走】其中一项
    schedulelist.flex_on_duty_time否,有值时需要allow flex为true按班次上下班允许迟到时间,单位:秒
    不超过360分钟
    schedulelist.flex_off_duty_time否,有值时需要allow flex为true按班次上下班允许早退时间,单位:秒
    不超过360分钟
    schedulelist.late_rule否,有值时需要allow flex为true按班次上下班晚走晚到时间规则信息
    schedulelist.late_rule.offwork_after_time否,有值时需要allow_offwork_after_time为true按班次上下班晚走的时间,距离最晚一个下班的时间单位:秒
    不超过600分钟
    schedulelist.late_rule.onwork_flex_time否,有值时需要allow_offwork_after_time为true按班次上下班第二天第一个班次允许迟到的弹性时间单位:秒
    不超过600分钟
    schedulelist.late_rule.allow_offwork_after_time否,默认false按班次上下班是否允许超时下班(下班晚走次日晚到)允许时onwork_flex_time,offwork_after_time才有意义
    schedulelist.late_rule.timerules否,有值时需要allow_offwork_after_time为true按班次上下班晚走晚到时间规则(timerules不为空,优先使用timerules)
    schedulelist.late_rule.timerules.offwork_after_time否,有值时需要allow_offwork_after_time为true按班次上下班晚走的时间 距离最晚一个下班的时间单位:秒
    不超过600分钟
    schedulelist.late_rule.timerules.onwork_flex_time否,有值时需要allow_offwork_after_time为true按班次上下班第二天第一个班次允许迟到的弹性时间单位:秒
    不超过600分钟
    schedulelist.max_allow_arrive_early否,有值时需要allow flex为true按班次上下班当日允许早到早走最大时间,单位:秒
    schedulelist.max_allow_arrive_late否,有值时需要allow flex为true按班次上下班当日允许晚到晚走最大时间,单位:秒,max_allow_arrive_early、max_allow_arrive_early与flex_on_duty_time、flex_off_duty_time互斥,当设置其中一组时,另一组数值置0
    offwork_interval_time自由上下班自由签到上下班间隔时间,单位:秒
    仅自由签到规则需设置该字段
    use_face_detect否,默认false所有类型是否人脸检测
    open_face_live_detect否,默认false所有类型活体检测开关
    开启活体检测时需要先开启人脸检测use_face_detect
    ot_info_v2特定类型必填所有类型加班配置
    ot_info_v2.workdayconf特定类型必填所有类型工作日加班配置
    ot_info_v2.workdayconf.allow_ot特定类型必填所有类型是否允许加班
    ot_info_v2.workdayconf.type否,默认为2所有类型类型,0以加班申请和打卡时间取交集,1以打卡时间为准,2只以审批单为准
    ot_info_v2.workdayconf.apply所有类型只以审批为准时配置
    ot_info_v2.workdayconf.apply.restinfo所有类型休息时间配置
    ot_info_v2.workdayconf.apply.restinfo.type所有类型休息扣除配置,0不扣除,1指定休息时间,2按加班时长扣除
    ot_info_v2.workdayconf.apply.restinfo.fix_time_rule_list所有类型指定休息时间扣除的配置
    不超过10个
    ot_info_v2.workdayconf.apply.restinfo.fix_time_rule_list.fix_time_begin_sec特定类型必填所有类型休息开始时间,单位:秒
    范围:00:00-次日23:59
    ot_info_v2.workdayconf.apply.restinfo.fix_time_rule_list.fix_time_end_sec特定类型必填所有类型休息结束时间,单位:秒
    范围:00:00-次日23:59
    ot_info_v2.workdayconf.apply.restinfo.cal_ottime_rule所有类型按加班时长扣除的配置
    ot_info_v2.workdayconf.apply.restinfo.cal_ottime_rule.items所有类型扣除规则
    不超过5个
    ot_info_v2.workdayconf.apply.restinfo.cal_ottime_rule.items.ot_time所有类型加班满足有ot_time则扣除rest_time,单位:秒。
    每个配置的ot_time应该是递增的
    ot_info_v2.workdayconf.apply.restinfo.cal_ottime_rule.items.rest_time所有类型按加班时长扣除的休息时长,单位:秒
    ot_time不小于rest_time
    ot_info_v2.workdayconf.checkin所有类型只以打卡时间为准的配置
    ot_info_v2.workdayconf.checkin.ot_time_start否,默认30分钟所有类型下班后多久开始计算加班,单位:秒
    不超过720分钟
    ot_info_v2.workdayconf.checkin.ot_time_min否,默认30分钟所有类型最小加班时长,单位:秒
    不超过720分钟
    ot_info_v2.workdayconf.checkin.ot_time_max否,默认240分钟所有类型最大加班时长,单位:秒
    不超过720分钟
    ot_info_v2.workdayconf.checkin.restinfo所有类型休息时间配置
    使用同ot_info_v2.workdayconf.apply.restinfo
    ot_info_v2.workdayconf.applycheckin所有类型审批和打卡取交集配置
    ot_info_v2.workdayconf.applycheckin.restinfo所有类型休息时间配置
    使用同ot_info_v2.workdayconf.apply.restinfo
    ot_info_v2.workdayconf.ot_trans_enable否,默认为false所有类型允许加班时长记为调休和加班费
    ot_info_v2.workdayconf.ot_trans_type否,默认为1所有类型1记为调休,2记为加班费
    ot_info_v2.workdayconf.vacation所有类型同步假期信息(记为调休)
    ot_info_v2.workdayconf.vacation.trans_ratio否,默认为100所有类型调休比例,百分比。
    默认值为100表示1:1,最大为1:30,即trans_ratio最大值为3000。
    ot_info_v2.workdayconf.vacation.sync_vacation否,默认为true所有类型是否自动关联假勤
    ot_info_v2.restdayconf是,allow_ot、type必填所有类型休息日加班配置
    定义同ot_info_v2.workdayconf
    ot_info_v2.holidayconf是,allow_ot、type必填所有类型节假日加班配置
    定义同ot_info_v2.workdayconf
    sync_out_checkin否,默认false所有类型外出打卡同步至上下班
    buka_remind否,默认没有所有类型补卡提醒
    buka_remind.open_remind否,默认没有所有类型是否打开
    buka_remind.buka_remind_day否,默认没有所有类型补卡提醒日期
    不超过30
    buka_remind.buka_remind_month否,默认没有所有类型0当月,1次月
    buka_restriction否,默认为0所有类型补卡指定异常类型,按比特位设置,大端模式,某位bit置位为1表示关闭某类型。从低到高四个比特位分别表示缺卡类型、迟到类型、早退类型、其他异常类型。为默认值0表示所有异常类型均允许补卡。
    span_day_time否,默认0自由上下班自由上下班规则的跨天时间,表示为距离0点的秒数,必须为整分钟的秒数,且小于24小时。
    standard_work_duration否,默认-1自由上下班自由上下班规则的工作时长(秒),-1表示不限制工作时长,否则值应该以半小时为步长,从1小时开始递增,最多不超过24小时。如:1小时,1.5小时,2小时,2.5小时...23小时,23.5小时,24小时。

    错误信息列表

    errcodeerrmsg错误说明
    301093invalid buka_remind parameterbuka_remind_month为0表示本月,此时buka_remind_day不可小于15,不可超过30
    buka_remind_month为1表示次月,此时buka_remind_day不可小于1,不可超过26
    301093flex_on_duty_time or flex_off_duty_time invalidflex_on_duty_time、flex_off_duty_time最大值不超过360分钟
    301094flex_time/limit_aheadtime/limit_offtime/noneed_offwork is old feature, use new featureflex_time/limit_aheadtime/limit_offtime/noneed_offwork是旧字段,不建议使用
    301094flex_time/limit_aheadtime/noneed_offwork is old feature, use new featureflex_time/limit_aheadtime/noneed_offwork为旧字段,不建议使用。
    301093invalid groupname, groupname cannot be empty and contains a maximum of 40 charactersgroupname不能为空,切最大字符个数不超过40
    301093invalid group typegrouptype的范围为1、2、3
    301093invalid late rule, late rule must be a multiple of 15 minutes, with a maximum of 600 minuteslate_rule中的onwork_flex_time、offwork_after_time不可超过600分钟,且onwork_flex_time需要大于offwork_after_time
    301093invalid flex checkin rule, field has to be a multiple of 300 and not exceed and not exceed 21600max_allow_arrive_early/max_allow_arrive_late/flex_on_duty_time/flex_off_duty_time,设置时需要是5分钟的倍数,且不超过360分钟
    301094ot_info is old feature use ot_info_v2ot_info是旧字段,不建议使用
    301093conflict time idtime_id需要规则内唯一
    301093invalid wifi macwifimac不合法
    301093conflict wifi macwifimac需要规则内唯一
    301093invalid wifi infowifiname、wifimac、bssid均不可为空,且wifiname字符个数不可超过40个
    301093need wifi or locationwifi和地点设置不可同时为空
    301093wifi or location size maximum 500wifi或地点的个数设置不可超过500
    301093a valid schedule is required for freegroup除了休息排班之外,至少需要一个有效的排班
    301093empty checkin range打卡范围range中party_id、vid、tagid不可同时为空
    301093invalid checkin type, group.type need to be one of 0/1/3打卡方式,打卡方式0-手机, 1-u盘考勤机, 3-手机\云考勤机融合打卡
    301093invalid earliest_work_sec/latest_work_sec or earliest_off_work_sec/latest_off_work_sec打卡时间规则无效
    上班最早可打卡时间earliest_work_sec必须小于上班最晚可打卡时间latest_work_sec
    下班最早可打卡时间earliest_off_work_sec必须小于下班最晚可打卡时间earliest_off_work_sec
    301093invalid latest_off_work_sec打卡时间规则无效
    下班最晚可打卡时间必须大于等于下班时间off_work_sec
    下班最晚可打卡时间必须小于下班时间off_work_sec + 86400
    301093invalid earliest_off_work_sec打卡时间规则无效
    下班最早可打卡时间earliest_off_work_sec必须大于上班时间work_sec
    下班最早可打卡时间earliest_off_work_sec必须小于下班时间off_work_sec
    301093invalid earliest_work_sec or latest_work_sec打卡时间规则无效,表示上下班的最早最晚可打卡时间配置有误。具体配置要求如下:
    上班最早可打卡时间earliest_work_sec必须小于上班时间work_sec
    上班最晚可打卡时间latest_work_sec必须大于上班时间work_sec
    上班最晚可打卡时间latest_work_sec必须小于下班时间off_work_sec
    301093invalid location distance地点距离的设置必须在以下枚举之中,100、200、300、400、500、600、700、800、900、1000、1500、2000、2500、3000
    301093invalid location info地点设置时,经度lng及纬度lat设置不可为空,且需要满足有效范围:经度-180度到180度,lat 纬度-90度到90度。
    loc_title及loc_detail不可为空,且字符个数不可超过40
    distance不可超过3000米
    301093checkin time size must greater than 0 and less than or equal to 4固定上下班,打卡时段checkintime的个数需要大于0且不超过4
    301093checkindate size must greater than 0 and less than or equal to 7固定上下班,checkindate个数需要大于0且不超过7
    301093checkindate workdays invalid, checkin time size must greater than 0 and less than or equal to 7固定上下班,checkindate中的workdays需要在0~6之间,个数不超过7个,且规则内不可重复
    301093fixgroup, invalid checkin time earliest_work_sec or earliest_off_work_sec固定上下班,earliest_work_sec、latest_work_sec、earliest_off_work_sec、latest_off_work_sec不可小于0。
    earliest_work_sec不可大于次日00:00,latest_work_sec不可大于次日23:59,earliest_off_work_sec以及latest_off_work_sec不可大于次日04:00
    301093time section size must greater than 0 and less than or equal to 4固定上下班及自定义排班,打卡时段的配置,个数需要介于0~4之间
    301093checkin time work_sec or off_work_sec invalid固定上下班及自定义排班,打卡时段配置,
    上班时间必须小于下班时间,且间隔时间必须大于1分钟,间隔时间必须小于24小时
    301093checkin time rest time invalid固定上下班及自定义排班,打卡时段配置,若开启允许休息allow_rest,则需要配置休息开始时间rest_begin_time与休息结束时间rest_end_time
    休息开始时间rest_begin_time不可小于或等于上班时间
    休息开始时间rest_begin_time不可大于或等于下班时间
    休息结束时间rest_end_time不可小于或等于上班时间
    休息结束时间rest_end_time不可大于或等于下班时间
    休息开始时间rest_begin_time必须小于休息结束时间rest_end_time
    301093invalid checkin time, need earliest_work_sec/latest_work_sec/earliest_off_work_sec/latest_off_work_sec固定上下班及自定义排班,打卡时段配置,上下班可打卡时间必填
    earliest_off_work_sec、latest_work_sec、earliest_work_sec、latest_off_work_sec
    301093checkin time invalid, value has to be a multiple of 60固定上下班及自定义排班,打卡时段配置,需要为整分钟,即60的倍数,包括如下字段
    work_sec、off_work_sec、remind_work_sec、remind_off_work_sec、rest_begin_time、rest_end_time、earliest_work_sec、latest_work_sec、earliest_off_work_sec、latest_off_work_sec
    301093checkin time off_work_sec invalid固定上下班及自定义排班,打卡时段配置,off_work_sec必填,且不可大于等于次日23:59点
    301093checkin time work_sec invalid固定上下班及自定义排班,打卡时段配置,work_sec必填,且不可大于次日00:00点(可等于)
    301093checkin time need remind_work_sec and remind_off_work_sec固定上下班及自定义排班,上下班打卡提醒时间remind_off_work_sec与remind_work_sec必填
    301093invalid reporter, need vid or tagid汇报对象若填写,需要指定vid或tagid
    301093invalid otinfo rest_time or ot_time加班规则,按加班时长扣除休息时间,休息时间不可大于加班时间,需要为15分钟的倍数且不超过360分钟
    301093need otinfo rest_time and ot_time加班规则,按加班时长扣除休息时间,休息时间和加班时间必填
    301093invalid otinfo restinfo, ot_time needs to be incremented加班规则,按加班时长扣除休息时间,cal_ottime_rule中的items个数大于1时,ot_time需要不断递增,且需要为15分钟的倍数
    301093otinfo restinfo cal_ottime_rule items size must greater than 0 and less than or equal to 5加班规则,按加班时长扣除休息时间,cal_ottime_rule中的items个数需要大于0且不超过5
    301093if rest is not enabled, the rest period cannot be configured加班规则,未开启允许休息,不可配置休息时间
    301093otinfo restinfo fix_time_rule_list size must greater than 0 and less than or equal to 10加班规则,休息类型是指定时间扣除,休息时段必须设置至少一个且不超过10个
    301093apply.restinfo.type invalid加班规则,apply.restinfo.type不可超过2
    301093applycheckin.restinfo.type invalid加班规则,applycheckin.restinfo.type不可超过2
    301093checkin.restinfo.type invalid加班规则,checkin.restinfo.type不可超过2
    301093invalid fix_time_begin_sec or fix_time_end_sec, value has to be a multiple of 60加班规则,fix_time_begin_sec、fix_time_end_sec需要设置为整分钟,即60的倍数。
    fix_time_begin_sec、fix_time_end_sec之间不可超过24小时。
    多个休息时段fix_time_begin_sec、fix_time_end_sec之间不可存在交集。
    301093otinfo vacation.trans_ratio invalid加班规则,ot_info_v2中的trans_ratio,最大值不超过3000,即换算倍数不超过30
    301093invalid otinfo ot_time_min or ot_time_max加班规则,ot_time_min、ot_time_max不可超过720分钟,且ot_time_min必须小于ot_time_max
    301093otinfo ot_trans_type invalid加班规则,ot_trans_type 不可超过2
    301093vacation.trans_ratio invalid加班规则,trans_ratio不可超过3000
    301093otinfo type invalid加班规则,type不可超过2
    301093ot_info is old feature use ot_info_v2 instead加班规则的配置请使用ot_info_v2字段
    301093otinfo select the deduction by overtime hours, the deduction by rest period is not allowed加班规则的休息配置,选择按加班时长扣除,不可设置按休息时段扣除的字段
    301093otinfo select the deduction by rest period, the deduction by overtime hours is not allowed加班规则的休息配置,选择按休息时段扣除,不可设置按加班时长扣除的字段
    301093invalid ot_info_v2, ot_info_v2 is necessary加班规则ot_info_v2必填
    301093invalid ot_info_v2, workdayconf/restdayconf/holidayconf is necessary加班规则workdayconf/restdayconf/holidayconf
    301094only freegroup has schedulelist仅grouptype为2的自定义排班可设置schedulelist
    301093invalid flex checkin rule, the value of the field needs to be set开启弹性打卡时,需要设置【迟到早退】或者【早到早走晚到晚走】其中一项
    301093invalid buka_limit_next_month, the maximum value is 28每月补卡截止日期buka_limit_next_month默认-1不限制,不可小于-1或等于0或大于28
    301093invalid allow_apply_bk_cnt, the maximum value is 99每月最多补卡次数allow_apply_bk_cnt默认-1不限制,不可小于-1或大于99
    301093flex checkin rule need allow flex若设置late_rule,则需要设置allow_flex为true
    301093invalid reporter若设置了汇报对象reporterinfo,则reporters中vid、tagid不可同时为空
    301093checkin time remind_work_sec invalid上班提醒时间不可晚于上班时间,且不可早于上班20分钟,只可以为准点、提前5分钟、提前10分钟、提前15分钟、提前20分钟
    301093need allow_apply_offworkday, set the fields related to buka requires allow_apply_offworkday to be enabled设置补卡相关字段需要开启允许补卡
    301093need open_remind, set buka_remind_day/buka_remind_month requires open_remind first设置buka_remind_day/buka_remind_month需要设置补卡提醒open_remind为true
    301093invalid face detect, open_face_live_detect requires use_face_detect first设置活体检测open_face_live_detect为true时需要先设置人脸识别use_face_detect为true
    301093late rule need open allow_offwork_after_time设置晚走晚到需要开启allow_offwork_after_time
    301093set rest_begin_time or rest_end_time need allow_rest first设置休息时间字段rest_begin_time、rest_end_time时需要将allow_rest设置为true
    301093invalid flex checkin rule, , only one item can be set弹性上下班设置,【迟到早退】flex_on_duty_time/flex_off_duty_time和【早到早走、晚到晚走】max_allow_arrive_early/max_allow_arrive_late不可同时设置
    301093special offday should not have checkintime特殊非工作日中type的字段不可大于2,且不可配置上下班规则
    invalid specialday timestamp, only future dates are allowed here特殊工作日/非工作日,仅允许设置未来日期
    301093invalid specailday begtime特殊工作日/非工作日的begtime,需要是某天零点的时间戳,且需要大于2000年1月1日零点
    301093invalid specailday endtime特殊工作日/非工作日的endtime,需要是某天零点的时间戳,且需要大于2000年1月1日零点
    301093conflict specailday特殊工作日/非工作日的日期设置,不可有交集或重叠
    301093invalid specailday timestamp特殊工作日/非工作日的type为0时,需要设置timestamp为某天零点的时间戳,且需要大于2000年1月1日零点
    301093invalid specailday begtime or endtime特殊工作日/非工作日的type为1时,需要设置begtime以及endtime,且endtime不可小于begtime
    301093the period of specialday cannot exceed one year特殊工作日/非工作日的type为1/2时,时间范围不可超过一年
    301093special day maximum value 366特殊工作日/特殊非工作日的个数设置不超过366
    301094special workday should not have earliest_work_sec/latest_work_sec/earliest_off_work_sec/latest_off_work_sec特殊工作日不可设置earliest_work_sec/latest_work_sec/earliest_off_work_sec/latest_off_work_sec字段
    301093special workday checkin time work_sec/off_work_sec invalid特殊工作日的上下班时间配置,
    上下班时间需要为整分钟;
    上班时间不可早于当日04点,不可晚于18:00,
    下班时间不可早于当日04点,不超过次日03:00
    上班时间不可大于下班时间,且下班时间不可超过下班时长24小时
    301093special work day need checkintime特殊工作日中type的字段不可大于2,且需要配置上下班规则
    301093special day notes cannot be empty特殊日期的备注不可为空
    301093special work day type invalid特殊日期的type不可大于2
    301093invalid option_out_range, the maximum is 2外勤标示option_out_range,不可大于2
    301093invalid late rule, offwork_after_time should less than onwork_flex_time晚走晚到的设置中offwork_after_time需要大于等于onwork_flex_time
    301093checkin time remind_off_work_sec invalid下班提醒时间不可早于下班时间,且不可晚于下班60分钟,只可以为准点、下班后10分钟、下班后20分钟、下班后30分钟、下班后60分钟
    301093there should be no overlap between the checkin times一天多个打卡时段,上下班区间不可有交集,可打卡时间不可有交集
    301093invalid allow_apply_bk_day_limit, the maximum value is 180允许补卡时限allow_apply_bk_day_limit默认-1不限制,不可小于-1或大于180
    301093a rest schedule with id 0 is required for freegroup自定义排班,必须有一个班次为休息且scheduleid为0
    301093schedule time section, earliest_work_sec for the first period shall not be more than 4 hours before work_sec自定义排班,第一个时段的上班最早可打卡时间不可早于上班时间4小时以上
    301093conflict schedule name自定义排班,排班名称不可重复
    301093conflict schedule id自定义排班,schedule_id不可重复
    301093rest schedule should not have checkin time自定义排班,schedule_id=0的休息排班,不可设置time_section
    301093invalid rest schedule name自定义排班,schedule_id=0的休息排班,schedule_name必须为"休息"
    301093invalid schedule name自定义排班,schedule_name不可为空且字符个数不可超过40个
    301093free group or unrestrain group do not have special work day自定义排班/自由签到不可设置特殊工作日
    301094freegroup do not have checkindate自定义排班不可设置checkindate
    301093freegroup schedule size maximum 50自定义排班最多添加50个排班
    301093invalid offwork_interval_time, the value must be a multiple of 5 minutes and the maximum value cannot exceed 1435 minutes自由签到,上下班间隔校验offwork_interval_time,不可超过1435分钟,且需要是5分钟的倍数
    301094unrestrain checkingroup do not have schedule自由签到规则不可设置schedulelist字段
    301093need fix_time_begin_sec and fix_time_end_sec加班配置中的休息时间配置为指定休息时间类型,则休息开始时间与休息结束时间字段必填
    301094When the grouptype is 1, the 'span_day_time' field should not appear in the request.固定上下班规则,不可设置‘span_day_time’字段。
    301094When the grouptype is 1, the 'standard_work_duration' field should not appear in the request.固定上下班规则,不可设置‘standard_work_duration’字段。
    301094When the grouptype is 2, the 'span_day_time' field should not appear in the request.自定义上下班规则,不可设置‘span_day_time’字段。
    301094When the grouptype is 2, the 'standard_work_duration' field should not appear in the request.自定义上下班规则,不可设置‘standard_work_duration’字段。
    301093The value of 'span_day_time' must be greater than or equal to 0 and less than 86400.自由签到跨天时间不能超过24小时。
    301093'span_day_time' must be a whole number of minutes, meaning it should be divisible by 60.自由签到跨天时间必须设置为整分钟数。
    301093The value of 'standard_work_duration' can only be -1 or increments of half hour, starting from 1 hour, such as 1.5 hours, 2 hours, 2.5 hours, all the way up to 23 hours, 23.5 hours, and 24 hours.自由签到工作时长只能设置为-1,或者以半小时为步长,从1小时开始递增,最多不超过24小时。如:1小时,1.5小时,2小时,2.5小时...23小时,23.5小时,24小时。
    上一篇
    获取设备打卡数据
    下一篇
    概述