{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/eliq/main/json-schema/eliq-time-series-data-schema.json",
  "title": "TimeSeriesData",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eliq-energy-data-api-openapi.yml#/components/schemas/TimeSeriesData",
  "type": "object",
  "properties": {
    "consumption": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "number",
          "null"
        ],
        "format": "double"
      }
    },
    "production": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "number",
          "null"
        ],
        "format": "double"
      }
    },
    "import": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "number",
          "null"
        ],
        "format": "double"
      }
    },
    "export": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "number",
          "null"
        ],
        "format": "double"
      }
    },
    "price": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "number",
          "null"
        ],
        "format": "double"
      }
    },
    "co2emission": {
      "$ref": "#/$defs/Co2Emission"
    },
    "resolution": {
      "type": [
        "string",
        "null"
      ]
    },
    "fuel": {
      "$ref": "#/$defs/FuelType"
    },
    "unit": {
      "$ref": "#/$defs/UnitType"
    },
    "from": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "to": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "estimated_from": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "is_ondemand": {
      "type": [
        "boolean",
        "null"
      ]
    }
  },
  "$defs": {
    "Co2Emission": {
      "type": "object",
      "properties": {
        "co2_in_kg": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        },
        "car_gas_emission_in_km": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        }
      }
    },
    "FuelType": {
      "enum": [
        "none",
        "elec",
        "gas",
        "district_heating"
      ],
      "type": "string"
    },
    "UnitType": {
      "enum": [
        "none",
        "cost",
        "monetary_unit",
        "energy",
        "temperature",
        "m3"
      ],
      "type": "string"
    }
  }
}