{
  "openapi": "3.1.0",
  "info": {
    "title": "Remburse — EU261 flight compensation API",
    "version": "1.0.0",
    "summary": "Check whether a disrupted flight may qualify for compensation under EU Regulation 261/2004.",
    "description": "Eligibility assessment for flight disruption under **EU Regulation 261/2004**.\n\n**Operator.** Remburse is a service of GMVE Werk B.V., registered in\nthe Netherlands with the Dutch Chamber of Commerce (Kamer van Koophandel) under number\n42062414.\n\n**Access.** No account, API key or paid plan required. The endpoint is public and\nunauthenticated.\n\n**Scope.** EU261 only. Covers flights departing an EU/EEA airport on any carrier,\nand flights arriving in the EU/EEA on an EU/EEA carrier. Out-of-scope itineraries\nreturn an explicit out-of-scope response rather than a guess — including UK261 and\nSwiss itineraries, which are named as adjacent regimes and not assessed.\n\n**Data handling.** Fully stateless. No accounts, no database, no retention of\npassenger data after the request. Functions execute in the EU (Frankfurt).\n\n**Output.** An eligibility assessment and estimated compensation band under\nArticle 7, plus a referral to a licensed claims handler who can file on the\npassenger's behalf. Responses are informational and do not constitute legal\nadvice. We do not process claims and never handle client funds.\n\n**Commercial disclosure.** Referral links are affiliate links. This is disclosed\nin every tool response and on the site.\n\n**Rate limit.** 60 requests per minute per IP, raisable on request.",
    "contact": {
      "name": "Remburse",
      "email": "info@remburse.com",
      "url": "https://www.remburse.com"
    },
    "termsOfService": "https://www.remburse.com/terms"
  },
  "servers": [
    {
      "url": "https://www.remburse.com",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Human documentation",
    "url": "https://www.remburse.com/docs"
  },
  "tags": [
    {
      "name": "MCP",
      "description": "Model Context Protocol endpoint for AI assistants."
    },
    {
      "name": "Eligibility",
      "description": "EU261 assessment."
    },
    {
      "name": "Reference",
      "description": "Static regulation reference data."
    }
  ],
  "paths": {
    "/api/mcp": {
      "post": {
        "tags": [
          "MCP"
        ],
        "operationId": "mcp",
        "summary": "MCP Streamable HTTP endpoint (JSON-RPC 2.0)",
        "description": "Model Context Protocol endpoint. Supported protocol versions: 2025-06-18, 2025-03-26, 2024-11-05.\n\nStateless: no `Mcp-Session-Id` is issued and no SSE stream is opened. `GET` and `DELETE` return 405.\n\nTools: `check_flight_compensation_eligibility`, `check_eu261_route_scope`, `check_downgrade_reimbursement`, `get_eu261_compensation_table`.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              },
              "examples": {
                "initialize": {
                  "summary": "Handshake",
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "initialize",
                    "params": {
                      "protocolVersion": "2025-06-18",
                      "capabilities": {},
                      "clientInfo": {
                        "name": "example-client",
                        "version": "1.0.0"
                      }
                    }
                  }
                },
                "listTools": {
                  "summary": "List tools",
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 2,
                    "method": "tools/list"
                  }
                },
                "callTool": {
                  "summary": "Assess a delayed flight",
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 3,
                    "method": "tools/call",
                    "params": {
                      "name": "check_flight_compensation_eligibility",
                      "arguments": {
                        "departureAirport": "AMS",
                        "arrivalAirport": "BCN",
                        "disruptionType": "delay",
                        "airline": "KL",
                        "arrivalDelayHours": 4.1,
                        "airlineStatedReason": "technical fault"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          },
          "202": {
            "description": "Notification accepted; no body."
          },
          "400": {
            "description": "Malformed JSON."
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/eligibility/flight": {
      "post": {
        "tags": [
          "Eligibility"
        ],
        "operationId": "assessFlight",
        "summary": "Assess a disrupted flight under EU261",
        "description": "REST equivalent of the `check_flight_compensation_eligibility` tool. Same engine, same response object.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "departureAirport": {
                    "type": "string",
                    "description": "Departure airport as an IATA code or airport/city name, e.g. 'AMS' or 'Amsterdam Schiphol'. For a connecting itinerary this is the first departure."
                  },
                  "arrivalAirport": {
                    "type": "string",
                    "description": "Final destination airport as an IATA code or airport/city name, e.g. 'BCN'. For a connecting itinerary this is the end of the journey, not the connection point."
                  },
                  "disruptionType": {
                    "type": "string",
                    "enum": [
                      "delay",
                      "cancellation",
                      "denied_boarding",
                      "missed_connection"
                    ],
                    "description": "What happened. Use 'missed_connection' when a delayed leg caused a later flight to be missed."
                  },
                  "passengerCount": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50,
                    "description": "How many passengers travelled on the booking. Article 7 pays each passenger separately, so a family of four is four times the per-passenger amount. Defaults to 1."
                  },
                  "airline": {
                    "type": "string",
                    "description": "Operating carrier, as an IATA code or name. Required only when the flight arrives in the EU/EEA from outside it, where the carrier's licence decides scope. On a codeshare, give the airline that actually operated the flight."
                  },
                  "flightNumber": {
                    "type": "string",
                    "description": "Flight number, e.g. 'KL1667'. Optional."
                  },
                  "flightDate": {
                    "type": "string",
                    "description": "Scheduled departure date as YYYY-MM-DD. Optional; used only for context in the response."
                  },
                  "arrivalDelayHours": {
                    "type": "number",
                    "minimum": 0,
                    "description": "How many hours late the passenger reached the FINAL destination — scheduled arrival against the moment the aircraft doors opened. This is the figure EU261 turns on; the departure delay is not the test. Required for delays and missed connections, and for cancellations where rerouting was offered."
                  },
                  "cancellationNoticeDays": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Days of notice before scheduled departure that the cancellation was announced, counted from the airline's notification. Required for cancellations."
                  },
                  "reroutingOffered": {
                    "type": "boolean",
                    "description": "Whether the airline offered alternative transport after a cancellation."
                  },
                  "singleBooking": {
                    "type": "boolean",
                    "description": "Whether the connecting flights were on one reservation. Decides a missed-connection claim: separate tickets are not protected as a single journey."
                  },
                  "airlineStatedReason": {
                    "type": "string",
                    "description": "The reason the airline gave, in their words, e.g. 'technical fault' or 'bad weather at destination'. Materially changes the outlook because of the Art. 5(3) extraordinary-circumstances defence."
                  },
                  "distanceKm": {
                    "type": "number",
                    "minimum": 1,
                    "description": "Great-circle distance from the departure airport to the final destination, in km. Supply this when an airport is outside the reference data; it overrides the computed distance and is recorded as a caller assertion."
                  },
                  "departureCountry": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country code of the departure airport. Only needed when the airport is not recognised. Recorded as a caller assertion."
                  },
                  "arrivalCountry": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country code of the arrival airport. Only needed when the airport is not recognised. Recorded as a caller assertion."
                  }
                },
                "required": [
                  "departureAirport",
                  "arrivalAirport",
                  "disruptionType"
                ],
                "additionalProperties": false
              },
              "examples": {
                "delay": {
                  "summary": "Four-hour arrival delay, Amsterdam to Barcelona",
                  "value": {
                    "departureAirport": "AMS",
                    "arrivalAirport": "BCN",
                    "disruptionType": "delay",
                    "airline": "KL",
                    "flightNumber": "KL1667",
                    "arrivalDelayHours": 4.1,
                    "airlineStatedReason": "technical fault"
                  }
                },
                "cancellation": {
                  "summary": "Cancelled with three days' notice",
                  "value": {
                    "departureAirport": "MAD",
                    "arrivalAirport": "JFK",
                    "disruptionType": "cancellation",
                    "airline": "IB",
                    "cancellationNoticeDays": 3,
                    "reroutingOffered": true,
                    "arrivalDelayHours": 6
                  }
                },
                "outOfScope": {
                  "summary": "Out of scope — US to UK on a US carrier",
                  "value": {
                    "departureAirport": "JFK",
                    "arrivalAirport": "LHR",
                    "disruptionType": "delay",
                    "airline": "AA",
                    "arrivalDelayHours": 5
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Assessment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Assessment"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request body."
          },
          "429": {
            "description": "Rate limit exceeded."
          }
        }
      }
    },
    "/api/v1/eligibility/downgrade": {
      "post": {
        "tags": [
          "Eligibility"
        ],
        "operationId": "assessDowngrade",
        "summary": "Article 10(2) downgrade reimbursement",
        "description": "REST equivalent of the `check_downgrade_reimbursement` tool. Separate from Art. 7 compensation — a downgraded passenger on a disrupted flight can be owed both.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "departureAirport": {
                    "type": "string",
                    "description": "Departure airport as an IATA code or name."
                  },
                  "arrivalAirport": {
                    "type": "string",
                    "description": "Arrival airport as an IATA code or name."
                  },
                  "ticketPriceEur": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Price paid for the affected flight in EUR, excluding taxes and charges the airline refunds anyway. Without it the tool returns the percentage but no amount."
                  },
                  "passengerCount": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50,
                    "description": "How many passengers were downgraded. Defaults to 1."
                  }
                },
                "required": [
                  "departureAirport",
                  "arrivalAirport"
                ],
                "additionalProperties": false
              },
              "examples": {
                "longHaul": {
                  "summary": "Downgraded on Amsterdam to New York, two passengers",
                  "value": {
                    "departureAirport": "AMS",
                    "arrivalAirport": "JFK",
                    "ticketPriceEur": 1800,
                    "passengerCount": 2
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Downgrade assessment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Downgrade"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request body."
          },
          "429": {
            "description": "Rate limit exceeded."
          }
        }
      }
    },
    "/api/v1/reference/compensation": {
      "get": {
        "tags": [
          "Reference"
        ],
        "operationId": "compensationTable",
        "summary": "Article 7 compensation bands",
        "security": [],
        "responses": {
          "200": {
            "description": "Reference table",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/health": {
      "get": {
        "tags": [
          "Reference"
        ],
        "operationId": "health",
        "summary": "Service metadata and endpoint index",
        "security": [],
        "responses": {
          "200": {
            "description": "Service description",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {},
    "schemas": {
      "JsonRpcRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              }
            ],
            "description": "Omit for notifications."
          },
          "method": {
            "type": "string",
            "examples": [
              "initialize",
              "tools/list",
              "tools/call",
              "ping"
            ]
          },
          "params": {
            "type": "object"
          }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id"
        ],
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "result": {
            "type": "object"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              },
              "data": {}
            }
          }
        }
      },
      "RouteScopeRequest": {
        "type": "object",
        "properties": {
          "departureAirport": {
            "type": "string",
            "description": "Departure airport as an IATA code or name."
          },
          "arrivalAirport": {
            "type": "string",
            "description": "Arrival airport as an IATA code or name."
          },
          "airline": {
            "type": "string",
            "description": "Operating carrier as an IATA code or name. Only needed for flights arriving in the EU/EEA from outside it."
          }
        },
        "required": [
          "departureAirport",
          "arrivalAirport"
        ],
        "additionalProperties": false
      },
      "Assessment": {
        "type": "object",
        "properties": {
          "regulation": {
            "type": "string"
          },
          "outcome": {
            "type": "string",
            "enum": [
              "out_of_scope",
              "insufficient_information",
              "likely_eligible",
              "possibly_eligible",
              "likely_not_eligible"
            ]
          },
          "headline": {
            "type": "string"
          },
          "scope": {
            "type": "object",
            "properties": {
              "inScope": {
                "type": "boolean"
              },
              "basis": {
                "type": "string"
              },
              "explanation": {
                "type": "string"
              }
            },
            "required": [
              "inScope",
              "basis",
              "explanation"
            ]
          },
          "flight": {
            "type": "object",
            "properties": {
              "departure": {
                "type": "object",
                "properties": {
                  "input": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "iata": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "country": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "eea": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "recognised": {
                    "type": "boolean"
                  },
                  "countryAsserted": {
                    "type": "boolean"
                  }
                }
              },
              "arrival": {
                "type": "object",
                "properties": {
                  "input": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "iata": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "country": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "eea": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "recognised": {
                    "type": "boolean"
                  },
                  "countryAsserted": {
                    "type": "boolean"
                  }
                }
              },
              "carrier": {
                "type": "object"
              },
              "flightNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "flightDate": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "distanceKm": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "distanceSource": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "reference_data",
                  "caller_asserted",
                  null
                ]
              },
              "intraEea": {
                "type": [
                  "boolean",
                  "null"
                ]
              }
            }
          },
          "compensation": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string"
              },
              "amountPerPassenger": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Estimated Art. 7 amount for ONE passenger."
              },
              "passengerCount": {
                "type": "integer"
              },
              "totalAmount": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "amountPerPassenger × passengerCount."
              },
              "band": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "article": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reducibleByHalf": {
                "type": "boolean"
              },
              "note": {
                "type": "string"
              }
            },
            "required": [
              "currency",
              "amountPerPassenger",
              "passengerCount",
              "totalAmount",
              "reducibleByHalf"
            ]
          },
          "reasoning": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "borderline": {
            "type": "array",
            "description": "Inputs close enough to a legal threshold that a small correction flips the answer.",
            "items": {
              "type": "object",
              "properties": {
                "factor": {
                  "type": "string",
                  "enum": [
                    "arrival_delay",
                    "cancellation_notice",
                    "distance_band",
                    "long_haul_reduction"
                  ]
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "factor",
                "message"
              ]
            }
          },
          "whatToDoNext": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "referral": {
            "type": "object",
            "description": "Claims-handler referral. Referral links are affiliate links.",
            "properties": {
              "name": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "isAffiliate": {
                "type": "boolean"
              },
              "disclosure": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "url",
              "isAffiliate",
              "disclosure"
            ]
          },
          "disclaimers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "missingInformation": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "regulation",
          "outcome",
          "scope",
          "compensation",
          "reasoning",
          "borderline",
          "referral",
          "disclaimers",
          "missingInformation"
        ]
      },
      "Downgrade": {
        "type": "object",
        "properties": {
          "regulation": {
            "type": "string"
          },
          "article": {
            "type": "string"
          },
          "applicable": {
            "type": "boolean"
          },
          "percentage": {
            "type": [
              "number",
              "null"
            ]
          },
          "band": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "reimbursementPerPassenger": {
            "type": [
              "number",
              "null"
            ]
          },
          "passengerCount": {
            "type": "integer"
          },
          "totalReimbursement": {
            "type": [
              "number",
              "null"
            ]
          },
          "distanceKm": {
            "type": [
              "integer",
              "null"
            ]
          },
          "reasoning": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "whatToDoNext": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "referral": {
            "type": "object",
            "description": "Claims-handler referral. Referral links are affiliate links.",
            "properties": {
              "name": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "isAffiliate": {
                "type": "boolean"
              },
              "disclosure": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "url",
              "isAffiliate",
              "disclosure"
            ]
          },
          "disclaimers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "missingInformation": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "regulation",
          "article",
          "applicable",
          "percentage",
          "currency"
        ]
      },
      "RouteScope": {
        "type": "object",
        "properties": {
          "regulation": {
            "type": "string"
          },
          "inScope": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "basis": {
            "type": "string"
          },
          "explanation": {
            "type": "string"
          },
          "departure": {
            "type": "object"
          },
          "arrival": {
            "type": "object"
          },
          "carrier": {
            "type": "object"
          },
          "adjacentRegimes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "disclaimers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "regulation",
          "inScope",
          "basis",
          "explanation"
        ]
      }
    }
  },
  "security": []
}