{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/engrate/json-schema/engrate-aggregate-allocation-page-schema.json",
  "title": "AggregateAllocationPage",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/engrate-time-series-api-openapi.yml#/components/schemas/AggregateAllocationPage",
  "properties": {
    "items": {
      "items": {
        "$ref": "#/$defs/AggregateAllocation"
      },
      "title": "Items",
      "type": "array"
    },
    "limit": {
      "title": "Limit",
      "type": "integer"
    },
    "offset": {
      "title": "Offset",
      "type": "integer"
    },
    "total": {
      "description": "The number of aggregate allocations that agree with the filters, on all pages.",
      "title": "Total",
      "type": "integer"
    }
  },
  "required": [
    "items",
    "limit",
    "offset",
    "total"
  ],
  "type": "object",
  "$defs": {
    "AggregateAllocation": {
      "description": "An aggregate allocation and its aggregation dimensions. A null or absent dimension includes the accounting points of all values.",
      "properties": {
        "aggregator": {
          "$ref": "#/$defs/AggregatorRole"
        },
        "allocation_basis": {
          "$ref": "#/$defs/AllocationBasis"
        },
        "area_code": {
          "title": "Area Code",
          "type": "string"
        },
        "area_kind": {
          "$ref": "#/$defs/AreaKind"
        },
        "balance_group": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The balance group of the accounting points in the aggregate allocation. If the value is null, the aggregate allocation includes all balance groups.",
          "title": "Balance Group"
        },
        "external_id": {
          "description": "The identification that the market gives to the aggregate allocation. Each aggregate allocation record has the identification of its aggregate allocation.",
          "title": "External Id",
          "type": "string"
        },
        "flow_direction": {
          "enum": [
            "consumption",
            "production"
          ],
          "title": "Flow Direction",
          "type": "string"
        },
        "market_dimensions": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Market-specific additional dimensions, used in markets that sub-divide aggregate allocations beyond what the common dimensions can represent",
          "title": "Market Dimensions",
          "type": "object"
        },
        "market_meta": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Market-specific additional metadata, for instance in markets where datasets with the exact same dimensions are sent at different cadences (daily, monthly), this metadata tells them apart.",
          "title": "Market Meta",
          "type": "object"
        },
        "supplier": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The supplier of the accounting points in the aggregate allocation. If the value is null, the aggregate allocation includes all suppliers.",
          "title": "Supplier"
        }
      },
      "required": [
        "aggregator",
        "allocation_basis",
        "area_code",
        "area_kind",
        "balance_group",
        "external_id",
        "flow_direction",
        "market_dimensions",
        "market_meta",
        "supplier"
      ],
      "title": "AggregateAllocation",
      "type": "object"
    },
    "AggregatorRole": {
      "description": "### Available aggregator roles\n\n- **grid_operator** — Indicates the source of the aggregation is a grid operator.\n\n- **transmission_operator** — Indicates the source of the aggregation is a transmission system operator.",
      "enum": [
        "grid_operator",
        "transmission_operator"
      ],
      "title": "AggregatorRole",
      "type": "string"
    },
    "AllocationBasis": {
      "description": "The basis tells you where the energy data for an aggregation is coming from: Is it directly metered values from smart meters, or is it something calculated from some standard profile?\n\n### Available allocation basises\n\n- **metered** — Indicates this aggregation's data comes from directly metered energy, like from smart meters.\n\n- **profiled** — Indicates this aggregation's data is coming from a 'profile' of some kind, a pre-determined shape of consumption or production, usually coupled with some adjustment calculations, like adjusting for daily temperature or past annual metered consumption.",
      "enum": [
        "metered",
        "profiled"
      ],
      "title": "AllocationBasis",
      "type": "string"
    },
    "AreaKind": {
      "description": "### Available area kinds\n\n- **metering_grid_area** — The area of one grid operator.\n\n- **control_area** — The area of one transmission system operator.\n\n- **scheduling_area** — See [Scheduling Area](/api-reference/core/models/scheduling-area).",
      "enum": [
        "metering_grid_area",
        "control_area",
        "scheduling_area"
      ],
      "title": "AreaKind",
      "type": "string"
    }
  }
}