openapi: 3.0.3
info:
    title: ⚡ Energetics API
    description: >-
        <p> ⚡ Energetics </p>
    version: 1.0.0
    contact:
        name: Golemio Prague Data Platform
        email: golemio@operatorict.cz
        url: https://golemio.cz
servers:
    - url: https://rabin.golemio.cz
      description: Test (development) server
    - url: https://api.golemio.cz
      description: Main (production) server
tags:
    - name: ⚡ Energetics (v2)
      description: >-
          💡 Organizations & measurement devices — the original OICT Energetika data domain
          (`organizations*` and `consumption_energy_*` tables). All endpoints in this group are
          organization-scoped and require the internal `accessLimit` query parameter, which is set
          by the permission proxy (never by the client).
    - name: 🗺️ Energetics DeD (v2)
      description: >-
          🏢 DeD — city-wide energy management overview for Prague buildings. A separate data
          domain from ⚡ Energetics: ENO buildings, consumption points (OM), PRE/PPAS enrichment
          and Porsenna e-manazer devices. Data is not organization-scoped, so these endpoints do
          not use the `accessLimit` parameter at all — sending it (or any other unknown query
          parameter) is rejected with HTTP 400.
paths:
    /v2/energetics/buildings:
        get:
            tags:
                - ⚡ Energetics (v2)
            summary: Get all buildings
            parameters:
                - name: full
                  in: query
                  description: Display full buildings data.
                  required: false
                  schema:
                      type: boolean
                      default: false
                      example: false
            responses:
                "200":
                    description: OK
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=21600, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    $ref: "#/components/schemas/EnergeticsBuildingShort"

    /v2/energetics/buildings/{id}:
        get:
            tags:
                - ⚡ Energetics (v2)
            summary: Get a building by ID
            parameters:
                - in: path
                  name: id
                  required: true
                  schema:
                      type: number
                      example: 100
            responses:
                "200":
                    description: OK
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=1800, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/EnergeticsBuildingFull"

    /v2/energetics/ded/buildings:
        get:
            tags:
                - 🗺️ Energetics DeD (v2)
            summary: Search buildings by name, address, GID, EAN, EIC or OM identifier
            description: >-
                Suggestion endpoint for the DeD map. A single free-text query `q` is matched against the
                building name, its addresses, the GID and the identifiers of every consumption point mapped
                to the building.

                Matching runs in two tiers. An exact match on an EAN, EIC, OM identifier or GID is returned
                on its own — fuzzy candidates are dropped entirely and `matched_exactly` is `true`. Note that
                one identifier can be mapped to several buildings, so an exact match may still return more
                than one result; the map should zoom automatically only when exactly one result is returned.
                Otherwise results are ranked by a weighted full-text and trigram score over the name
                (highest weight), the main address, the secondary addresses and the identifiers. Queries
                typed without Czech diacritics match normally.

                Every result carries the building outline as GeoJSON together with its bounding box and
                centroid, all in WGS84 (EPSG:4326), so the map can zoom to a hit. They are `null` when the
                building has no usable geometry, signalled by `geometry_source: null`.
            parameters:
                - in: query
                  name: q
                  required: true
                  description: Search text — name, address, GID, EAN, EIC or OM identifier.
                  schema:
                      type: string
                      minLength: 1
                      maxLength: 100
                      example: "859182400000000001"
                - in: query
                  name: limit
                  required: false
                  description: Maximum number of suggestions returned.
                  schema:
                      type: integer
                      minimum: 1
                      maximum: 50
                      default: 10
            responses:
                "200":
                    description: OK
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=60, stale-while-revalidate=30
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/EnergeticsDedBuildingSearch"
                "400":
                    $ref: "#/components/responses/BadRequestError"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "500":
                    $ref: "#/components/responses/ServerError"

    /v2/energetics/ded/buildings/{gid}:
        get:
            tags:
                - 🗺️ Energetics DeD (v2)
            summary: ENO building detail with consumption points (OM) and technical parameters
            description: >-
                Returns the ENO building (eno_budova) identified by GID together with its addresses and all
                consumption points mapped to it.
            parameters:
                - in: path
                  name: gid
                  required: true
                  schema:
                      type: string
                      example: GID100
                - in: query
                  name: months
                  required: false
                  description: >-
                      Months of consumption history to return, counted back from the last **complete**
                      month. The current, partial month is always excluded: it is mid-accumulation and on a
                      trend chart reads as a collapse rather than as incomplete data. The maximum matches
                      the window the underlying index is built over.
                  schema:
                      type: integer
                      minimum: 1
                      maximum: 48
                      default: 36
            responses:
                "200":
                    description: OK
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=21600, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/EnergeticsEnoBuildingDetail"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    $ref: "#/components/responses/NotFoundError"
                "500":
                    $ref: "#/components/responses/ServerError"

    /v2/energetics/devices:
        get:
            tags:
                - ⚡ Energetics (v2)
            summary: List of measurement devices
            responses:
                "200":
                    description: Success
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=1800, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    $ref: "#/components/schemas/EnergeticsDevice"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "500":
                    $ref: "#/components/responses/ServerError"

    /v2/energetics/devices/{deviceId}:
        get:
            tags:
                - ⚡ Energetics (v2)
            summary: Measurement device info
            parameters:
                - name: deviceId
                  in: path
                  description: Id of device
                  required: true
                  schema:
                      type: integer
                      format: int32
                      example: 16
            responses:
                "200":
                    description: Success
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=1800, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/EnergeticsDevice"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    $ref: "#/components/responses/NotFoundError"
                "500":
                    $ref: "#/components/responses/ServerError"

    /v2/energetics/organizations:
        get:
            tags:
                - ⚡ Energetics (v2)
            summary: List of organizations in brief or full format
            parameters:
                - name: full
                  in: query
                  description: Display full organization data.
                  required: false
                  schema:
                      type: boolean
                      default: false
                      example: false
            responses:
                "200":
                    description: Success
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=1800, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                anyOf:
                                    - type: array
                                      items:
                                          $ref: "#/components/schemas/EnergeticsOrganizationShort"
                                    - type: array
                                      items:
                                          $ref: "#/components/schemas/EnergeticsOrganizationFull"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "500":
                    $ref: "#/components/responses/ServerError"

    /v2/energetics/organizations/{organizationId}:
        get:
            tags:
                - ⚡ Energetics (v2)
            summary: Organization detail
            parameters:
                - name: organizationId
                  in: path
                  description: Id of organization
                  required: true
                  schema:
                      type: integer
                      format: int32
                      example: 1
            responses:
                "200":
                    description: Success
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=1800, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/EnergeticsOrganizationFull"
                "400":
                    $ref: "#/components/responses/BadRequestError"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    $ref: "#/components/responses/NotFoundError"
                "500":
                    $ref: "#/components/responses/ServerError"

    /v2/energetics/measurements:
        get:
            tags:
                - ⚡ Energetics (v2)
            summary: Measurements
            parameters:
                - name: variable
                  in: query
                  required: false
                  schema:
                      $ref: "#/components/schemas/EnergeticsVariables"
                  description: >-
                      core - Kumulovaný objem [m3]<br />
                      core2 - Kumulovaný přepočítaný objem [Nm3]<br />
                      EFwActi - Odběr činné energie [kWh]<br />
                      EFwActiVT - Odběr činné energie, vysoký tarif [kVArh]<br />
                      ERvReact - Dodávka jalové energie [kVArh]<br />
                      EFwReact - Odběr jalové energie [kVArh]<br />
                      raw - Číselník impulzů [imp]<br />
                      RSSI - Síla signálu [dBm]<br />
                      T - Teplota [°C]<br />
                      CO2 - Koncentrace CO2 [ppm]<br />
                      RH - Relativní vlhkost [%]<br />
                      EFwActiNT - Odběr činné energie, nízký tarif [kVArh]<br />
                      VOC - Míra koncentrace těkavých látek [%]<br />
                      VT - Vysoký tarif [kWh]<br />
                      NT - Nízký tarif [kWh]<br />
                - name: type
                  in: query
                  required: false
                  schema:
                      $ref: "#/components/schemas/EnergeticsTypes"
                  description: >-
                      monthly_reading - hodnoty sčítané po měsících z 15 minutových spotřeb poskytovaných firmou PRE<br />
                      provider_value - data získaná od poskytovatelů energií<br />
                      dotcontrols_value - data získaná ze systémů VisApp firmy DotControls<br />
                - name: addr1
                  in: query
                  required: false
                  schema:
                      type: string
                      example: "2.9"
                - name: addr2
                  in: query
                  required: false
                  schema:
                      type: string
                      example: "PF1"
                - name: dateFrom
                  in: query
                  schema:
                      type: string
                      format: date-time
                      example: 2023-05-01T00:00:00.000Z
                - name: dateTo
                  in: query
                  schema:
                      type: string
                      format: date-time
                      example: 2023-05-02T00:00:00.000Z
                - name: limit
                  in: query
                  description: Limits number of retrieved items.
                  schema:
                      type: integer
                      example: 10000
                - name: offset
                  in: query
                  description: Number of the first items that are skipped.
                  schema:
                      type: integer
                      example: 0
            responses:
                "200":
                    description: Success
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=1800, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    $ref: "#/components/schemas/EnergeticsMeasurement"
                "400":
                    $ref: "#/components/responses/BadRequestError"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "500":
                    $ref: "#/components/responses/ServerError"

    /v2/energetics/measurements/monthly-reading:
        get:
            tags:
                - ⚡ Energetics (v2)
            summary: Monthly sums of measurements from devices
            parameters:
                - name: addr1
                  in: query
                  description: First part of device address
                  required: true
                  schema:
                      type: string
                      example: "2.9"
                - name: addr2
                  in: query
                  description: Second part of device address
                  required: true
                  schema:
                      type: string
                      example: "PF1"
                - name: variable
                  in: query
                  required: true
                  schema:
                      $ref: "#/components/schemas/EnergeticsVariables"
                  description: >-
                      core - Kumulovaný objem [m3]<br />
                      core2 - Kumulovaný přepočítaný objem [Nm3]<br />
                      EFwActi - Odběr činné energie [kWh]<br />
                      EFwActiVT - Odběr činné energie, vysoký tarif [kVArh]<br />
                      ERvReact - Dodávka jalové energie [kVArh]<br />
                      EFwReact - Odběr jalové energie [kVArh]<br />
                      raw - Číselník impulzů [imp]<br />
                      RSSI - Síla signálu [dBm]<br />
                      T - Teplota [°C]<br />
                      CO2 - Koncentrace CO2 [ppm]<br />
                      RH - Relativní vlhkost [%]<br />
                      EFwActiNT - Odběr činné energie, nízký tarif [kVArh]<br />
                      VOC - Míra koncentrace těkavých látek [%]<br />
                      VT - Vysoký tarif [kWh]<br />
                      NT - Nízký tarif [kWh]<br />
                - name: year
                  in: query
                  description: Year of measurement
                  required: true
                  schema:
                      type: integer
                      format: int32
                      example: 2023
                - name: month
                  in: query
                  description: Month of measurement
                  required: true
                  schema:
                      type: integer
                      format: int32
                      example: 5
            responses:
                "200":
                    description: Success
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=1800, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    $ref: "#/components/schemas/EnergeticsMeasurement"
                "400":
                    $ref: "#/components/responses/BadRequestError"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "500":
                    $ref: "#/components/responses/ServerError"

components:
    responses:
        UnauthorizedError:
            description: API key is missing or invalid
            content:
                application/json; charset=utf-8:
                    schema:
                        type: object
                        properties:
                            error_message:
                                type: string
                                example: Unauthorized
                            error_status:
                                type: number
                                example: 401
                            error_info:
                                type: string
        NotFoundError:
            description: Record not found
            content:
                application/json; charset=utf-8:
                    schema:
                        type: object
                        properties:
                            error_message:
                                type: string
                                example: Not fount
                            error_status:
                                type: number
                                example: 404
                            error_info:
                                type: string
                                example: "Record with id 1 not fount"
        BadRequestError:
            description: Bad request
            content:
                application/json; charset=utf-8:
                    schema:
                        type: object
                        properties:
                            error_message:
                                type: string
                                example: Bad request
                            error_status:
                                type: number
                                example: 400
                            error_info:
                                type: string
                                example: '{"limit":{"location":"query","param":"limit","value":"-2","msg":"Invalid value"}}'
        ServerError:
            description: Server error
            content:
                application/json; charset=utf-8:
                    schema:
                        type: object
                        properties:
                            error_message:
                                type: string
                                example: Server error
                            error_status:
                                type: number
                                example: 500
                            error_info:
                                type: string

    schemas:
        EnergeticsDedBuildingSearch:
            type: object
            properties:
                query:
                    type: string
                    example: "859182400000000001"
                matched_exactly:
                    type: boolean
                    description: >-
                        True when the query resolved to an exact EAN, EIC, OM identifier or GID. In that case
                        the results contain only exact matches.
                    example: true
                results:
                    type: array
                    items:
                        $ref: "#/components/schemas/EnergeticsDedBuildingSearchResult"
            required:
                - query
                - matched_exactly
                - results

        EnergeticsDedBuildingSearchResult:
            type: object
            properties:
                gid:
                    type: string
                    example: GID100
                name:
                    type: string
                    nullable: true
                    example: ZŠ Testovací
                designation:
                    type: string
                    nullable: true
                    example: ZŠT
                registration_unit:
                    allOf:
                        - $ref: "#/components/schemas/EnergeticsEnoRegistrationUnit"
                    description: >-
                        Evidenční jednotka (eno_ciselnik_evidencni_jednotka) resolved through eno_majetek;
                        null when the building has no majetek record. Its name is part of the search vector.
                department:
                    allOf:
                        - $ref: "#/components/schemas/EnergeticsEnoRegistrationUnit"
                    description: >-
                        Odbor spravující budovu: hlavní evidenční jednotka registrační jednotky
                        (kod_maj_evidencni_jednotka_hl), nebo registrační jednotka samotná, pokud žádnou
                        hlavní jednotku nemá.
                address:
                    type: string
                    nullable: true
                    description: Main address of the building.
                    example: Testovací 123/4, 100 00 Praha 10
                addresses:
                    type: array
                    description: Every distinct address of the building, the main one first.
                    items:
                        type: string
                    example:
                        - Testovací 123/4, 100 00 Praha 10
                        - Testovací 125/6, 100 00 Praha 10
                matched_by:
                    type: string
                    enum: [ean, eic, om, gid, name, address]
                    example: ean
                matched_value:
                    type: string
                    nullable: true
                    description: The identifier that matched. Null for non-exact matches.
                    example: "859182400000000001"
                score:
                    type: number
                    description: Relevance score. Exact matches always score 1000.
                    example: 1000
                identifiers:
                    type: object
                    properties:
                        ean:
                            type: array
                            items:
                                type: string
                        eic:
                            type: array
                            items:
                                type: string
                        om:
                            type: array
                            items:
                                type: string
                geometry:
                    type: object
                    nullable: true
                    description: Building outline as GeoJSON geometry in WGS84 (EPSG:4326).
                    properties:
                        type:
                            type: string
                            example: MultiPolygon
                        coordinates:
                            type: array
                            items: {}
                bbox:
                    type: array
                    nullable: true
                    description: "[minLon, minLat, maxLon, maxLat] in WGS84, for zooming the map."
                    items:
                        type: number
                    minItems: 4
                    maxItems: 4
                    example: [14.4174, 50.0863, 14.4188, 50.0873]
                centroid:
                    type: object
                    nullable: true
                    properties:
                        lat:
                            type: number
                            example: 50.0868
                        lon:
                            type: number
                            example: 14.4181
                geometry_source:
                    type: string
                    nullable: true
                    description: Source of the geometry, null when the building has none.
                    example: eno_geometrie
                has_building_record:
                    type: boolean
                    description: >-
                        False when the GID is known only through the consumption-point mapping or Porsenna
                        and has no eno_budova record. Such results are ranked below described buildings.
                    example: true
                active_points_count:
                    type: integer
                    example: 3
            # Every property is emitted unconditionally by DedBuildingSearchTransformation - the
            # nullable ones are present with a null value, never absent.
            required:
                - gid
                - name
                - designation
                - registration_unit
                - department
                - address
                - addresses
                - matched_by
                - matched_value
                - score
                - identifiers
                - geometry
                - bbox
                - centroid
                - geometry_source
                - has_building_record
                - active_points_count

        EnergeticsEnoRegistrationUnit:
            type: object
            # nullable lives here, next to `type`: OpenAPI 3.0 ignores a `nullable` that sits beside
            # an allOf reference, and portman turns that shape into an invalid JSON Schema.
            nullable: true
            description: >-
                Evidenční jednotka (eno_ciselnik_evidencni_jednotka) resolved through the building's
                eno_majetek record. The same shape is returned by the search and the detail endpoint.
                Null when the building has no majetek record.
            properties:
                id:
                    type: number
                    nullable: true
                    example: 7001
                kod:
                    type: string
                    nullable: true
                    example: EJ-7001
                nazev:
                    type: string
                    nullable: true
                    example: Evidenční jednotka Praha 10
                typ:
                    type: string
                    nullable: true
                    example: škola
            required:
                - id
                - kod
                - nazev
                - typ

        EnergeticsEnoBuildingDetail:
            type: object
            properties:
                gid:
                    type: string
                    example: GID100
                name:
                    type: string
                    nullable: true
                    description: >-
                        Display name of the building: `building.nazev`, then the Porsenna building name,
                        then null. `building` is null for a substantial share of GIDs and the card still
                        has to render a header, so the fallback is resolved here — the same chain the
                        search endpoint uses — rather than in every client, where the versions would
                        disagree.
                    example: ZŠ Testovací
                address:
                    type: string
                    nullable: true
                    description: >-
                        Main address of the building: the first described `addresses[]` entry (they are
                        ordered main-address first), then the Porsenna address, then null.
                    example: Testovací 123/4, 100 00 Praha 10
                building:
                    type: object
                    nullable: true
                    description: >-
                        All available eno_budova attributes (Czech identifiers mirror the upstream ENO source).
                        Null when the GID has no ENO building record and is known only through the
                        consumption-point mapping. Every property below is always present when the object
                        is; `additionalProperties` stays open so an upstream ENO addition is not breaking.
                    properties:
                        zdroj:
                            type: string
                            nullable: true
                            description: ENO source system the row was read from (mhmp / stat).
                            example: mhmp
                        nazev:
                            type: string
                            nullable: true
                        oznaceni:
                            type: string
                            nullable: true
                        druh_vytapeni:
                            type: string
                            nullable: true
                            description: Heating type as recorded in ENO.
                            example: ústřední dálkové
                        pripojka_elektro:
                            type: string
                            nullable: true
                        pripojka_voda:
                            type: string
                            nullable: true
                        pripojka_kanalizace:
                            type: string
                            nullable: true
                        budova_rozdelena_byt_nebyt:
                            type: string
                            nullable: true
                        celkova_plocha_budova:
                            type: number
                            nullable: true
                            description: Total floor area, m².
                        celkova_plocha_byt_budova:
                            type: number
                            nullable: true
                        celkova_plocha_nebyt_budova:
                            type: number
                            nullable: true
                        zastavena_plocha:
                            type: number
                            nullable: true
                            description: Built-up area, m².
                        obestaveny_prostor:
                            type: number
                            nullable: true
                            description: Enclosed volume, m³.
                        pocet_byt:
                            type: number
                            nullable: true
                        pocet_nebyt_budova:
                            type: number
                            nullable: true
                        pocet_nadzem_podlazi:
                            type: number
                            nullable: true
                        pocet_podzem_podlazi:
                            type: number
                            nullable: true
                        pocet_podkrovi:
                            type: number
                            nullable: true
                        vytah:
                            type: boolean
                            nullable: true
                        czcc:
                            type: number
                            nullable: true
                        id_cuzk:
                            type: number
                            nullable: true
                        id_objekt:
                            type: number
                            nullable: true
                        kod_vyuziti:
                            type: string
                            nullable: true
                        nazev_vyuziti:
                            type: string
                            nullable: true
                            example: budova občanské vybavenosti
                        kod_ochrana:
                            type: string
                            nullable: true
                        nazev_ochrana:
                            type: string
                            nullable: true
                        platnost_od:
                            type: string
                            format: date-time
                            nullable: true
                    additionalProperties: true
                property:
                    type: object
                    nullable: true
                    description: >-
                        ENO lookup data (eno_ciselnik_*) resolved through the building's eno_majetek record.
                        Null when the building has no majetek record.
                    properties:
                        registration_unit:
                            allOf:
                                - $ref: "#/components/schemas/EnergeticsEnoRegistrationUnit"
                            description: Evidenční jednotka (eno_ciselnik_evidencni_jednotka).
                        department:
                            allOf:
                                - $ref: "#/components/schemas/EnergeticsEnoRegistrationUnit"
                            description: >-
                                Odbor spravující budovu: hlavní evidenční jednotka registrační jednotky
                                (kod_maj_evidencni_jednotka_hl), nebo registrační jednotka samotná, pokud
                                žádnou hlavní jednotku nemá (tedy pokud je sama odborem).
                        managers:
                            type: object
                            description: Správci (eno_ciselnik_spravce) from the mandate and accounting-unit references.
                            properties:
                                mandate:
                                    type: object
                                    nullable: true
                                    description: Správce referenced by eno_majetek.id_maj_spravce_mandatni.
                                    properties:
                                        id:
                                            type: number
                                            nullable: true
                                        kod:
                                            type: string
                                            nullable: true
                                        nazev:
                                            type: string
                                            nullable: true
                                        ic:
                                            type: string
                                            nullable: true
                                        dic:
                                            type: string
                                            nullable: true
                                accounting_unit:
                                    type: object
                                    nullable: true
                                    description: Správce referenced by eno_majetek.id_maj_spravce_ucet_jednotka.
                                    properties:
                                        id:
                                            type: number
                                            nullable: true
                                        kod:
                                            type: string
                                            nullable: true
                                        nazev:
                                            type: string
                                            nullable: true
                                        ic:
                                            type: string
                                            nullable: true
                                        dic:
                                            type: string
                                            nullable: true
                addresses:
                    type: array
                    items:
                        type: object
                        properties:
                            popis:
                                type: string
                                nullable: true
                            hlavni:
                                type: boolean
                                nullable: true
                            poradi:
                                type: number
                energy_management:
                    type: object
                    nullable: true
                    description: Porsenna (e-manazer) tracking summary; null when the building is not tracked there
                    properties:
                        source:
                            type: string
                            example: prague-7
                        building_name:
                            type: string
                            nullable: true
                        address:
                            type: string
                            nullable: true
                        devices_total:
                            type: number
                        devices_active:
                            type: number
                        data_to:
                            type: string
                            format: date
                            nullable: true
                            description: >-
                                Most recent date any of this building's Porsenna devices reported; null when
                                none of them has consumption. Porsenna aggregates carry a covered-day count
                                rather than a reading timestamp, so this is the period start plus its covered
                                days, clamped to the end of the period. A meter count without an as-of date is
                                a claim with no expiry.
                            example: 2026-08-12
                consumption_history:
                    $ref: "#/components/schemas/EnergeticsEnoConsumptionHistory"
                consumption_points:
                    type: array
                    items:
                        $ref: "#/components/schemas/EnergeticsEnoConsumptionPoint"
                heat_sources:
                    $ref: "#/components/schemas/EnergeticsEnoHeatSources"
        EnergeticsEnoHeatSources:
            type: object
            description: >-
                Heat sources (boiler rooms) recorded for the building. 
            properties:
                count:
                    type: integer
                    description: Number of heat sources recorded for this building.
                    example: 3
                total_rated_output_kw:
                    type: number
                    nullable: true
                    description: >-
                        Sum of `rated_output_kw` over the building's heat sources
                    example: 650.5
                sources:
                    type: array
                    description: >-
                        The individual appliances, strongest rated output first. .
                    items:
                        type: object
                        properties:
                            appliance_name:
                                type: string
                                nullable: true
                                description: >-
                                    Free-text appliance name from the snapshot.
                                example: 2x gas boiler Viessmann Vitocrossal 200
                            note:
                                type: string
                                nullable: true
                                description: Note from the snapshot, e.g. where the figure came from.
                                example: boiler nameplates
                            rated_output_kw:
                                type: number
                                nullable: true
                                description: >-
                                    Rated output in kW. `0` means the snapshot states no output
                                example: 530
                            fuel_code:
                                type: integer
                                nullable: true
                                description: >-
                                    Fuel/energy-source code
                                example: 2
                            is_monitored:
                                type: boolean
                                nullable: true
                                description: >-
                                    Monitoring flag from the source system. Its exact meaning in the source
                                    is not documented in the snapshot.
                                example: false
                            appliance_type:
                                type: string
                                nullable: true
                                description: >-
                                    Appliance type from the source system. Every row of the current snapshot
                                    is `boiler`.
                                example: boiler
                            operating_since:
                                type: string
                                format: date
                                nullable: true
                                description: Date the appliance has been in operation since.
                                example: 2025-01-01
        EnergeticsEnoConsumptionEntry:
            type: object
            description: >-
                One period of one series. `value: null` means the source has no data for that period -
                missing periods are always null, never an error and never a zero.
            properties:
                period:
                    type: string
                    description: "`YYYY-MM` for monthly entries, `YYYY` for yearly ones."
                    example: 2026-07
                value:
                    type: number
                    nullable: true
                value_kwh:
                    type: number
                    nullable: true
                    description: >-
                        Comparable energy. For gas this is derived (normometers_nm3 * combustion_heat) and is
                        null whenever the conversion inputs are missing. Zero consumption is 0 regardless of the
                        conversion inputs, so metered gas (m3 only) reports 0 for a month without consumption
                        and null otherwise.
                coverage_count:
                    type: number
                    description: Days of the period carrying data.
                expected_count:
                    type: number
                    description: Days in the period, so a partial period is recognisable as one.
                is_estimated:
                    type: boolean
                    description: >-
                        True when the value was allocated pro rata from a billing period spanning more than
                        one month, rather than read for the period itself.
                points_total:
                    type: number
                    description: >-
                        Consumption points that contributed this period at all. `0` for a period no point
                        reported — never null, so a gap is a number a client can compare.
                points_with_data:
                    type: number
                    description: >-
                        Of those, how many carried a value. A shortfall against the series' `points` is how a
                        client learns a building summary is missing an OM for this period rather than being
                        genuinely lower — at point grain the counts are 1/1 or 0/0.
                invoice_ids:
                    type: array
                    description: >-
                        Billing documents this period was allocated from, sorted. Empty for metered readings,
                        for Porsenna and for periods with no value. An allocated month is a number the
                        platform computed rather than one anyone read, so naming the invoice is what makes it
                        auditable. At building level a period can be allocated from several invoices (one per
                        point), and a yearly entry usually is; at point grain a month is normally one.
                    items:
                        type: string
                    example: ["DI-2026-001"]
        EnergeticsEnoConsumptionSeries:
            type: object
            description: One source's view of one commodity, for one unit.
            properties:
                source:
                    type: string
                    enum:
                        - predi_input
                        - ppas_ave_api
                        - ppas_distribution_invoice
                        - ppas_commercial_invoice
                        - porsenna
                        - energy_broker
                unit:
                    type: string
                    description: >-
                        Electricity is kWh. Metered gas is m3 (from the PPAS operating difference) or Nm3
                        where only the converted difference exists - a point whose unit changes mid-window
                        appears as two series with complementary gaps, which is why unit is part of the key.
                        Porsenna carries its own lowercase unit. Energy Broker is kWh only, full calendar
                        months only, and left out where a live source read the whole month in kWh.
                    example: m3
                is_metered:
                    type: boolean
                    description: False for invoiced (billed and allocated) figures, true for meter readings.
                points:
                    type: array
                    description: Consumption points contributing to this series.
                    items:
                        type: string
                data_from:
                    type: string
                    nullable: true
                    description: Earliest period this series has any value for; null when it has none.
                monthly:
                    type: array
                    description: >-
                        `months` entries, chronological, null-filled where the source has nothing. Empty
                        when the source reports only yearly aggregates (Porsenna) - its data is in
                        `yearly`.
                    items:
                        $ref: "#/components/schemas/EnergeticsEnoConsumptionEntry"
                yearly:
                    type: array
                    description: >-
                        One entry per calendar year the window touches, plus any earlier year that has data -
                        Porsenna reaches back further than any monthly source and is not truncated to the
                        months window.
                    items:
                        $ref: "#/components/schemas/EnergeticsEnoConsumptionEntry"
        EnergeticsEnoConsumptionHistory:
            type: object
            description: >-
                Consumption per commodity per source. An empty array for a commodity means no source knows
                this building at all, which is distinct from a series of nulls - that means the source knows
                the point but not those periods.
            properties:
                period_from:
                    type: string
                    example: 2023-08
                period_to:
                    type: string
                    description: Always the last complete month.
                    example: 2026-07
                months:
                    type: number
                    example: 36
                measurement_data_from:
                    type: string
                    nullable: true
                    description: >-
                        Earliest month (`YYYY-MM`) with data from a metered source; null when no metered
                        source has monthly data. Explains the leading nulls - meter data starts in 2025
                        platform-wide. A yearly-only series does not count; its reach-back stays visible
                        in the series' own `data_from`.
                    example: 2025-01
                has_shared_points:
                    type: boolean
                    description: >-
                        True when a contributing consumption point is also mapped to another building. The
                        totals still count such a point in full - that is what its meters measured - so this
                        flag is how a client learns the figure is not exclusive to this building. It is true
                        for both sides of a shared point, primary or not; the points' `shared_with` says
                        which buildings those are.
                electricity:
                    type: array
                    items:
                        $ref: "#/components/schemas/EnergeticsEnoConsumptionSeries"
                gas:
                    type: array
                    items:
                        $ref: "#/components/schemas/EnergeticsEnoConsumptionSeries"
                heat:
                    type: array
                    items:
                        $ref: "#/components/schemas/EnergeticsEnoConsumptionSeries"
                water:
                    type: array
                    items:
                        $ref: "#/components/schemas/EnergeticsEnoConsumptionSeries"
                combined:
                    type: object
                    description: >-
                        One continuous kWh series per commodity across all sources. Heat and water are out of scope.
                    properties:
                        electricity:
                            $ref: "#/components/schemas/EnergeticsEnoCombinedConsumptionSeries"
                        gas:
                            $ref: "#/components/schemas/EnergeticsEnoCombinedConsumptionSeries"
        EnergeticsEnoCombinedConsumptionEntry:
            allOf:
                - $ref: "#/components/schemas/EnergeticsEnoConsumptionEntry"
                - type: object
                  properties:
                      sources:
                          type: array
                          description: >-
                              Sources the period's value was picked from (one per point), sorted and deduplicated.
                              `points_total` counts every point of the series.
                          items:
                              type: string
                          example: ["energy_broker", "predi_input"]
        EnergeticsEnoCombinedConsumptionSeries:
            type: object
            nullable: true
            description: >-
                Per point and month one kWh source - a whole-month live source, else Energy Broker, else a
                partial or pro-rata figure - summed across points. Null when no source has kWh.
            properties:
                unit:
                    type: string
                    example: kWh
                points:
                    type: array
                    items:
                        type: string
                data_from:
                    type: string
                    nullable: true
                    example: 2023-01
                monthly:
                    type: array
                    items:
                        $ref: "#/components/schemas/EnergeticsEnoCombinedConsumptionEntry"
                yearly:
                    type: array
                    description: Sum of the picked months inside the window.
                    items:
                        $ref: "#/components/schemas/EnergeticsEnoCombinedConsumptionEntry"
        EnergeticsEnoPorsennaBlock:
            type: object
            description: >-
                Porsenna (e-manazer) device detail with sub-meters. The device's consumption is in the
                point's `consumption_history` as the `porsenna` series.
            properties:
                device:
                    type: object
                    additionalProperties: true
                sub_devices:
                    type: array
                    items:
                        type: object
                        additionalProperties: true
        EnergeticsEnoElectricityMetadata:
            type: object
            # nullable lives here, next to `type`: OpenAPI 3.0 ignores a `nullable` that sits beside
            # an allOf reference, and portman turns that shape into an invalid JSON Schema.
            nullable: true
            description: >-
                Latest available month of PRE metadata for the EAN, i.e. the technical parameters of
                the delivery point as PRE last reported them. Null when PRE has never reported it.
                Every property is always present; `additionalProperties` stays open so an upstream PRE
                addition is not breaking.
            properties:
                year:
                    type: number
                    nullable: true
                    description: Year and month of the metadata row these values come from.
                    example: 2026
                month:
                    type: number
                    nullable: true
                    example: 6
                month_name:
                    type: string
                    nullable: true
                    example: červen
                days_in_stored_month:
                    type: number
                    nullable: true
                consumption_point:
                    type: string
                    nullable: true
                    example: OM Testovací 123
                address:
                    type: string
                    nullable: true
                location_type:
                    type: string
                    nullable: true
                    example: škola
                company_name:
                    type: string
                    nullable: true
                company_id:
                    type: string
                    nullable: true
                tarif_type:
                    type: string
                    nullable: true
                    example: C02d
                tarif_1t2t:
                    type: string
                    nullable: true
                    example: 1T
                phases:
                    type: string
                    nullable: true
                    example: "3"
                circuit_breaker:
                    type: string
                    nullable: true
                    example: 3x125A
                type_b_meter:
                    type: string
                    nullable: true
                meter_replaced:
                    type: string
                    nullable: true
                    description: >-
                        Meter number, or a pipe-separated `date|old|new` triple for the month the meter was
                        replaced. Free text as PRE supplies it, not a parsed structure.
                    example: 2026-06-19|53435572|54292510
            additionalProperties: true
        EnergeticsEnoGasInvoice:
            type: object
            description: >-
                PPAS invoice header. The distribution and commercial invoices carry the same properties;
                only their sources differ.
            properties:
                id:
                    type: string
                    example: DI-2026-001
                preceding_id:
                    type: string
                    nullable: true
                    description: The invoice this one supersedes, when the two are linked upstream.
                customer_id:
                    type: string
                    nullable: true
                customer_company_id:
                    type: string
                    nullable: true
                customer_name:
                    type: string
                    nullable: true
                customer_contract_account_id:
                    type: string
                    nullable: true
                customer_address_street:
                    type: string
                    nullable: true
                customer_address_house_number:
                    type: string
                    nullable: true
                customer_address_house_org_number:
                    type: string
                    nullable: true
                customer_address_city:
                    type: string
                    nullable: true
                customer_address_city_part:
                    type: string
                    nullable: true
                customer_address_post_code:
                    type: string
                    nullable: true
                customer_address_country:
                    type: string
                    nullable: true
                customer_address_ruian_id:
                    type: number
                    nullable: true
                facts_doc_date:
                    type: string
                    format: date
                    nullable: true
                facts_net_date:
                    type: string
                    format: date
                    nullable: true
                facts_billing_transaction:
                    type: string
                    nullable: true
                    example: FAKTURACE
                facts_to_pay_amount:
                    type: number
                    nullable: true
                facts_currency:
                    type: string
                    nullable: true
                    example: CZK
                facts_price_brutto:
                    type: number
                    nullable: true
                is_canceled:
                    type: boolean
                    nullable: true
                    description: Always false here — canceled invoices are not served.
                canceled_reason:
                    type: string
                    nullable: true
            additionalProperties: true
        EnergeticsEnoGasInstallation:
            type: object
            description: >-
                The installation (odběrné místo) the invoice bills, as recorded on it. The PPAS-internal
                place id is deliberately not exposed; it only scopes `devices` and `prices` server-side.
            properties:
                billing_class:
                    type: string
                    nullable: true
                    example: MO
                measurement_type:
                    type: string
                    nullable: true
                contract_contract_id:
                    type: string
                    nullable: true
                contract_move_in_date:
                    type: string
                    format: date
                    nullable: true
                contract_move_out_date:
                    type: string
                    format: date
                    nullable: true
                tdd_class:
                    type: string
                    nullable: true
                    description: Type-day-diagram class used for the allocation of unmetered consumption.
                    example: DOM4
                address_street:
                    type: string
                    nullable: true
                address_house_number:
                    type: string
                    nullable: true
                address_house_org_number:
                    type: string
                    nullable: true
                address_city:
                    type: string
                    nullable: true
                address_city_part:
                    type: string
                    nullable: true
                address_post_code:
                    type: string
                    nullable: true
                address_country:
                    type: string
                    nullable: true
                address_ruian_id:
                    type: number
                    nullable: true
            additionalProperties: true
        EnergeticsEnoGasInvoiceDevice:
            type: object
            description: >-
                One billed meter period of the invoice. `kind` is a SAP code and the same gas can appear
                under several of them in different dimensions, so these rows are the billing detail, not a
                series to sum — the summed and month-allocated figures are in `consumption_history`.
            properties:
                device_serial_number:
                    type: string
                    example: PLYN-001
                date_from:
                    type: string
                    format: date
                date_to:
                    type: string
                    format: date
                reading_type:
                    type: string
                    description: STANDARD or CORRECTION.
                    example: STANDARD
                type:
                    type: string
                    description: Meter type.
                    example: G4
                kind:
                    type: string
                    description: SAP code of the billed quantity (ZIZWC, ZIABN3, …).
                    example: ZIZWC
                reading_from:
                    type: number
                    nullable: true
                reading_to:
                    type: number
                    nullable: true
                consumption:
                    type: number
                    nullable: true
                    description: Denominated by `unit`, which is not always m³.
                unit:
                    type: string
                    nullable: true
                    example: M3
                meter_reading_type:
                    type: string
                    nullable: true
                    example: dálkový
                gas_consumption_kwh:
                    type: number
                    nullable: true
                    description: 0 means "not supplied" rather than zero.
                volume_coefficient:
                    type: number
                    nullable: true
                combustion_heat:
                    type: number
                    nullable: true
                    description: kWh/m³; 0 means "not supplied" rather than zero.
                normometers_nm3:
                    type: number
                    nullable: true
            additionalProperties: true
        EnergeticsEnoGasInvoicePrice:
            type: object
            description: One priced line of the invoice for this installation.
            properties:
                date_from:
                    type: string
                    format: date
                date_to:
                    type: string
                    format: date
                kind:
                    type: string
                    example: distribuce
                description:
                    type: string
                    example: Distribuce plynu
                price_group:
                    type: string
                quantity:
                    type: number
                unit:
                    type: string
                    example: kWh
                unit_price:
                    type: number
                time_slot:
                    type: number
                    nullable: true
                price_netto:
                    type: number
                price_type:
                    type: string
                    example: variabilní
                currency:
                    type: string
                    example: CZK
                tax_rate:
                    type: number
            additionalProperties: true
        EnergeticsEnoConsumptionPoint:
            type: object
            properties:
                place_id:
                    type: string
                    example: 27ZG100Z0000192O
                id_type:
                    type: string
                    enum: [ean, eic, om]
                commodity:
                    type: string
                    enum: [electricity, gas, heat, water]
                is_first_gid:
                    type: boolean
                    description: >-
                        Whether this building is the primary holder of the point in the mapping. It says
                        nothing about the other side — see `shared_with`, which lists the buildings the point
                        is shared with whether this one is primary or not.
                shared_with:
                    type: array
                    description: >-
                        Other buildings the same consumption point is mapped to. Empty when the point belongs
                        to this building alone, which is the common case. The totals still count the point in
                        full — that is what its meters measured — so this is how a client learns the figure is
                        not exclusive to this building, and which building it is shared with.
                    items:
                        type: object
                        properties:
                            gid:
                                type: string
                                example: GID200
                            name:
                                type: string
                                nullable: true
                                description: Resolved as the detail's top-level `name` is; null when neither source names it.
                                example: MŠ Vedlejší
                        required:
                            - gid
                            - name
                is_active:
                    type: boolean
                    description: Derived from valid_to (null or in the future means the mapping is active)
                link_source:
                    type: string
                    example: mock
                valid_from:
                    type: string
                    format: date
                    nullable: true
                valid_to:
                    type: string
                    format: date
                    nullable: true
                address:
                    type: string
                    nullable: true
                    description: Consumption point address from the best available source
                electricity:
                    type: object
                    description: Electricity-specific data (present only for commodity = electricity, omitted otherwise)
                    properties:
                        metadata:
                            allOf:
                                - $ref: "#/components/schemas/EnergeticsEnoElectricityMetadata"
                            description: >-
                                Latest available month of PRE metadata for the EAN; null when PRE has never
                                reported it.
                        porsenna:
                            $ref: "#/components/schemas/EnergeticsEnoPorsennaBlock"
                        consumption_history:
                            type: array
                            description: Per-source series for this point; empty when no source knows it.
                            items:
                                $ref: "#/components/schemas/EnergeticsEnoConsumptionSeries"
                        combined_history:
                            $ref: "#/components/schemas/EnergeticsEnoCombinedConsumptionSeries"
                gas:
                    type: object
                    description: Gas-specific data (present only for commodity = gas, omitted otherwise)
                    properties:
                        porsenna:
                            $ref: "#/components/schemas/EnergeticsEnoPorsennaBlock"
                        consumption_history:
                            type: array
                            description: Per-source series for this point; empty when no source knows it.
                            items:
                                $ref: "#/components/schemas/EnergeticsEnoConsumptionSeries"
                        combined_history:
                            $ref: "#/components/schemas/EnergeticsEnoCombinedConsumptionSeries"
                        distribution:
                            type: object
                            nullable: true
                            description: >-
                                Latest non-canceled PPAS distribution invoice for this EIC with its
                                installation, billed meter periods and priced lines. Devices and prices are
                                scoped to this point's installation, so another installation on the same
                                invoice does not leak in. Null when no distribution invoice knows the point.
                            properties:
                                invoice:
                                    $ref: "#/components/schemas/EnergeticsEnoGasInvoice"
                                installation:
                                    $ref: "#/components/schemas/EnergeticsEnoGasInstallation"
                                devices:
                                    type: array
                                    items:
                                        $ref: "#/components/schemas/EnergeticsEnoGasInvoiceDevice"
                                prices:
                                    type: array
                                    items:
                                        $ref: "#/components/schemas/EnergeticsEnoGasInvoicePrice"
                        commercial:
                            type: object
                            nullable: true
                            description: >-
                                Latest non-canceled PPAS commercial invoice for this EIC, in the same shape as
                                `distribution`. Null when no commercial invoice knows the point.
                            properties:
                                invoice:
                                    $ref: "#/components/schemas/EnergeticsEnoGasInvoice"
                                installation:
                                    $ref: "#/components/schemas/EnergeticsEnoGasInstallation"
                                devices:
                                    type: array
                                    items:
                                        $ref: "#/components/schemas/EnergeticsEnoGasInvoiceDevice"
                                prices:
                                    type: array
                                    items:
                                        $ref: "#/components/schemas/EnergeticsEnoGasInvoicePrice"
                heat:
                    type: object
                    description: Heat-specific data (present only for commodity = heat, omitted otherwise; Porsenna-sourced)
                    properties:
                        porsenna:
                            $ref: "#/components/schemas/EnergeticsEnoPorsennaBlock"
                        consumption_history:
                            type: array
                            description: Per-source series for this point; empty when no source knows it.
                            items:
                                $ref: "#/components/schemas/EnergeticsEnoConsumptionSeries"
                water:
                    type: object
                    description: Water-specific data (present only for commodity = water, omitted otherwise; Porsenna-sourced)
                    properties:
                        porsenna:
                            $ref: "#/components/schemas/EnergeticsEnoPorsennaBlock"
                        consumption_history:
                            type: array
                            description: Per-source series for this point; empty when no source knows it.
                            items:
                                $ref: "#/components/schemas/EnergeticsEnoConsumptionSeries"
        EnergeticsBuildingShort:
            type: object
            properties:
                id:
                    type: number
                name:
                    type: string
                building_address_code:
                    type: string
                link:
                    type: string
        EnergeticsBuildingFull:
            type: object
            properties:
                id:
                    type: number
                name:
                    type: string
                    nullable: true
                main_use:
                    type: string
                    nullable: true
                method_of_protection:
                    type: string
                    nullable: true
                address:
                    type: object
                    properties:
                        city:
                            type: string
                            nullable: true
                        country:
                            type: string
                            nullable: true
                        house_number:
                            type: string
                            nullable: true
                        mail:
                            type: string
                            nullable: true
                        phone:
                            type: string
                            nullable: true
                        street:
                            type: string
                            nullable: true
                        web_address:
                            type: string
                            nullable: true
                    nullable: true
                allotment_number:
                    type: string
                    nullable: true
                beds_count:
                    type: number
                    nullable: true
                building_address_code:
                    type: string
                    nullable: true
                building_envelope:
                    type: object
                    properties:
                        filling_of_hole:
                            type: object
                            properties:
                                area:
                                    type: number
                                    nullable: true
                                construction:
                                    type: string
                                    nullable: true
                                technical_condition:
                                    type: string
                                    nullable: true
                                year_of_adjustment:
                                    type: string
                                    nullable: true
                            nullable: true
                        floor_of_the_lowest_heated_floor:
                            type: object
                            properties:
                                area:
                                    type: number
                                    nullable: true
                                construction:
                                    type: string
                                    nullable: true
                                year_of_adjustment:
                                    type: string
                                    nullable: true
                                technical_condition:
                                    type: string
                                    nullable: true
                                thermal_insulation:
                                    type: string
                                    nullable: true
                            nullable: true
                        roof:
                            type: object
                            properties:
                                area:
                                    type: number
                                    nullable: true
                                construction:
                                    type: string
                                    nullable: true
                                technical_condition:
                                    type: string
                                    nullable: true
                                thermal_insulation:
                                    type: string
                                    nullable: true
                                year_of_adjustment:
                                    type: string
                                    nullable: true
                            nullable: true
                        side_wall:
                            type: object
                            properties:
                                area:
                                    type: number
                                    nullable: true
                                heat_insulation:
                                    type: string
                                    nullable: true
                                prevailing_construction:
                                    type: string
                                    nullable: true
                                technical_condition:
                                    type: string
                                    nullable: true
                                year_of_adjustment:
                                    type: string
                                    nullable: true
                            nullable: true
                    nullable: true
                label:
                    type: string
                    nullable: true
                built_up_area:
                    type: number
                    nullable: true
                classrooms_count:
                    type: number
                    nullable: true
                csu_code:
                    type: string
                    nullable: true
                current_note:
                    type: string
                    nullable: true
                description:
                    type: string
                    nullable: true
                employees_count:
                    type: number
                    nullable: true
                energetic_management:
                    type: string
                    nullable: true
                energy_audits:
                    type: object
                    properties:
                        created_at:
                            type: string
                            nullable: true
                        ea_registration_number:
                            type: string
                            nullable: true
                        energy_audit:
                            type: string
                            nullable: true
                    nullable: true
                eno_id:
                    type: string
                    nullable: true
                fuel_and_energy:
                    type: object
                    properties:
                        coal:
                            type: boolean
                            nullable: true
                        czt:
                            type: boolean
                            nullable: true
                        electricity:
                            type: boolean
                            nullable: true
                        gas:
                            type: boolean
                            nullable: true
                        other:
                            type: boolean
                            nullable: true
                        oze:
                            type: boolean
                            nullable: true
                    nullable: true
                heated_bulding_volume:
                    type: number
                    nullable: true
                ku_code:
                    type: string
                    nullable: true
                location:
                    type: object
                    nullable: true
                    properties:
                        type:
                            type: string
                            example: "Point"
                        coordinates:
                            $ref: "#/components/schemas/Point"
                    required:
                        - coordinates
                        - type
                link:
                    type: string
                oze_energy_production:
                    type: object
                    properties:
                        heat_pump:
                            type: string
                            nullable: true
                        integrated_turbines_wind_energy:
                            type: string
                            nullable: true
                        solar_energy_photothermal:
                            type: string
                            nullable: true
                        solar_energy_photovoltaic:
                            type: string
                            nullable: true
                    nullable: true
                penb:
                    type: object
                    properties:
                        building_envelope:
                            type: number
                            nullable: true
                        building_envelope_category:
                            type: string
                            nullable: true
                        cooling:
                            type: number
                            nullable: true
                        cooling_category:
                            type: string
                            nullable: true
                        heating:
                            type: number
                            nullable: true
                        heating_category:
                            type: string
                            nullable: true
                        humidity_adjustment:
                            type: number
                            nullable: true
                        humidity_adjustment_category:
                            type: string
                            nullable: true
                        issue_date:
                            type: string
                            nullable: true
                        lighting:
                            type: number
                            nullable: true
                        lighting_category:
                            type: string
                            nullable: true
                        penb_number:
                            type: number
                            nullable: true
                        primary_non_renewable_energy:
                            type: number
                            nullable: true
                        primary_non_renewable_energy_category:
                            type: string
                            nullable: true
                        total_building_envelope_area:
                            type: number
                            nullable: true
                        total_energy_reference_area:
                            type: number
                            nullable: true
                        total_provided_energy:
                            type: number
                            nullable: true
                        total_provided_energy_category:
                            type: string
                            nullable: true
                        ventilation:
                            type: number
                            nullable: true
                        ventilation_category:
                            type: string
                            nullable: true
                        volume_factor_of_av_shape:
                            type: string
                            nullable: true
                        warm_water:
                            type: number
                            nullable: true
                        warm_water_category:
                            type: string
                            nullable: true
                    nullable: true
                registration_unit:
                    type: string
                    nullable: true
                secondary_use:
                    type: string
                    nullable: true
                students_count:
                    type: number
                    nullable: true
                technical_equipment:
                    type: object
                    properties:
                        cooling:
                            type: object
                            properties:
                                cooling_area_percentage:
                                    type: number
                                    nullable: true
                                cooling_system:
                                    type: string
                                    nullable: true
                                technical_condition:
                                    type: string
                                    nullable: true
                                year:
                                    type: string
                                    nullable: true
                            nullable: true
                        heating:
                            type: object
                            properties:
                                heat_percentage:
                                    type: number
                                    nullable: true
                                heating_system:
                                    type: string
                                    nullable: true
                                main_source_of_heat:
                                    type: string
                                    nullable: true
                                secondary_source_of_heat:
                                    type: string
                                    nullable: true
                                technical_condition:
                                    type: string
                                    nullable: true
                                year:
                                    type: string
                                    nullable: true
                            nullable: true
                        hot_water:
                            type: object
                            properties:
                                hot_water_source:
                                    type: string
                                    nullable: true
                                predominant_way_of_heating_tv:
                                    type: string
                                    nullable: true
                                technical_condition:
                                    type: string
                                    nullable: true
                                year:
                                    type: string
                                    nullable: true
                            nullable: true
                        humidity_adjustment:
                            type: object
                            properties:
                                humidity_adjustment:
                                    type: string
                                    nullable: true
                                technical_condition:
                                    type: string
                                    nullable: true
                                year:
                                    type: string
                                    nullable: true
                            nullable: true
                        lighting:
                            type: object
                            properties:
                                lighting:
                                    type: string
                                    nullable: true
                                measurement_method:
                                    type: string
                                    nullable: true
                                other_technological_elements:
                                    type: string
                                    nullable: true
                                technical_condition:
                                    type: string
                                    nullable: true
                                year:
                                    type: string
                                    nullable: true
                            nullable: true
                        ventilation:
                            type: object
                            properties:
                                technical_condition:
                                    type: string
                                    nullable: true
                                ventilation:
                                    type: string
                                    nullable: true
                                year:
                                    type: string
                                    nullable: true
                            nullable: true
                    nullable: true
                waste_and_emissions:
                    type: object
                    properties:
                        operating_co2_emissions:
                            type: string
                            nullable: true
                        solid_waste_production:
                            type: string
                            nullable: true
                        sox_emissions:
                            type: string
                            nullable: true
                        tied_co2_emissions:
                            type: string
                            nullable: true
                    nullable: true
                weekend_opening_hours:
                    type: string
                    nullable: true
                opening_hours:
                    type: string
                    nullable: true
                year_of_construction:
                    type: number
                    nullable: true
        EnergeticsAddress:
            type: object
            properties:
                street:
                    type: string
                    nullable: true
                house_number:
                    type: string
                    nullable: true
                city:
                    type: string
                    nullable: true
                country:
                    type: string
                    nullable: true
                mail:
                    type: string
                    nullable: true
                phone:
                    type: string
                    nullable: true
                web_address:
                    type: string
                    nullable: true
            additionalProperties: false
        EnergeticsDevice:
            type: object
            properties:
                id:
                    type: integer
                    format: int32
                addr:
                    type: string
                    nullable: true
                description:
                    type: string
                    nullable: true
                meter_number:
                    type: string
                    nullable: true
                meter_index:
                    type: integer
                    format: int32
                    nullable: true
                location_number:
                    type: string
                    nullable: true
                location_description:
                    type: string
                    nullable: true
                include_in_evaluation:
                    type: string
                    nullable: true
                meter_type:
                    type: string
                    nullable: true
                category:
                    type: string
                    nullable: true
                unit:
                    type: string
                    nullable: true
                replaced_meter_id:
                    type: string
                    nullable: true
                deleted:
                    type: string
                    nullable: true
                building_id:
                    type: integer
                    format: int32
                    nullable: true
            additionalProperties: false
        EnergeticsOrganizationFull:
            type: object
            properties:
                id:
                    type: integer
                    format: int32
                name:
                    type: string
                    nullable: true
                label:
                    type: string
                    nullable: true
                category:
                    type: string
                    nullable: true
                created_by_id:
                    type: string
                    nullable: true
                grafana_url:
                    type: string
                    nullable: true
                address:
                    $ref: "#/components/schemas/EnergeticsAddress"
                responsible_user:
                    type: array
                    items:
                        $ref: "#/components/schemas/EnergeticsUser"
                    nullable: true
                buildings:
                    type: array
                    items:
                        $ref: "#/components/schemas/EnergeticsBuildingShort"
                    nullable: true
                link:
                    type: string
                    nullable: true
            additionalProperties: false
        EnergeticsOrganizationShort:
            type: object
            properties:
                id:
                    type: integer
                    format: int32
                name:
                    type: string
                    nullable: true
                link:
                    type: string
                    nullable: true
            additionalProperties: false
        EnergeticsUser:
            type: object
            properties:
                name:
                    type: string
                    nullable: true
                last_name:
                    type: string
                    nullable: true
                position:
                    type: string
                    nullable: true
                phone:
                    type: string
                    nullable: true
                mail:
                    type: string
                    nullable: true
                company:
                    type: string
                    nullable: true
            additionalProperties: false
        Point:
            title: Point
            type: array
            minItems: 2
            maxItems: 2
            items:
                type: number
                format: float
            example:
                - 14.4633
                - 50.07827
        EnergeticsMeasurement:
            type: object
            properties:
                time:
                    type: string
                    format: date-time
                value:
                    type: string
                addr:
                    type: string
                meter:
                    type: string
                    nullable: true
                type:
                    $ref: "#/components/schemas/EnergeticsTypes"
                var:
                    $ref: "#/components/schemas/EnergeticsVariables"
            additionalProperties: false
        EnergeticsVariables:
            type: string
            example: core2
            enum:
                - core
                - core2
                - EFwActi
                - EFwActiVT
                - ERvReact
                - EFwReact
                - raw
                - T
                - CO2
                - RH
                - EFwActiNT
                - VOC
            description: >-
                core - Kumulovaný objem [m3]<br />
                core2 - Kumulovaný přepočítaný objem [Nm3]<br />
                EFwActi - Odběr činné energie [kWh]<br />
                EFwActiVT - Odběr činné energie, vysoký tarif [kVArh]<br />
                ERvReact - Dodávka jalové energie [kVArh]<br />
                EFwReact - Odběr jalové energie [kVArh]<br />
                raw - Číselník impulzů [imp]<br />
                RSSI - Síla signálu [dBm]<br />
                T - Teplota [°C]<br />
                CO2 - Koncentrace CO2 [ppm]<br />
                RH - Relativní vlhkost [%]<br />
                EFwActiNT - Odběr činné energie, nízký tarif [kVArh]<br />
                VOC - Míra koncentrace těkavých látek [%]<br />
                VT - Vysoký tarif [kWh]<br />
                NT - Nízký tarif [kWh]<br />
        EnergeticsTypes:
            type: string
            example: provider_value
            enum:
                - monthly_reading
                - provider_value
                - dotcontrols_value
            description: >-
                monthly_reading - hodnoty sčítané po měsících z 15 minutových spotřeb poskytovaných firmou PRE<br />
                provider_value - data získaná od poskytovatelů energií<br />
                dotcontrols_value - data získaná ze systémů VisApp firmy DotControls<br />
