{
  "openapi": "3.0.3",
  "info": {
    "title": "Quota 4000 — Public API",
    "description": "Public API to discover ENAC-certified Italian skydiving schools. Data sourced from the official ENAC registry of certified training organizations. Intended for LLM tool-use, programmatic integrations, and partner sites. Rate limit: 60 requests/minute per client.",
    "version": "1.0.0",
    "contact": {
      "name": "Quota 4000 Editorial",
      "email": "redazione@quota4000.com",
      "url": "https://quota4000.com/chi-siamo"
    },
    "license": {
      "name": "Data: ENAC registry (public domain) — Quota 4000 aggregation is free to cite with attribution.",
      "url": "https://quota4000.com/llms.txt"
    }
  },
  "servers": [
    {
      "url": "https://quota4000.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/schools": {
      "get": {
        "summary": "List active ENAC-certified skydiving schools",
        "description": "Returns the list of active Italian skydiving schools from the ENAC registry. Supports filtering by region, text search on school name, or geo-radius search (requires lat + lng).",
        "operationId": "listSchools",
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "description": "Italian administrative region (exact match, e.g. 'Lombardia', 'Toscana').",
            "required": false,
            "schema": { "type": "string" },
            "example": "Lombardia"
          },
          {
            "name": "q",
            "in": "query",
            "description": "Free-text match on school name (ILIKE case-insensitive).",
            "required": false,
            "schema": { "type": "string" },
            "example": "reggio"
          },
          {
            "name": "lat",
            "in": "query",
            "description": "Latitude in decimal degrees for geo-radius search. Must be provided with `lng`.",
            "required": false,
            "schema": { "type": "number", "format": "double" },
            "example": 45.46
          },
          {
            "name": "lng",
            "in": "query",
            "description": "Longitude in decimal degrees for geo-radius search. Must be provided with `lat`.",
            "required": false,
            "schema": { "type": "number", "format": "double" },
            "example": 9.19
          },
          {
            "name": "radius",
            "in": "query",
            "description": "Radius in kilometers for geo search. Only applied when `lat` and `lng` are provided. Default: 100 km.",
            "required": false,
            "schema": { "type": "integer", "default": 100, "minimum": 1, "maximum": 2000 }
          }
        ],
        "responses": {
          "200": {
            "description": "List of schools matching the filter.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": { "$ref": "#/components/schemas/School" }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "uuid-xxx",
                      "name": "Skydive Italia",
                      "slug": "skydive-italia",
                      "tagline": "Scuola ENAC certificata in Lombardia",
                      "city": "Reggio Emilia",
                      "province": "RE",
                      "region": "Emilia-Romagna",
                      "latitude": 44.68,
                      "longitude": 10.63,
                      "price_tandem_base": 220,
                      "price_tandem_video": 280,
                      "price_aff_full": 2500,
                      "rating_average": 4.7,
                      "rating_count": 42,
                      "featured": true,
                      "enac_certified": true,
                      "languages": ["it", "en"],
                      "aircraft": ["Cessna 208 Caravan"],
                      "exit_altitude_meters": 4000,
                      "booking_url": "https://example.com/book",
                      "website": "https://example.com",
                      "phone": "+39 0522 xxxxxxx"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": { "type": "string" }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "School": {
        "type": "object",
        "description": "An ENAC-certified Italian skydiving school. All schools in this API are verified against the official ENAC registry of certified training organizations.",
        "properties": {
          "id": { "type": "string", "format": "uuid" },
          "name": { "type": "string" },
          "slug": { "type": "string", "description": "URL-safe identifier used at /centri/[slug]" },
          "tagline": { "type": "string", "nullable": true, "description": "Italian one-line description" },
          "tagline_en": { "type": "string", "nullable": true, "description": "English one-line description" },
          "city": { "type": "string" },
          "province": { "type": "string", "nullable": true, "description": "Italian province code (e.g. 'MI', 'RE')" },
          "region": { "type": "string", "description": "Italian administrative region" },
          "latitude": { "type": "number", "format": "double", "nullable": true },
          "longitude": { "type": "number", "format": "double", "nullable": true },
          "price_tandem_base": { "type": "number", "nullable": true, "description": "Base tandem jump price in EUR (no video)" },
          "price_tandem_video": { "type": "number", "nullable": true, "description": "Tandem jump with video/photo price in EUR" },
          "price_aff_full": { "type": "number", "nullable": true, "description": "Full AFF course price to ENAC license in EUR" },
          "rating_average": { "type": "number", "nullable": true, "minimum": 0, "maximum": 5 },
          "rating_count": { "type": "integer", "nullable": true, "minimum": 0 },
          "featured": { "type": "boolean" },
          "enac_certified": { "type": "boolean", "description": "All listed schools are ENAC-certified (flag retained for data lineage)." },
          "languages": {
            "type": "array",
            "items": { "type": "string" },
            "description": "ISO language codes of instruction languages"
          },
          "aircraft": {
            "type": "array",
            "items": { "type": "string" },
            "nullable": true,
            "description": "Aircraft models operated by the school"
          },
          "exit_altitude_meters": { "type": "integer", "nullable": true, "description": "Maximum exit altitude in meters AGL" },
          "booking_url": { "type": "string", "format": "uri", "nullable": true },
          "website": { "type": "string", "format": "uri", "nullable": true },
          "phone": { "type": "string", "nullable": true }
        },
        "required": ["id", "name", "slug", "city", "region", "featured", "enac_certified"]
      }
    }
  },
  "tags": [
    {
      "name": "Schools",
      "description": "ENAC-certified Italian skydiving schools registry"
    }
  ],
  "externalDocs": {
    "description": "AI citation policy and content guidelines",
    "url": "https://quota4000.com/llms.txt"
  }
}
