Skip to content

节日假期接口

1. 节日假期

1.1 节日列表

  • 接口地址
POST /v1/holiday/getFestival
  • 请求参数
名称类型是否必需示例描述
start_datestringN"2025-02-20"开始日期;默认当天
  • 返回结果
名称类型描述
idint节日ID
namestring节日名称
holiday_start_datestring节日开始日期
holiday_end_datestring节日结束日期
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": [
        {
            "id": 10,
            "name": "清明节",
            "holiday_start_date": "2025-04-03",
            "holiday_end_date": "2025-04-06"
        },
        {
            "id": 11,
            "name": "劳动节",
            "holiday_start_date": "2025-04-30",
            "holiday_end_date": "2025-05-05"
        },
        {
            "id": 12,
            "name": "端午节",
            "holiday_start_date": "2025-05-30",
            "holiday_end_date": "2025-06-02"
        },
        {
            "id": 14,
            "name": "中秋节",
            "holiday_start_date": "2025-10-06",
            "holiday_end_date": "2025-10-06"
        },
        {
            "id": 13,
            "name": "国庆节",
            "holiday_start_date": "2025-09-30",
            "holiday_end_date": "2025-10-08"
        }
    ]
}
  • 使用示例

1.2 日历假期

  • 接口地址
POST /v1/holiday/getHoliday
  • 请求参数
名称类型是否必需示例描述
start_datestringY"2025-09-26"日历开始时间,不能小于2年前
end_datestringY"2025-10-16"日历结束时间,不能大于2年后,时间间隔小于30天
  • 返回结果
名称类型描述
dataobject日期 : 节日/假期/补班,显示标签
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {
        "2025-09-28": "班",
        "2025-10-01": "国庆节",
        "2025-10-02": "休",
        "2025-10-03": "休",
        "2025-10-04": "休",
        "2025-10-05": "休",
        "2025-10-06": "中秋节",
        "2025-10-07": "休",
        "2025-10-08": "休",
        "2025-10-11": "班"
    }
}

鑫泓佳智能硬件通信协议文档