查询单个办公时间的信息

查询单个办公时间的详细信息。

请求 URL

GET {base_url}/{api_path}/businesshour/get?access_token={access_token}

请求参数

参数 是否必填 类型 说明
id 是 Integer 办公时间的唯一 ID。
注: 可通过 查询办公时间列表 接口查询办公时间 ID。

响应参数

参数 类型 说明
errcode Integer 返回错误码。
  • 0:请求成功。
  • 非零值:请求失败。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息。
errmsg String 返回信息。
  • SUCCESS:请求成功。
  • FAILURE:请求失败。
data Object<Business_Hour> 办公时间的详细信息。
Business_Hour
参数 类型 说明
id Integer 办公时间的唯一 ID。
timezone_id Integer 关联时区的 ID。
months String 办公时间适用的月份。
  • all:每月
  • jan:一月
  • feb:二月
  • mar:三月
  • apr:四月
  • may:五月
  • jun:六月
  • jul:七月
  • aug:八月
  • sep:九月
  • oct:十月
  • nov:十一月
  • dec:十二月
days_of_week String 办公时间适用的星期。
  • all:每天
  • sun:周日
  • mon:周一
  • tue:周二
  • wed:周三
  • thu:周四
  • fri:周五
  • sat:周六
days String 办公时间适用的日期。
  • all:每月的每一天
  • 1-31:每月指定的日期
office_times Array<Time_Period> 办公时间段列表。
reset_times Array<Time_Period> 休息时间段列表。
time_condition_switch Integer 是否启用高级时间条件。
  • 0:禁用。
  • 1:启用。
remark String 办公时间的备注。
Time_Period
参数 类型 说明
value String 时间段,格式为 HH:MM-HH:MM。

示例

请求示例

GET /openapi/v1.0/businesshour/get?id=1&access_token=gwakjgu9ZBUfz36wql4ndsVKkryI0kdj HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com

响应示例

HTTP/1.1 200 OK
{
  "errcode": 0,
  "errmsg": "SUCCESS",
  "submsg": "",
  "data": {
    "id": 1,
    "office_times": [
      {
        "value": "09:00-18:00"
      }
    ],
    "reset_times": [
      {
        "value": "12:00-13:00"
      }
    ],
    "days_of_week": "mon tue wed thu fri",
    "time_condition_switch": 0,
    "months": "",
    "days": "",
    "remark": "",
    "timezone_id": 1
  }
}