{"openapi":"3.1.0","info":{"title":"Got Delayed API","version":"0.0.1","description":"Flight-disruption claim helper for AI agents. Every tool is also available over MCP (Streamable HTTP) at /mcp with identical input and output schemas. Read-only, no account needed. Information, not legal advice.","contact":{"url":"https://gotdelayed.help/docs"}},"servers":[{"url":"https://gotdelayed.help"}],"paths":{"/healthz":{"get":{"operationId":"healthz","summary":"Liveness check","description":"Returns ok without touching any dependency. Safe for uptime monitors.","responses":{"200":{"description":"Service is up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/api/v1/get_lookback_window":{"post":{"operationId":"get_lookback_window","summary":"Get lookback window for past flights","description":"Returns how far back in time it is worth scanning a passenger’s bookings (email, calendar) for flight delays or cancellations that can still be claimed, based on the court limitation periods of the countries involved. Use before sweeping an inbox or calendar for past flights, and when the user asks how old a flight can be to still claim compensation. Requires only the residence country.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"residence_country":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"Passenger's country of residence (ISO 3166-1 alpha-2)","examples":["PL","DE","GB"]},"countries_flown":{"description":"Countries the passenger departed from or arrived in during the period, if known. Each widens the window to that forum’s limitation period.","maxItems":50,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"ISO 3166-1 alpha-2 country code","examples":["PL","DE","GB"]}}},"required":["residence_country"],"additionalProperties":false,"examples":[{"residence_country":"PL"},{"residence_country":"PL","countries_flown":["DE","GB"]}]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","properties":{"recommended_years":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"How many years back it is worth scanning bookings: the longest court limitation among the given countries"},"scan_from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Earliest scheduled departure date worth checking","examples":["2026-09-14"]},"basis":{"type":"string","description":"Which country and rule produced recommended_years"},"max_possible_years":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Longest limitation period in the reference table; flights touching such a country may be claimable further back"},"countries":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"ISO 3166-1 alpha-2 country code","examples":["PL","DE","GB"]},"name":{"type":"string"},"court_limitation_years":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Conservative court limitation period in years"},"limitation_runs_to_year_end":{"type":"boolean","description":"True when the period runs to the end of the calendar year (Germany)"},"complain_within_days":{"description":"Some countries require a complaint to the carrier within a short window","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"basis":{"description":"Legal basis or caveat, quoted in deadline advice","type":"string"},"neb":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}},"required":["name"],"additionalProperties":false,"description":"National Enforcement Body under Reg. (EC) 261/2004 Art. 16"},"adr":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}},"required":["name"],"additionalProperties":false},{"type":"null"}],"description":"Alternative dispute resolution body, if any"},"confidence":{"type":"string","enum":["high","medium","low"]}},"required":["code","name","court_limitation_years","limitation_runs_to_year_end","neb","adr","confidence"],"additionalProperties":false},"description":"Deadline rules and enforcement bodies for each requested country that is in the table"},"unknown_countries":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"ISO 3166-1 alpha-2 country code","examples":["PL","DE","GB"]},"description":"Countries not in the reference table; no deadline advice is available for them"},"summary_for_user":{"type":"string","description":"One sentence to relay to the user"}},"required":["recommended_years","scan_from","basis","max_possible_years","countries","unknown_countries","summary_for_user"],"additionalProperties":false}}}},"400":{"description":"Invalid JSON or input that fails the schema; `details` names the field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Unknown tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"schemas":{"Health":{"type":"object","properties":{"status":{"type":"string","const":"ok"},"version":{"type":"string"}},"required":["status","version"],"additionalProperties":false},"ApiError":{"type":"object","properties":{"code":{"type":"string","examples":["INVALID_INPUT","TOOL_NOT_FOUND","PAYLOAD_TOO_LARGE"]},"message":{"type":"string"},"hint":{"description":"What to change to make the request succeed","type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false}}}}