GET 查询考勤班次列表
参数位置:此接口无需 query 或 body 参数。 GET 查询。无参数。返回全部考勤班次(名称、班次类型、上下班时间、弹性时间、午休时间、是否默认)。班次类型以 typeId、typeName(关联的班次类型ID、名称)为准,未关联班次类型的(钉钉/飞书/企微同步的班次、找不到对应类型的旧班次)为空;type 是类型值,typeDesc 是按类型值写死的旧叫法(1弹性班制、2排班制、其他固定班制),不代表租户配置的类型名称。flexIn、flexOut 都有值的班次按弹性打卡计算考勤。
| 接口编码 | 所需范围 | 后端接口 |
|---|---|---|
office.attendance.schedule.list | office:read | GET /v1/attendance/schedules(comap-office) |
请求示例
curl -X POST https://open.risemap.cn/v1/api/invoke \
-H "Authorization: Bearer <访问令牌>" \
-H "Content-Type: application/json" \
-d '{
"apiCode": "office.attendance.schedule.list"
}'
响应 data 字段
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | string | — | — |
name | string | — | — |
type | integer(int32) | — | — |
typeDesc | string | — | — |
typeId | string | — | — |
typeName | string | — | — |
workIn | string | — | — |
workOut | string | — | — |
flexIn | string | — | — |
flexOut | string | — | — |
lunchStart | string | — | — |
lunchEnd | string | — | — |
isDefault | integer(int32) | — | — |
enabled | integer(int32) | — | — |
错误处理
响应统一信封 { code, message, data },code == 200 为成功。以下是本接口可能返回的开放平台层错误:
| 错误码 | 说明 | 可重试 |
|---|---|---|
| 92101 | 访问凭证无效 | 否 |
| 92201 | 接口未登记或已停用 | 否 |
| 92202 | 超出凭证授权范围——本接口需 office:read | 否 |
| 92204 | 绑定员工无此接口的功能权限 | 否 |
| 92203 | 上游服务调用失败 | 是 |
| 92301 | 请求过于频繁 | 是 |
除此之外,comap-office 自身的业务校验失败会原样透传其业务码与提示
(如字段校验、状态不允许、数据不存在),这类码不在开放平台的号段内,
以响应里的 message 为准。完整的平台层错误码见错误码说明。
← 返回考勤