{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/red-energy/main/json-schema/red-energy-energy-der-list-response-schema.json",
  "title": "EnergyDerListResponse",
  "x-generated": "2026-10-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/red-energy-distributed-energy-resources-api-openapi.yml#/components/schemas/EnergyDerListResponse",
  "properties": {
    "data": {
      "$ref": "#/$defs/EnergyDerListResponse_data"
    },
    "links": {
      "$ref": "#/$defs/LinksPaginated"
    },
    "meta": {
      "$ref": "#/$defs/MetaPaginated"
    }
  },
  "required": [
    "data",
    "links",
    "meta"
  ],
  "type": "object",
  "$defs": {
    "EnergyDerListResponse_data": {
      "properties": {
        "derRecords": {
          "description": "Array of meter reads.",
          "items": {
            "$ref": "#/$defs/EnergyDerRecord"
          },
          "type": "array"
        }
      },
      "required": [
        "derRecords"
      ],
      "type": "object"
    },
    "EnergyDerRecord": {
      "properties": {
        "acConnections": {
          "items": {
            "$ref": "#/$defs/EnergyDerRecord_acConnections"
          },
          "type": "array"
        },
        "approvedCapacity": {
          "description": "Approved small generating unit capacity as agreed with NSP in the connection agreement, expressed in kVA. Value of `0` indicates no DER record exists for the given _servicePointId_.",
          "type": "number"
        },
        "availablePhasesCount": {
          "description": "The number of phases available for the installation of DER. Acceptable values are `0`, `1`, `2` or `3`. Value of `0` indicates no DER record exists for the given _servicePointId_.",
          "maximum": 3,
          "minimum": 0,
          "type": "integer",
          "x-cds-type": "NaturalNumber"
        },
        "hasCentralProtectionControl": {
          "default": false,
          "description": "For DER installations where NSPs specify the need for additional forms of protection above those inbuilt in an inverter. If absent then assumed to be `false`.",
          "type": "boolean"
        },
        "installedPhasesCount": {
          "description": "The number of phases that DER is connected to. Acceptable values are `0`, `1`, `2` or `3`. Value of `0` indicates no DER record exists for the given _servicePointId_.",
          "maximum": 3,
          "minimum": 0,
          "type": "integer",
          "x-cds-type": "NaturalNumber"
        },
        "islandableInstallation": {
          "description": "For identification of small generating units designed with the ability to operate in an islanded mode.",
          "type": "boolean"
        },
        "protectionMode": {
          "$ref": "#/$defs/EnergyDerRecord_protectionMode"
        },
        "servicePointId": {
          "allOf": [
            {
              "$ref": "#/$defs/EnergyServicePointId"
            }
          ],
          "description": "Unique identifier for the service point."
        }
      },
      "required": [
        "acConnections",
        "approvedCapacity",
        "availablePhasesCount",
        "installedPhasesCount",
        "islandableInstallation",
        "servicePointId"
      ],
      "type": "object",
      "x-conditional": [
        "protectionMode"
      ]
    },
    "EnergyDerRecord_acConnections": {
      "properties": {
        "commissioningDate": {
          "description": "The date that the DER installation is commissioned.",
          "type": "string",
          "x-cds-type": "DateString"
        },
        "connectionIdentifier": {
          "description": "AC Connection ID as defined in the DER register. Does not align with CDR ID permanence standards.",
          "type": "number"
        },
        "count": {
          "description": "Number of AC Connections in the group. For the suite of AC Connections to be considered as a group, all of the AC Connections included must have the same attributes.",
          "type": "integer",
          "x-cds-type": "PositiveInteger"
        },
        "derDevices": {
          "items": {
            "$ref": "#/$defs/EnergyDerRecord_derDevices"
          },
          "type": "array"
        },
        "equipmentType": {
          "default": "OTHER",
          "description": "Indicates whether the DER device is connected via an inverter (and what category of inverter it is) or not (e.g., rotating machine). If absent, assume equipment type to be `OTHER`.",
          "enum": [
            "INVERTER",
            "OTHER"
          ],
          "type": "string"
        },
        "inverterDeviceCapacity": {
          "description": "The rated AC output power that is listed in the product specified by the manufacturer. Mandatory if _equipmentType_ is `INVERTER`. Default is `0` if value not known.",
          "type": "number"
        },
        "inverterModelNumber": {
          "description": "The inverter model number. Mandatory if _equipmentType_ is `INVERTER`.",
          "type": "string"
        },
        "inverterSeries": {
          "description": "The inverter series. Mandatory if _equipmentType_ is `INVERTER`.",
          "type": "string"
        },
        "manufacturerName": {
          "description": "The name of the inverter manufacturer. Mandatory if _equipmentType_ is `INVERTER`.",
          "type": "string"
        },
        "status": {
          "description": "Code used to indicate the status of the Inverter. This will be used to identify if an inverter is active or inactive or decommissioned.",
          "enum": [
            "ACTIVE",
            "INACTIVE",
            "DECOMMISSIONED"
          ],
          "type": "string"
        }
      },
      "required": [
        "commissioningDate",
        "connectionIdentifier",
        "count",
        "derDevices",
        "status"
      ],
      "type": "object",
      "x-conditional": [
        "manufacturerName",
        "inverterSeries",
        "inverterModelNumber",
        "inverterDeviceCapacity"
      ]
    },
    "EnergyDerRecord_derDevices": {
      "properties": {
        "count": {
          "description": "Number of devices in the group of DER devices.",
          "type": "integer",
          "x-cds-type": "PositiveInteger"
        },
        "deviceIdentifier": {
          "description": "Unique identifier for a single DER device or a group of DER devices with the same attributes. Does not align with CDR ID permanence standards.",
          "type": "number"
        },
        "manufacturer": {
          "description": "The name of the device manufacturer. If absent then assumed to be \"unknown\".",
          "type": "string"
        },
        "modelNumber": {
          "description": "The model number of the device. If absent then assumed to be \"unknown\".",
          "type": "string"
        },
        "nominalRatedCapacity": {
          "description": "Maximum output in kVA that is listed in the product specification by the manufacturer. This refers to the capacity of each unit within the device group. Default is `0` if value not known.",
          "type": "number"
        },
        "nominalStorageCapacity": {
          "description": "Maximum storage capacity in kVAh. This refers to the capacity of each storage module within the device group. Mandatory if type is equal to `STORAGE`. Default is `0` if value not known.",
          "type": "number"
        },
        "status": {
          "description": "Code used to indicate the status of the device. This will be used to identify if an inverter is active or inactive or decommissioned.",
          "enum": [
            "ACTIVE",
            "INACTIVE",
            "DECOMMISSIONED"
          ],
          "type": "string"
        },
        "subtype": {
          "description": "Used to indicate the primary technology used in the DER device. This field is also used to record for example the battery chemistry, or the type of PV panel. It is also used to record if a battery is contained in an electric vehicle connected in a vehicle-to-grid arrangement. If absent then assumed to be \"other\".",
          "type": "string"
        },
        "type": {
          "description": "Used to indicate the primary technology used in the DER device.",
          "enum": [
            "FOSSIL",
            "HYDRO",
            "WIND",
            "SOLAR_PV",
            "RENEWABLE",
            "GEOTHERMAL",
            "STORAGE",
            "OTHER"
          ],
          "type": "string"
        }
      },
      "required": [
        "count",
        "deviceIdentifier",
        "nominalRatedCapacity",
        "type"
      ],
      "type": "object",
      "x-conditional": [
        "nominalStorageCapacity"
      ]
    },
    "EnergyDerRecord_protectionMode": {
      "description": "Required only when the _hasCentralProtectionControl_ flag is set to `true`. One or more of the object fields will be provided to describe the protection modes in place.",
      "properties": {
        "exportLimitKva": {
          "description": "Maximum amount of power (kVA) that may be exported from a connection point to the grid, as monitored by a control/relay function. An absent value indicates no limit.",
          "type": "number"
        },
        "frequencyRateOfChange": {
          "description": "Rate of change of frequency trip point (Hz/s).",
          "type": "number"
        },
        "interTripScheme": {
          "description": "Description of the form of inter-trip (e.g., 'from local substation').",
          "type": "string"
        },
        "neutralVoltageDisplacement": {
          "description": "Trip voltage.",
          "type": "number"
        },
        "overFrequencyProtection": {
          "description": "Protective function limit in Hz.",
          "type": "number"
        },
        "overFrequencyProtectionDelay": {
          "description": "Trip delay time in seconds.",
          "type": "number"
        },
        "overVoltageProtection": {
          "description": "Protective function limit in V.",
          "type": "number"
        },
        "overVoltageProtectionDelay": {
          "description": "Trip delay time in seconds.",
          "type": "number"
        },
        "sustainedOverVoltage": {
          "description": "Sustained over voltage.",
          "type": "number"
        },
        "sustainedOverVoltageDelay": {
          "description": "Sustained Over voltage protection delay in seconds.",
          "type": "number"
        },
        "underFrequencyProtection": {
          "description": "Protective function limit in Hz.",
          "type": "number"
        },
        "underFrequencyProtectionDelay": {
          "description": "Trip delay time in seconds.",
          "type": "number"
        },
        "underVoltageProtection": {
          "description": "Protective function limit in V.",
          "type": "number"
        },
        "underVoltageProtectionDelay": {
          "description": "Trip delay time in seconds.",
          "type": "number"
        },
        "voltageVectorShift": {
          "description": "Trip angle in degrees.",
          "type": "number"
        }
      },
      "type": "object"
    },
    "EnergyServicePointId": {
      "description": "A unique identifier for an Energy service point, generated according to [CDR ID Permanence](#id-permanence) requirements.",
      "type": "string",
      "x-cds-type": "ASCIIString"
    },
    "LinksPaginated": {
      "properties": {
        "first": {
          "description": "URI to the first page of this set. Mandatory if this response is not the first page.",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "last": {
          "description": "URI to the last page of this set. Mandatory if this response is not the last page.",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "next": {
          "description": "URI to the next page of this set. Mandatory if this response is not the last page.",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "prev": {
          "description": "URI to the previous page of this set. Mandatory if this response is not the first page.",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "self": {
          "description": "Fully qualified link that generated the current response document.",
          "type": "string",
          "x-cds-type": "URIString"
        }
      },
      "required": [
        "self"
      ],
      "type": "object",
      "x-conditional": [
        "first",
        "prev",
        "next",
        "last"
      ]
    },
    "MetaPaginated": {
      "properties": {
        "totalPages": {
          "description": "The total number of pages in the full set. See [pagination](#pagination).",
          "type": "integer",
          "x-cds-type": "NaturalNumber"
        },
        "totalRecords": {
          "description": "The total number of records in the full set. See [pagination](#pagination).",
          "type": "integer",
          "x-cds-type": "NaturalNumber"
        }
      },
      "required": [
        "totalPages",
        "totalRecords"
      ],
      "type": "object"
    }
  }
}