{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/kibo-commerce/main/json-schema/kibo-commerce-reservation-aggregate-summary-schema.json",
  "title": "ReservationAggregateSummary",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kibo-commerce-reservation-openapi.yml#/components/schemas/ReservationAggregateSummary",
  "properties": {
    "allocatedDemand": {
      "format": "int64",
      "type": "integer"
    },
    "byAllocationStatus": {
      "items": {
        "$ref": "#/$defs/AllocationStatusDemandEntry"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "byCustomer": {
      "items": {
        "$ref": "#/$defs/CustomerDemandEntry"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "byReservationStatus": {
      "items": {
        "$ref": "#/$defs/ReservationStatusDemandEntry"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "totalDemand": {
      "format": "int64",
      "type": "integer"
    },
    "unallocatedDemand": {
      "format": "int64",
      "type": "integer"
    }
  },
  "type": "object",
  "$defs": {
    "AllocationStatusDemandEntry": {
      "properties": {
        "allocationStatus": {
          "type": [
            "string",
            "null"
          ]
        },
        "itemCount": {
          "format": "int32",
          "type": "integer"
        },
        "totalDemand": {
          "format": "int64",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "CustomerDemandEntry": {
      "properties": {
        "customerAccountId": {
          "format": "int32",
          "type": [
            "integer",
            "null"
          ]
        },
        "reservationCount": {
          "format": "int32",
          "type": "integer"
        },
        "totalDemand": {
          "format": "int64",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "ReservationStatusDemandEntry": {
      "properties": {
        "reservationCount": {
          "format": "int32",
          "type": "integer"
        },
        "reservationStatus": {
          "type": [
            "string",
            "null"
          ]
        },
        "totalDemand": {
          "format": "int64",
          "type": "integer"
        }
      },
      "type": "object"
    }
  }
}