按 ID 查询班次
GET
https://open.feishu.cn/open-apis/attendance/v1/shifts/{shift_id}
错误码
HTTP状态码 | 错误码 | 描述 | 排查建议 |
---|---|---|---|
400 | 1220001 | 参数错误 | 请检查参数是否符合要求 |
400 | 1220002 | 租户不存在 | 请检查 tenant_access_token 是否正确 |
500 | 1225000 | 系统错误 | 详见错误信息 |
500 | 1226000 | 班次服务系统错误 | 详见错误信息 |
400 | 1226003 | 班次不存在 | 请检查 shift_id 是否正确 |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://open.feishu.cn/open-apis/attendance/v1/shifts/6919358778597097404' \
--header 'Authorization;'
响应示例响应示例
{
"code": 0,
"msg": "success",
"data": {
"shift_id": "6919358778597097404",
"shift_name": "早班",
"punch_times": 1,
"is_flexible": false,
"flexible_minutes": 60,
"flexible_rule": [
{
"flexible_early_minutes": 60,
"flexible_late_minutes": 60
}
],
"no_need_off": true,
"punch_time_rule": [
{
"on_time": "9:00",
"off_time": "18:00, 第二天凌晨2点, 26:00",
"late_minutes_as_late": 30,
"late_minutes_as_lack": 60,
"on_advance_minutes": 60,
"early_minutes_as_early": 30,
"early_minutes_as_lack": 60,
"off_delay_minutes": 60,
"late_minutes_as_serious_late": 40
}
],
"late_off_late_on_rule": [
{
"late_off_minutes": 60,
"late_on_minutes": 30
}
],
"rest_time_rule": [
{
"rest_begin_time": "13:00",
"rest_end_time": "14:00"
}
]
}
}
请求参数
Path 参数
shift_id
string
必需
示例值:
6919358778597097404
Header 参数
Authorization
string
必需
默认值:
Bearer {{access_token}}
Content-Type
string
必需
默认值:
application/json; charset=utf-8