{
  "name": "Vliegtuigtas.com API",
  "version": "1.3",
  "description": "Publieke REST-API voor handbagage-data, checker, tassen, luchthavens en vluchten. Authenticeer met 'Authorization: Bearer <IOS_API_KEY>'. Alle responses zijn JSON en bevatten CORS-headers.",
  "base_url": "https://vliegtuigtas.com/api/public/v1",
  "auth": {
    "scheme": "Bearer",
    "header": "Authorization: Bearer <IOS_API_KEY>",
    "note": "Vraag de API-sleutel op via het admin-dashboard (tab API)."
  },
  "data_model": {
    "airline_fields": [
      "id",
      "slug",
      "name",
      "logo_url",
      "logo_url_small",
      "domain",
      "country_code",
      "flag_emoji",
      "flag_image_url",
      "continent",
      "alliance",
      "airline_type",
      "headquarters",
      "website_url",
      "booking_url",
      "customer_service_url",
      "baggage_policy_url",
      "source_url",
      "personal_item_l_cm",
      "personal_item_w_cm",
      "personal_item_d_cm",
      "checked_bag_included",
      "checked_bag_max_weight_kg",
      "checked_bag_max_l_cm",
      "checked_bag_max_w_cm",
      "checked_bag_max_d_cm",
      "checked_bag_price_from_eur",
      "overweight_fee_per_kg_eur",
      "oversize_fee_eur",
      "priority_boarding_price_eur",
      "currency",
      "extra_notes",
      "last_verified_date",
      "variants[]"
    ],
    "variant_fields": [
      "id",
      "airline_id",
      "variant_name",
      "includes_large_bag",
      "small_l_cm",
      "small_w_cm",
      "small_d_cm",
      "large_l_cm",
      "large_w_cm",
      "large_d_cm",
      "max_weight_kg",
      "weight_rule",
      "wheel_margin_cm",
      "price_indication_eur",
      "includes_checked_bag",
      "checked_bag_count",
      "checked_bag_weight_kg",
      "checked_bag_price_eur",
      "seat_selection_included",
      "priority_boarding",
      "changes_allowed",
      "refundable",
      "perks",
      "notes"
    ],
    "bag_fields": [
      "id",
      "name",
      "type",
      "category",
      "image_url",
      "price_eur",
      "price_label",
      "price_currency",
      "length_cm",
      "width_cm",
      "depth_cm",
      "weight_kg",
      "dimensions_label",
      "volume_liters",
      "total_dimensions_cm",
      "colors[]",
      "airline_slugs[]",
      "matched_airlines[]",
      "affiliate_url",
      "shop_name",
      "shop_domain",
      "shop_logo_url",
      "featured",
      "editor_rank",
      "editor_note",
      "detail_url",
      "api_detail_url",
      "sort_order",
      "created_at",
      "updated_at",
      "images[] (id, image_url, alt_text, sort_order, is_primary)"
    ],
    "airport_fields": [
      "id",
      "slug",
      "name",
      "iata_code",
      "icao_code",
      "city",
      "country_code",
      "latitude",
      "longitude",
      "website_url",
      "phone",
      "timezone",
      "address",
      "terminal_count",
      "gate_count",
      "runway_count",
      "has_lounges",
      "lounges_info",
      "parking_info",
      "parking_url",
      "has_wifi",
      "wifi_info",
      "restaurants_info",
      "shops_info",
      "security_wait_info",
      "transport_info",
      "extra_notes",
      "logo_url",
      "image_url",
      "sort_order",
      "last_verified_date"
    ]
  },
  "endpoints": [
    {
      "method": "GET",
      "path": "/airlines",
      "description": "Lijst maatschappijen (verrijkt met logo, vlag, domein, alle nieuwe velden). Filters: continent, alliance, airline_type, country_code, q (zoekterm op naam), include_variants=false om varianten weg te laten."
    },
    {
      "method": "GET",
      "path": "/airlines/{slug}",
      "description": "Detail van één maatschappij plus alle ticket-varianten en logo."
    },
    {
      "method": "GET",
      "path": "/bags",
      "description": "Volledige tassen/koffers met afgeleide velden (dimensions_label, volume_liters, shop_logo_url, detail_url, api_detail_url) en extra product-foto's in images[]. Filters: airline, type, category, max_price, featured=true, editors_picks=true. Zet include_airlines=false of include_images=false om die velden weg te laten."
    },
    {
      "method": "GET",
      "path": "/bags/{id}",
      "description": "Detail van één tas met dezelfde verrijkte velden als /bags plus images[] en matched_airlines (met logo, vlag, varianten)."
    },
    {
      "method": "GET",
      "path": "/airports",
      "description": "Nederlandse luchthavens met basisinfo (IATA/ICAO, stad, coördinaten, website) en faciliteiten (terminals, parkeren, wifi, restaurants, lounges, vervoer). Filters: country_code, city, q."
    },
    {
      "method": "GET",
      "path": "/airports/{slug}",
      "description": "Detail van één luchthaven. {slug} mag ook een IATA-code zijn (bv AMS) of ICAO (bv EHAM)."
    },
    {
      "method": "POST",
      "path": "/check",
      "description": "Voert de bagagecheck uit. Body: { airline_slug OF variant_id, length_cm, width_cm, depth_cm, weight_kg, session_id?, email?, first_name?, flight_number?, source? }. Response bevat de volledige variant en de verrijkte airline (met logo en vlag)."
    },
    {
      "method": "GET",
      "path": "/flight-lookup?flight=KL1234",
      "description": "Zoekt vluchtgegevens via vluchtnummer en probeert te matchen aan een bekende maatschappij. Response bevat airline_logo_url en matched_airline (verrijkt, met varianten)."
    },
    {
      "method": "POST",
      "path": "/events",
      "description": "Log een willekeurig usage-event. Body: { type, session_id?, email?, payload? }."
    },
    {
      "method": "POST",
      "path": "/leads",
      "description": "Sla naam en e-mail van een lead op. Body: { email, first_name?, source? }."
    }
  ],
  "examples": {
    "airlines_europe": "GET /airlines?continent=europe&airline_type=low_cost",
    "bags_by_airline": "GET /bags?airline=klm&type=koffer&max_price=200&editors_picks=true",
    "check": "POST /check  { \"airline_slug\": \"klm\", \"length_cm\": 55, \"width_cm\": 40, \"depth_cm\": 25, \"weight_kg\": 10 }",
    "flight_lookup": "GET /flight-lookup?flight=KL1234"
  },
  "conventions": {
    "dimensions": "Alle maten in centimeters (cm), gewicht in kilogram (kg).",
    "currency": "Bedragen in EUR tenzij het veld currency anders aangeeft.",
    "dates": "ISO 8601 (YYYY-MM-DD voor last_verified_date).",
    "errors": "Bij fouten: { error: string, issues?: [] } met passende HTTP-status."
  }
}