{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ignav-com/json-schema/ignav-com-fare-search-response-model-schema.json",
  "title": "FareSearchResponseModel",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ignav-com-openapi.json#/components/schemas/FareSearchResponseModel",
  "properties": {
    "origin": {
      "type": "string",
      "title": "Origin"
    },
    "destination": {
      "type": "string",
      "title": "Destination"
    },
    "departure_date": {
      "type": "string",
      "title": "Departure Date"
    },
    "return_date": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Return Date"
    },
    "itineraries": {
      "items": {
        "$ref": "#/$defs/ItineraryModel"
      },
      "type": "array",
      "title": "Itineraries"
    },
    "observed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Observed At",
      "description": "UTC time Ignav finished retrieving this search result; null when unknown. Not a guarantee of the current fare."
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "origin",
    "destination",
    "departure_date",
    "itineraries",
    "observed_at"
  ],
  "$defs": {
    "BaggageAllowanceModel": {
      "properties": {
        "carry_on": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Carry On"
        },
        "checked": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Checked"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "BaggageAllowanceModel"
    },
    "ItineraryModel": {
      "properties": {
        "price": {
          "$ref": "#/$defs/PriceModel"
        },
        "outbound": {
          "$ref": "#/$defs/LegModel"
        },
        "inbound": {
          "anyOf": [
            {
              "$ref": "#/$defs/LegModel"
            },
            {
              "type": "null"
            }
          ]
        },
        "cabin_class": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cabin Class"
        },
        "bags": {
          "anyOf": [
            {
              "$ref": "#/$defs/BaggageAllowanceModel"
            },
            {
              "type": "null"
            }
          ]
        },
        "requires_self_transfer": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Requires Self Transfer"
        },
        "ignav_id": {
          "title": "Ignav Id",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "price",
        "outbound",
        "ignav_id"
      ],
      "title": "ItineraryModel"
    },
    "LegModel": {
      "properties": {
        "carrier": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Carrier"
        },
        "duration_minutes": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Duration Minutes"
        },
        "segments": {
          "items": {
            "$ref": "#/$defs/SegmentModel"
          },
          "type": "array",
          "title": "Segments"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "segments"
      ],
      "title": "LegModel"
    },
    "PriceModel": {
      "properties": {
        "amount": {
          "type": "number",
          "title": "Amount"
        },
        "currency": {
          "type": "string",
          "title": "Currency"
        },
        "status": {
          "type": "string",
          "enum": [
            "verified",
            "unverified"
          ],
          "title": "Status"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "amount",
        "currency",
        "status"
      ],
      "title": "PriceModel"
    },
    "SegmentModel": {
      "properties": {
        "marketing_carrier_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Marketing Carrier Code"
        },
        "flight_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Flight Number"
        },
        "operating_carrier_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Operating Carrier Name"
        },
        "departure_airport": {
          "type": "string",
          "title": "Departure Airport"
        },
        "departure_time_local": {
          "type": "string",
          "title": "Departure Time Local"
        },
        "departure_timezone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Departure Timezone"
        },
        "departure_time_utc": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Departure Time Utc"
        },
        "arrival_airport": {
          "type": "string",
          "title": "Arrival Airport"
        },
        "arrival_time_local": {
          "type": "string",
          "title": "Arrival Time Local"
        },
        "arrival_timezone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Arrival Timezone"
        },
        "arrival_time_utc": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Arrival Time Utc"
        },
        "duration_minutes": {
          "type": "integer",
          "title": "Duration Minutes"
        },
        "aircraft": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Aircraft"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "marketing_carrier_code",
        "flight_number",
        "operating_carrier_name",
        "departure_airport",
        "departure_time_local",
        "departure_timezone",
        "departure_time_utc",
        "arrival_airport",
        "arrival_time_local",
        "arrival_timezone",
        "arrival_time_utc",
        "duration_minutes",
        "aircraft"
      ],
      "title": "SegmentModel"
    }
  }
}