{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pointifytravels-com/json-schema/pointifytravels-com-flight-deal-schema.json",
  "title": "FlightDeal",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pointifytravels-com-openapi.json#/components/schemas/FlightDeal",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "segments": {
      "items": {
        "$ref": "#/$defs/FlightSegment"
      },
      "type": "array",
      "title": "Segments"
    },
    "price_cash": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Price Cash"
    },
    "price_currency": {
      "type": "string",
      "title": "Price Currency",
      "default": "USD"
    },
    "price_points": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Price Points"
    },
    "points_program_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Points Program Name"
    },
    "cabin_class": {
      "$ref": "#/$defs/CabinClass"
    },
    "stops": {
      "type": "integer",
      "title": "Stops"
    },
    "total_duration_minutes": {
      "type": "integer",
      "title": "Total Duration Minutes"
    },
    "source": {
      "$ref": "#/$defs/DealSource"
    },
    "deep_link": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Deep Link"
    },
    "seats_remaining": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Seats Remaining"
    },
    "price_delta_pct": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Price Delta Pct"
    },
    "fare_breakdown": {
      "anyOf": [
        {
          "$ref": "#/$defs/FareBreakdown"
        },
        {
          "type": "null"
        }
      ]
    },
    "award_options": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/AwardOption"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Award Options"
    },
    "duffel_offer_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Duffel Offer Id"
    },
    "bookable": {
      "type": "boolean",
      "title": "Bookable",
      "default": false
    },
    "outbound_stops": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Outbound Stops"
    },
    "return_stops": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Return Stops"
    },
    "fare_brand_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Fare Brand Name"
    },
    "cabin_class_marketing_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cabin Class Marketing Name"
    },
    "refundable": {
      "type": "boolean",
      "title": "Refundable",
      "default": false
    },
    "refund_penalty": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Refund Penalty"
    },
    "changeable": {
      "type": "boolean",
      "title": "Changeable",
      "default": false
    },
    "change_penalty": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Change Penalty"
    },
    "carry_on_included": {
      "type": "boolean",
      "title": "Carry On Included",
      "default": false
    },
    "checked_bags_included": {
      "type": "integer",
      "title": "Checked Bags Included",
      "default": 0
    },
    "seat_selection_included": {
      "type": "boolean",
      "title": "Seat Selection Included",
      "default": false
    },
    "alliance": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Alliance"
    },
    "earns_redeemable_miles": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Earns Redeemable Miles"
    },
    "earns_status_credit": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Earns Status Credit"
    },
    "cpp": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cpp"
    }
  },
  "type": "object",
  "required": [
    "id",
    "segments",
    "cabin_class",
    "stops",
    "total_duration_minutes",
    "source"
  ],
  "$defs": {
    "AwardOption": {
      "properties": {
        "programName": {
          "type": "string",
          "title": "Programname"
        },
        "pointsRequired": {
          "type": "integer",
          "title": "Pointsrequired"
        },
        "cppValue": {
          "type": "number",
          "title": "Cppvalue"
        },
        "transferFrom": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Transferfrom"
        },
        "transferRatio": {
          "type": "number",
          "title": "Transferratio",
          "default": 1.0
        },
        "transferPartners": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Transferpartners"
        },
        "isTransferPartner": {
          "type": "boolean",
          "title": "Istransferpartner",
          "default": false
        },
        "cabinClass": {
          "type": "string",
          "title": "Cabinclass",
          "default": "economy"
        },
        "estimated": {
          "type": "boolean",
          "title": "Estimated",
          "default": false
        }
      },
      "type": "object",
      "required": [
        "programName",
        "pointsRequired",
        "cppValue"
      ],
      "title": "AwardOption",
      "description": "Single loyalty-program redemption option. Serialized with camelCase keys."
    },
    "CabinClass": {
      "type": "string",
      "enum": [
        "economy",
        "premium_economy",
        "business",
        "first"
      ],
      "title": "CabinClass"
    },
    "DealSource": {
      "type": "string",
      "enum": [
        "duffel",
        "seats_aero",
        "google_flights",
        "amex_travel",
        "costco_travel",
        "aaa_travel",
        "sams_club_travel",
        "bjs_travel",
        "chase_ur_portal",
        "amex_mr_portal",
        "arkalis"
      ],
      "title": "DealSource"
    },
    "FareBreakdown": {
      "properties": {
        "baseFare": {
          "type": "number",
          "title": "Basefare"
        },
        "taxes": {
          "type": "number",
          "title": "Taxes"
        },
        "surcharges": {
          "type": "number",
          "title": "Surcharges",
          "default": 0
        },
        "totalCash": {
          "type": "number",
          "title": "Totalcash"
        }
      },
      "type": "object",
      "required": [
        "baseFare",
        "taxes",
        "totalCash"
      ],
      "title": "FareBreakdown",
      "description": "Cash fare decomposition. Serialized with camelCase keys for the frontend."
    },
    "FlightSegment": {
      "properties": {
        "departure_airport": {
          "type": "string",
          "title": "Departure Airport"
        },
        "arrival_airport": {
          "type": "string",
          "title": "Arrival Airport"
        },
        "departure_time": {
          "type": "string",
          "title": "Departure Time"
        },
        "arrival_time": {
          "type": "string",
          "title": "Arrival Time"
        },
        "carrier": {
          "type": "string",
          "title": "Carrier"
        },
        "carrier_name": {
          "type": "string",
          "title": "Carrier Name"
        },
        "flight_number": {
          "type": "string",
          "title": "Flight Number"
        },
        "duration_minutes": {
          "type": "integer",
          "title": "Duration Minutes"
        }
      },
      "type": "object",
      "required": [
        "departure_airport",
        "arrival_airport",
        "departure_time",
        "arrival_time",
        "carrier",
        "carrier_name",
        "flight_number",
        "duration_minutes"
      ],
      "title": "FlightSegment"
    }
  }
}