{
  "openapi": "3.1.0",
  "info": {
    "title": "Japan Job Loss Check API",
    "version": "1.0.0",
    "description": "Quit or lost your job in Japan? See the ISA 14-day organisation notice, the ~3-month inactivity risk, Hello Work / 雇用保険 eligibility and waiting rules (including the Apr 2025 self-quit change), health-insurance choices (任意継続 vs 国保), the National Pension switch, and which documents to collect.\n\nFree, no API key, CORS open. Fair use: about 120 requests per minute per IP. Also available as MCP tools at https://free-agent-tools.vercel.app/mcp"
  },
  "servers": [
    {
      "url": "https://japan-job-loss.vercel.app"
    }
  ],
  "paths": {
    "/api/check": {
      "get": {
        "operationId": "japanJobLossCheck",
        "summary": "Quit or lost a job in Japan: ISA 14-day notice, Hello Work eligibility, health and pension switches",
        "description": "Applies Japan's post-employment checklist (as of 2026-11-07): ISA 所属機関に関する届出 within 14 days for organisation-tied statuses; ~3-month inactivity review risk for work statuses; Hello Work / 雇用保険 basic-allowance path (company ≥6 months / self ≥12 months, 7-day wait, self-quit restriction 1 month from 2025-04-01); health coverage choice (任意継続 within 20 days vs 国保 ~14 days vs family vs new employer); National Pension switch ~14 days; documents (離職票, 資格喪失証明書…). Returns verdict (act_now | plan_ahead | eligible_benefits | limited), summary, immigration, unemployment, health, pension, documents, deadlines, actions, warnings, sources, disclaimer. No yen amounts.\n\nExample: https://japan-job-loss.vercel.app/api/check?jobEndDate=2026-10-31&status=work&reason=self&insuredMonths=18",
        "parameters": [
          {
            "name": "jobEndDate",
            "in": "query",
            "required": true,
            "description": "YYYY-MM-DD last day of employment (aliases: endDate, lastDay, 退職日).",
            "schema": {
              "type": "string",
              "description": "YYYY-MM-DD last day of employment (aliases: endDate, lastDay, 退職日)."
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "work | student | dependent | pr_spr | designated | other. Aliases: engineer, 技人国, 特定技能, 留学, 家族滞在, 永住…",
            "schema": {
              "type": "string",
              "description": "work | student | dependent | pr_spr | designated | other. Aliases: engineer, 技人国, 特定技能, 留学, 家族滞在, 永住…",
              "enum": [
                "work",
                "student",
                "dependent",
                "pr_spr",
                "designated",
                "other"
              ],
              "default": "work"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": false,
            "description": "company | self | contract_end | other. Aliases: 会社都合, 自己都合, 契約満了…",
            "schema": {
              "type": "string",
              "description": "company | self | contract_end | other. Aliases: 会社都合, 自己都合, 契約満了…",
              "enum": [
                "company",
                "self",
                "contract_end",
                "other"
              ],
              "default": "self"
            }
          },
          {
            "name": "insuredMonths",
            "in": "query",
            "required": false,
            "description": "Employment-insurance insured months in the relevant look-back (optional; tightens eligibility).",
            "schema": {
              "type": "number",
              "description": "Employment-insurance insured months in the relevant look-back (optional; tightens eligibility)."
            }
          },
          {
            "name": "age",
            "in": "query",
            "required": false,
            "description": "Optional age (15–75).",
            "schema": {
              "type": "number",
              "description": "Optional age (15–75)."
            }
          },
          {
            "name": "lookingForWork",
            "in": "query",
            "required": false,
            "description": "Able and willing to work / job seeking.",
            "schema": {
              "type": "boolean",
              "description": "Able and willing to work / job seeking.",
              "default": true
            }
          },
          {
            "name": "hasNewJob",
            "in": "query",
            "required": false,
            "description": "Already have a next employer.",
            "schema": {
              "type": "boolean",
              "description": "Already have a next employer.",
              "default": false
            }
          },
          {
            "name": "newJobStartDate",
            "in": "query",
            "required": false,
            "description": "Optional YYYY-MM-DD new job starts.",
            "schema": {
              "type": "string",
              "description": "Optional YYYY-MM-DD new job starts."
            }
          },
          {
            "name": "healthPlan",
            "in": "query",
            "required": false,
            "description": "undecided | voluntary_continue | national | family | new_employer.",
            "schema": {
              "type": "string",
              "description": "undecided | voluntary_continue | national | family | new_employer.",
              "enum": [
                "undecided",
                "voluntary_continue",
                "national",
                "family",
                "new_employer"
              ],
              "default": "undecided"
            }
          },
          {
            "name": "under60",
            "in": "query",
            "required": false,
            "description": "Override National Pension switch need (default: age < 60 or true if age omitted).",
            "schema": {
              "type": "boolean",
              "description": "Override National Pension switch need (default: age < 60 or true if age omitted)."
            }
          },
          {
            "name": "today",
            "in": "query",
            "required": false,
            "description": "Override today's date (default: today in Japan).",
            "schema": {
              "type": "string",
              "description": "Override today's date (default: today in Japan)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result as JSON. Always includes a `disclaimer` field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid input. The body explains what to send and gives an example."
          },
          "429": {
            "description": "Too many requests from one IP. Retry after the Retry-After seconds."
          }
        }
      },
      "post": {
        "operationId": "japanJobLossCheckPost",
        "summary": "Quit or lost a job in Japan: ISA 14-day notice, Hello Work eligibility, health and pension switches (JSON body)",
        "description": "Applies Japan's post-employment checklist (as of 2026-11-07): ISA 所属機関に関する届出 within 14 days for organisation-tied statuses; ~3-month inactivity review risk for work statuses; Hello Work / 雇用保険 basic-allowance path (company ≥6 months / self ≥12 months, 7-day wait, self-quit restriction 1 month from 2025-04-01); health coverage choice (任意継続 within 20 days vs 国保 ~14 days vs family vs new employer); National Pension switch ~14 days; documents (離職票, 資格喪失証明書…). Returns verdict (act_now | plan_ahead | eligible_benefits | limited), summary, immigration, unemployment, health, pension, documents, deadlines, actions, warnings, sources, disclaimer. No yen amounts.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jobEndDate"
                ],
                "properties": {
                  "jobEndDate": {
                    "type": "string",
                    "description": "YYYY-MM-DD last day of employment (aliases: endDate, lastDay, 退職日)."
                  },
                  "status": {
                    "type": "string",
                    "description": "work | student | dependent | pr_spr | designated | other. Aliases: engineer, 技人国, 特定技能, 留学, 家族滞在, 永住…",
                    "enum": [
                      "work",
                      "student",
                      "dependent",
                      "pr_spr",
                      "designated",
                      "other"
                    ],
                    "default": "work"
                  },
                  "reason": {
                    "type": "string",
                    "description": "company | self | contract_end | other. Aliases: 会社都合, 自己都合, 契約満了…",
                    "enum": [
                      "company",
                      "self",
                      "contract_end",
                      "other"
                    ],
                    "default": "self"
                  },
                  "insuredMonths": {
                    "type": "number",
                    "description": "Employment-insurance insured months in the relevant look-back (optional; tightens eligibility)."
                  },
                  "age": {
                    "type": "number",
                    "description": "Optional age (15–75)."
                  },
                  "lookingForWork": {
                    "type": "boolean",
                    "description": "Able and willing to work / job seeking.",
                    "default": true
                  },
                  "hasNewJob": {
                    "type": "boolean",
                    "description": "Already have a next employer.",
                    "default": false
                  },
                  "newJobStartDate": {
                    "type": "string",
                    "description": "Optional YYYY-MM-DD new job starts."
                  },
                  "healthPlan": {
                    "type": "string",
                    "description": "undecided | voluntary_continue | national | family | new_employer.",
                    "enum": [
                      "undecided",
                      "voluntary_continue",
                      "national",
                      "family",
                      "new_employer"
                    ],
                    "default": "undecided"
                  },
                  "under60": {
                    "type": "boolean",
                    "description": "Override National Pension switch need (default: age < 60 or true if age omitted)."
                  },
                  "today": {
                    "type": "string",
                    "description": "Override today's date (default: today in Japan)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result as JSON. Always includes a `disclaimer` field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid input. The body explains what to send and gives an example."
          },
          "429": {
            "description": "Too many requests from one IP. Retry after the Retry-After seconds."
          }
        }
      }
    },
    "/api/rules": {
      "get": {
        "operationId": "japanJobLossRules",
        "summary": "Japan job-loss rules: ISA 14-day organisation notice, ~3-month inactivity, Hello Work eligibility and waiting/restriction, health (任意継続/国保), National Pension switch, documents, sources",
        "description": "Returns the rules the checker applies, with official sources and disclaimer. No inputs.",
        "responses": {
          "200": {
            "description": "Rules JSON with rulesAsOf and sources.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    }
  }
}