{
 "openapi": "3.1.0",
 "info": {
  "title": "Yoyaku preorder deadline data",
  "version": "1.0.0",
  "description": "Static JSON of official figure and merchandise preorder windows. Dates are Japan time. No key required."
 },
 "servers": [
  {
   "url": "https://yoyaku.fans"
  }
 ],
 "paths": {
  "/api/preorders.json": {
   "get": {
    "summary": "All products currently open for preorder, sorted by deadline",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "generated_at": {
           "type": "string",
           "format": "date-time"
          },
          "as_of_date_jst": {
           "type": "string",
           "format": "date"
          },
          "count": {
           "type": "integer"
          },
          "items": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Preorder"
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/closing-soon.json": {
   "get": {
    "summary": "Products whose preorder closes within 7 days",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "generated_at": {
           "type": "string",
           "format": "date-time"
          },
          "as_of_date_jst": {
           "type": "string",
           "format": "date"
          },
          "count": {
           "type": "integer"
          },
          "items": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Preorder"
           }
          }
         }
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Preorder": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "description": "本站的商品代號，例如 gsc-1144089"
     },
     "name": {
      "type": "string",
      "description": "官方商品名稱（日文）"
     },
     "series": {
      "type": [
       "string",
       "null"
      ],
      "description": "作品名稱（日文）"
     },
     "series_zh": {
      "type": [
       "string",
       "null"
      ],
      "description": "作品在台灣常用的中文名稱，沒有對照時為 null"
     },
     "category": {
      "type": [
       "string",
       "null"
      ],
      "description": "商品系列，例如 ねんどろいど"
     },
     "category_zh": {
      "type": [
       "string",
       "null"
      ],
      "description": "商品系列的中文名稱，例如 黏土人"
     },
     "maker": {
      "type": [
       "string",
       "null"
      ],
      "description": "製造商"
     },
     "jan": {
      "type": [
       "string",
       "null"
      ],
      "description": "JAN / EAN 條碼"
     },
     "price_jpy": {
      "type": [
       "number",
       "null"
      ],
      "description": "官方標示價格，日圓"
     },
     "preorder_start": {
      "type": [
       "string",
       "null"
      ],
      "format": "date",
      "description": "預購開始日，日本時間"
     },
     "preorder_end": {
      "type": [
       "string",
       "null"
      ],
      "format": "date",
      "description": "官方商店的預購截止日，日本時間；null 代表官方未公布"
     },
     "preorder_end_at": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time",
      "description": "截止時刻，ISO 8601，含 +09:00 時區；官方未標示時為 null"
     },
     "release_month": {
      "type": [
       "string",
       "null"
      ],
      "description": "預定發售或再販的月份，格式 YYYY-MM"
     },
     "days_left": {
      "type": [
       "number",
       "null"
      ],
      "description": "產生資料當下距離截止日的天數，0 代表當天"
     },
     "is_rerelease": {
      "type": "boolean",
      "description": "是否為再販"
     },
     "has_bonus": {
      "type": "boolean",
      "description": "官方商店是否標示附特典"
     },
     "thumbnail_url": {
      "type": [
       "string",
       "null"
      ],
      "description": "官方網站上的商品縮圖網址（300×300），圖片權利屬於權利人"
     },
     "image_url": {
      "type": [
       "string",
       "null"
      ],
      "description": "官方網站上的商品主圖網址"
     },
     "official_url": {
      "type": "string",
      "description": "官方商品頁"
     },
     "page_url": {
      "type": "string",
      "description": "本站的商品頁"
     },
     "last_checked": {
      "type": "string",
      "format": "date",
      "description": "最後一次向官方確認的日期"
     }
    }
   }
  }
 }
}