{
  "$id": "https://schema.nfh.global/ItineraryElement/v2.0",
  "x-iri": "https://schema.nfh.global/ItineraryElement/v2.0",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "ItineraryElement",
  "type": "object",
  "description": "A component of an aviation itinerary such as a flight segment, ground transport leg, or ancillary service.",
  "properties": {
    "elementType": {
      "description": "Type of itinerary element (FLIGHT, GROUND_TRANSPORT, ANCILLARY)",
      "type": "string"
    },
    "segmentRef": {
      "description": "Reference to a flight segment if this is a flight element",
      "$ref": "https://schema.nfh.global/FlightSegment/v2.0/schema.json"
    },
    "legRef": {
      "description": "Reference to a transport leg if this is a surface element",
      "$ref": "https://schema.nfh.global/Leg/v2.0/schema.json"
    },
    "sequence": {
      "description": "Sequential order of this element within the itinerary",
      "type": "number"
    },
    "id": {
      "description": "Unique identifier for the contract item",
      "type": "string"
    },
    "descriptor": {
      "description": "Human-readable description of the item",
      "$ref": "https://schema.nfh.global/Descriptor/v2.1/schema.json"
    },
    "price": {
      "description": "Price for this contract item",
      "$ref": "https://schema.nfh.global/PriceSpecification/v2.1/schema.json"
    },
    "quantity": {
      "description": "Quantity of this contract item",
      "$ref": "https://schema.nfh.global/Quantity/v2.0/schema.json"
    }
  },
  "additionalProperties": false,
  "x-tags": [
    "mobility",
    "ride-hailing"
  ]
}
