{
  "openapi": "3.0.3",
  "info": {
    "title": "节假日查询",
    "description": "通过本数据，可以查询节假日、加班日期，以及每个日期的对应的国际日和我国传统节日的简介。广泛使用于日程安排、证券投资、日历等功能的应用中展示。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/894-7": {
      "x-pointCode": 7,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "调休日列表查询",
        "description": "查询某一年的调休日,，最早可以查到公元2018年",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "ret_code": {
                              "type": "number",
                              "description": "0表现查询成功，-1表示查询失败"
                            },
                            "remark": {
                              "type": "string",
                              "description": "错误信息"
                            },
                            "inverse_days": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "description": "调休的节日"
                                  },
                                  "end": {
                                    "type": "string",
                                    "description": "结束的日期"
                                  },
                                  "begin": {
                                    "type": "string",
                                    "description": "开始的日期"
                                  }
                                }
                              },
                              "description": "当年所有调休日列表"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "894_7_POST",
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "description": "按年来检索调休日，要查询的年份",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/894-6": {
      "x-pointCode": 6,
      "x-mode": "mapping",
      "x-read-timeout": 10,
      "x-connect-timeout": 10,
      "post": {
        "summary": "节假日查询",
        "description": "目前支持2018/2019/2020/2021/2022/2023年，数据持续更新中.....",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "holiday": {
                              "type": "string",
                              "description": "节日名称，工作日时显示“无”，周末时显示“周末”，节日时显示节日名称"
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "0表示成功，其他为失败"
                            },
                            "weekDay": {
                              "type": "number",
                              "description": "星期几的数字"
                            },
                            "cn": {
                              "type": "string",
                              "description": "英期几的中文名"
                            },
                            "holiday_remark": {
                              "type": "string",
                              "description": "节日备注"
                            },
                            "en": {
                              "type": "string",
                              "description": "星期几的英文名"
                            },
                            "day": {
                              "type": "string",
                              "description": "查询的日期"
                            },
                            "type": {
                              "type": "string",
                              "description": "1为工作日，2为周末，3为节假日"
                            },
                            "end": {
                              "type": "string",
                              "description": "节日或周末结束时间，如果是工作日，此字段为空串"
                            },
                            "begin": {
                              "type": "string",
                              "description": "节日或周末开始时间，如果是工作日，此字段为空串"
                            },
                            "h": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "day": {
                                    "type": "string",
                                    "description": "节日公历日期"
                                  },
                                  "genus": {
                                    "type": "string",
                                    "description": "节日种类，public表示公众日或国际日，traditional表示传统节日"
                                  },
                                  "info": {
                                    "type": "string",
                                    "description": "节日的简介。"
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "节日的名称"
                                  },
                                  "lunaDay": {
                                    "type": "string",
                                    "description": "节日的农历日期"
                                  },
                                  "origin": {
                                    "type": "string",
                                    "description": "节日的起源"
                                  }
                                }
                              },
                              "description": "如果当日没有节日则返回空List，该字段需要请求参数中needDesc上传1才会出现在返回JSON中。"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "894_6_POST",
        "parameters": [
          {
            "name": "day",
            "in": "query",
            "description": "要查询是否放假的日期",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "needDesc",
            "in": "query",
            "description": "是否返回当日公众日、国际日和我国传统节日的简介，上传1表示需要，默认不返回，上传2表示只返回我国法定节假日的简介",
            "required": false,
            "schema": {
              "type": "number"
            }
          }
        ]
      }
    },
    "/894-4": {
      "x-pointCode": 4,
      "x-mode": "mapping",
      "x-read-timeout": 15,
      "x-connect-timeout": 15,
      "post": {
        "summary": "假日列表",
        "description": "假日列表查询api接入点可根据年份查询当年的节假日列表。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "ret_code": {
                              "type": "string",
                              "description": "接口调用是否成功,0表示成功,其他值默认失败"
                            },
                            "data": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "begin": {
                                    "type": "string",
                                    "description": "节假日的开始时间"
                                  },
                                  "end": {
                                    "type": "string",
                                    "description": "节假日的结束时间"
                                  },
                                  "holiday": {
                                    "type": "string",
                                    "description": "节假日名称"
                                  },
                                  "holiday_remark": {
                                    "type": "string",
                                    "description": "节假日描述"
                                  },
                                  "inverse_days": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "description": "调修日列表，只有2021年之后的数据有值"
                                  }
                                }
                              },
                              "description": "整年的节假日列表"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "894_4_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "year": {
                    "type": "string",
                    "description": "需要查询的年份,默认查询当年的节假日列表"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AppKeyAuth": {
        "type": "apiKey",
        "in": "query",
        "name": "appKey",
        "description": "从 ShowAPI 控制台获取的 appKey，管理地址：https://www.showapi.com/console#/myApp"
      }
    },
    "schemas": {
      "ShowapiResEnvelope": {
        "type": "object",
        "description": "ShowAPI 统一返回包裹（业务数据位于 showapi_res_body）",
        "properties": {
          "showapi_res_code": {
            "type": "integer",
            "description": "API 返回的状态码"
          },
          "showapi_res_error": {
            "type": "string",
            "description": "API 返回的错误信息"
          },
          "showapi_res_id": {
            "type": "string",
            "description": "API 请求的唯一标识"
          },
          "showapi_fee_num": {
            "type": "integer",
            "description": "API 调用计费次数"
          }
        }
      }
    }
  },
  "security": [
    {
      "AppKeyAuth": []
    }
  ],
  "externalDocs": {
    "url": "https://www.showapi.com/apiGateway/view/894?tab=book"
  },
  "x-apiCode": "894",
  "x-is-own": false,
  "x-is-op": true
}