{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cruise-itinerary-com/json-schema/cruise-itinerary-com-price-index-point-schema.json",
  "title": "PriceIndexPoint",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cruise-itinerary-com-openapi.json#/components/schemas/PriceIndexPoint",
  "type": "object",
  "properties": {
    "observed_on": {
      "type": "string",
      "format": "date"
    },
    "previous_on": {
      "oneOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "line": {
      "oneOf": [
        {
          "$ref": "#/$defs/Ref"
        },
        {
          "type": "null"
        }
      ]
    },
    "cabin": {
      "type": "string",
      "enum": [
        "inside",
        "outside",
        "balcony",
        "suite",
        "any"
      ]
    },
    "segment": {
      "type": "string",
      "description": "all, a booking window (w000_090, w091_180, w181_365, w366_plus), a sail quarter such as q2027_1, or a ship size class (size_intimate, size_small, size_medium, size_large, size_mega)."
    },
    "weighting": {
      "type": "string",
      "description": "sailing: each matched sailing counts once (the published index). berth: each sailing weighted by its ship's lower berths; sailings with no berth count are left out.",
      "enum": [
        "sailing",
        "berth"
      ]
    },
    "matched": {
      "type": "integer",
      "description": "Sailings priced in both loads."
    },
    "index_value": {
      "type": "number",
      "description": "Chained index, 100 on 2026-09-06."
    },
    "mean_log_change": {
      "oneOf": [
        {
          "type": "number",
          "description": "Mean of ln(new/old) over matched sailings, each winsorized to -0.5..0.5."
        },
        {
          "type": "null"
        }
      ]
    },
    "pct_cut": {
      "oneOf": [
        {
          "type": "number",
          "description": "Percent of matched sailings whose fare fell."
        },
        {
          "type": "null"
        }
      ]
    },
    "pct_raised": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "pct_unavailable": {
      "oneOf": [
        {
          "type": "number",
          "description": "Percent priced before and unpriced now, still listed."
        },
        {
          "type": "null"
        }
      ]
    },
    "avg_per_diem": {
      "oneOf": [
        {
          "type": "number",
          "description": "Mean fare per night, USD, over the matched set."
        },
        {
          "type": "null"
        }
      ]
    },
    "berth_coverage_pct": {
      "oneOf": [
        {
          "type": "number",
          "description": "berth rows only: percent of the matched sailings whose ship has a berth count. Null for sailing rows."
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "observed_on",
    "previous_on",
    "line",
    "cabin",
    "segment",
    "weighting",
    "matched",
    "index_value",
    "mean_log_change",
    "pct_cut",
    "pct_raised",
    "pct_unavailable",
    "avg_per_diem",
    "berth_coverage_pct"
  ],
  "additionalProperties": false,
  "$defs": {
    "Ref": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Slug."
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "additionalProperties": false
    }
  }
}