{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aplusz-app/json-schema/aplusz-app-fare-schema.json",
  "title": "Fare",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aplusz-app-openapi.json#/components/schemas/Fare",
  "type": "object",
  "required": [
    "from",
    "to",
    "price",
    "currency",
    "freshness"
  ],
  "properties": {
    "from": {
      "type": "string",
      "description": "Origin IATA city code"
    },
    "to": {
      "type": "string",
      "description": "Destination IATA city code"
    },
    "from_name": {
      "type": "string"
    },
    "to_name": {
      "type": "string"
    },
    "from_country": {
      "type": "string"
    },
    "to_country": {
      "type": "string"
    },
    "price": {
      "type": "number",
      "description": "Lowest observed one-way fare, rounded"
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217"
    },
    "six_month_low": {
      "type": [
        "number",
        "null"
      ],
      "description": "Lowest fare observed in the trailing six months. null means not observed."
    },
    "best_depart_date": {
      "type": [
        "string",
        "null"
      ],
      "description": "Departure date on which the lowest fare was observed"
    },
    "drop_pct": {
      "type": "number",
      "description": "Percent below the route baseline. 0 when unknown."
    },
    "freshness": {
      "type": "string",
      "enum": [
        "cached_snapshot"
      ],
      "description": "Always cached_snapshot. Never real-time."
    },
    "html_url": {
      "type": "string"
    },
    "md_url": {
      "type": "string"
    },
    "live_check_url": {
      "type": "string",
      "description": "Send the user here before booking"
    },
    "license": {
      "type": "string"
    },
    "cite_as": {
      "type": "string"
    }
  }
}