{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/cuebiq/main/json-schema/cuebiq-performance-kpis-schema.json",
  "title": "PerformanceKpis",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cuebiq-openapi.json#/components/schemas/PerformanceKpis",
  "required": [
    "uplift",
    "cumulativeImpressions",
    "cumulativeMeasuredVisits",
    "cumulativeProjectedVisits",
    "exposedVisitRate",
    "cumulativeReachedPeople",
    "incrementalityRatio",
    "projectedIncrementalVisits",
    "cumulativeMeasuredPeople"
  ],
  "type": "object",
  "properties": {
    "uplift": {
      "$ref": "#/$defs/KpiWithConfidenceInfo"
    },
    "cumulativeImpressions": {
      "$ref": "#/$defs/KpiDouble"
    },
    "cumulativeMeasuredVisits": {
      "$ref": "#/$defs/KpiLong"
    },
    "cumulativeProjectedVisits": {
      "$ref": "#/$defs/KpiDouble"
    },
    "exposedVisitRate": {
      "$ref": "#/$defs/KpiDouble"
    },
    "cumulativeReachedPeople": {
      "$ref": "#/$defs/KpiDouble"
    },
    "incrementalityRatio": {
      "$ref": "#/$defs/KpiDouble"
    },
    "costPerVisit": {
      "allOf": [
        {
          "$ref": "#/$defs/KpiDouble"
        }
      ],
      "nullable": true
    },
    "costPerIncrementalVisit": {
      "allOf": [
        {
          "$ref": "#/$defs/KpiDouble"
        }
      ],
      "nullable": true
    },
    "projectedIncrementalVisits": {
      "$ref": "#/$defs/KpiDouble"
    },
    "cumulativeMeasuredPeople": {
      "$ref": "#/$defs/KpiLong"
    }
  },
  "$defs": {
    "KpiDouble": {
      "required": [
        "date",
        "value"
      ],
      "type": "object",
      "properties": {
        "date": {
          "$ref": "#/$defs/LocalDate"
        },
        "value": {
          "format": "double",
          "type": "number"
        }
      }
    },
    "KpiLong": {
      "required": [
        "date",
        "value"
      ],
      "type": "object",
      "properties": {
        "date": {
          "$ref": "#/$defs/LocalDate"
        },
        "value": {
          "format": "int64",
          "type": "integer"
        }
      }
    },
    "KpiWithConfidenceInfo": {
      "required": [
        "date"
      ],
      "type": "object",
      "properties": {
        "date": {
          "$ref": "#/$defs/LocalDate"
        },
        "value": {
          "format": "double",
          "type": "number"
        },
        "lowerBound": {
          "format": "double",
          "type": "number"
        },
        "upperBound": {
          "format": "double",
          "type": "number"
        },
        "confidenceIndex": {
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "LocalDate": {
      "format": "date",
      "type": "string"
    }
  }
}