openapi: 3.0.2
servers:
  - url: https://api.corrently.io/v2.0
info:
  contact:
    email: dev@stromdao.com
    url: https://stromdao.de/kontakt
  description: |
    *Corrently - from italian corrente, which is energy*
    # Introduction
    The Corrently ecosystem gets maintained by [STROMDAO GmbH](https://www.stromdao.de/) to support green energy services for prosumers, grid operators, regulators, integrators or any other party with an emerging need of consensus driven management.
    As the [energy product Corrently](https://www.corrently.de/) got first launched in Germany parts of this documentation provide simple translations for better understanding.
    [Released SKDs for Download](https://github.com/energychain/corrently-api/releases)
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: https://corrently.io/terms/
  title: Corrently.io
  version: 2.0.0
  x-apisguru-categories:
    - open_data
  x-logo:
    url: https://corrently.de/assets/img/Corrently_1000x252.png
  x-origin:
    - format: openapi
      url: https://corrently.io/dist.yaml
      version: "3.0"
  x-providerName: corrently.io
tags:
  - description: |
      Managing accounts and balances for market partners (eq. households, grid operators, traders,..) Stromkonto is based on distributed ledger technology (AKA Blockchain). Instead of using the REST Api to access any energy ledger, you might act as a blockchain node and use the published ABI definitions to get the same results and/or run transactions directly.
    name: Stromkonto (Ledger)
  - description: |
      Green Power Index (GrünstromIndex), an AI based service to forecast energy sources in the grid (regionale Stromherkunft).
      Further Details and sample implementation is available at [gruenstromindex.de](https://www.gruenstromindex.de/).
    name: GreenPowerIndex (GrünstromIndex)
  - description: |
      Provides latest dispatch information of green energy at a specific location in Germany (Herkunft/GrünstromMix). It allows to do schedule management (Fahrplanmanagement) of green energy generation facilities, demand and resilience management for grid operators. The public version (OpenAPI) is always post fact. If you are interessted in pre fact (forecast) data, you might get in contact with STROMDAO GmbH.
    name: Dispatch (Green Energy Distribution API)
  - description: |
      Allows to virtualy act as an Meter Point Operator by decorating meter readings with GreenPowerIndex (GrünstromIndex) handles. In principal this service decorates meter [OBIS Code](https://de.wikipedia.org/wiki/OBIS-Kennzahlen) 1.8.0 values to 1.8.1 and 1.8.2 according to the local and actual GSI value. A signature gets applied to the reading and all three OBIS values get hashed into the Energychain for consensus (e.q. creating balancing groups). CO2 footprint of a meter gets provided (as of first reading pushed).This works in conjunction with German Smart Meter Gateways (as of March 2020).
    name: Metering (Decorator)
  - description: Tariff information for the German market region. Provides base price and energy price information for private households (Standardlastprofil H0, SLP H0 Tarifinformation).
    name: Tariff (Price API)
  - description: Access to status information of an existing metering change and allocation process.
    name: WiM (Wechselprozesse im Messwesen Strom - Status API)
  - description: Helper services and endpoints for smarthome and home automation systems.
    name: SmartHome
  - description: Alternative access to OpenMeter Data.
    name: OpenMETER
  - description: Alternative access to EASEE.cloud Data.
    name: easee
  - description: Alternative access to Corrently OCPP Data (hosted cloud backend).
    name: OCPP
  - description: |
      Self-Service to create a full receipt (Quittung) for energy delivery in case of submetering. Please refer to [Strom-Quittung](http://strom-quittung.de) for a sample usage.
    name: Strom-Quittung
  - description: Technische Sicherheitseinrichtung - use in context of strom-quittungen to get digitaly signed receipts.
    name: TSE
paths:
  /alternative/easee/lastSessions:
    get:
      description: |
        Refer to easee.cloud API for details.
      operationId: easeeSessions
      parameters:
        - description: Username as used on easy.cloud
          in: query
          name: username
          schema:
            type: string
        - description: Password as used on easy.cloud
          in: query
          name: password
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/easee-charger"
                type: array
          description: Success
      summary: Returns lastSession info for all easee wallboxes (chargers) given user has access to.
      tags:
        - easee
  /alternative/ocpp/lastSessions:
    get:
      description: |
        Returns lastSession info of OCCP Cloud service for clearing in corrently ecosystem. Might be tested via [OCPP cloud simulator](https://ocpp.corrently.cloud).
        Last session Info of managed EV charging stations connected to the correnty ecosystem.
      operationId: ocppSessions
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/easee-charger"
                type: array
          description: Success
      summary: Last Session Info
      tags:
        - OCPP
  /alternative/openmeter/activities:
    get:
      description: |
        Provides a list of available meterrs in the OpenMETER project ( https://www.openmeter.de/ ) which grants access for analytics as data discovery.
      operationId: omActivities
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/ommeters"
                type: array
          description: Success
      summary: Public shared smart meters installed in Germany and available for subservices and exploration.
      tags:
        - OpenMETER
  /alternative/openmeter/meters:
    get:
      description: |
        Provides a list of available meterrs in the OpenMETER project ( https://www.openmeter.de/ ) which grants access for analytics as data discovery.
      operationId: omMeters
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/ommeters"
                type: array
          description: Success
      summary: Public shared smart meters installed in Germany and available for subservices and exploration.
      tags:
        - OpenMETER
  /alternative/openmeter/readings:
    get:
      description: |
        Provides a list of available meterrs in the OpenMETER project ( https://www.openmeter.de/ ) which grants access for analytics as data discovery.
      operationId: omReadings
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/ommeters"
                type: array
          description: Success
      summary: Public shared smart meters installed in Germany and available for subservices and exploration.
      tags:
        - OpenMETER
  /gsi/bestHour:
    get:
      description: |
        Simple Wrapper around the GreenPowerIndex for easy integration into almost any SmartHome system that allows access to a JSON/REST Service This endpoint is designed to indicate if a device should be turned on or off. (Switch state).
      operationId: gsiBesthour
      parameters:
        - description: Zipcode (Postleitzahl) of a city in Germany.
          in: query
          name: zip
          schema:
            type: string
        - description: Any valid Stromkonto account (address).
          in: query
          name: key
          schema:
            type: string
        - description: Number of hours to check (default 24 hours from now).
          in: query
          name: timeframe
          schema:
            type: integer
        - description: How many hours in row do you need the device turned on?
          in: query
          name: hours
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                description: true if device should be turned on now. false if not.
                type: boolean
          description: Success
      summary: Get best hour (with most regional green energy) in a given timeframe.
      tags:
        - GreenPowerIndex (GrünstromIndex)
        - SmartHome
  /gsi/dispatch:
    get:
      description: |
        Dispatch of green energy has two aspects to consider:
          - Availability of gerneration facility (depends on weather and installed capacity)
          - Demand of energy
        Using the green power index (GrünstromIndex) we have received a tool to automate distribution of energy in order to prevent redispatch situations. Doing this alows to opimize resource usage (tactical) and leverage data for investment planning (strategic).
      operationId: gsiDispatch
      parameters:
        - description: Zipcode (Postleitzahl) of a city in Germany.
          in: query
          name: zip
          schema:
            type: string
        - description: Any valid Stromkonto account (address).
          in: query
          name: key
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  avg_distance_km:
                    description: Averaged geospatial distance in kilometers between energy generation and usage at requested location.
                    type: number
                  dispatch_from:
                    description: List of current sources of green energy (into requested location)
                    items:
                      $ref: "#/components/schemas/DispatchLocation"
                    type: array
                  dispatch_target:
                    description: List of current targets of green energy (out of requested location)
                    items:
                      $ref: "#/components/schemas/DispatchLocation"
                    type: array
                  postmix:
                    description: Green Energy Mix after dispatch of given city
                    type: object
                  premix:
                    description: Green Energy Mix prior to dispatch of given city
                    type: object
                  timeframe:
                    description: Evaluated timeframe for this request
                    properties:
                      end:
                        description: Ending time of window evaluated for this request/dispatches.
                        type: integer
                      start:
                        description: Starting time of window evaluated in order to get dispatches
                        type: integer
                    type: object
                type: object
          description: Success
      summary: Dispatch (Green Energy Distribution Schedule)
      tags:
        - GreenPowerIndex (GrünstromIndex)
        - Dispatch (Green Energy Distribution API)
  /gsi/marketdata:
    get:
      description: |
        Compatible to awattar (https://api.awattar.de/v1/marketdata) API interface but data comes from GreenPowerIndex instead of EPEXSpot.
      operationId: gsiMarketdata
      parameters:
        - description: Zipcode (Postleitzahl) of a city in Germany.
          in: query
          name: zip
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    description: Energyprice for the upcomming hours
                    items:
                      $ref: "#/components/schemas/MarketData"
                    type: array
                type: object
          description: Success
      summary: Marketdata
      tags:
        - GreenPowerIndex (GrünstromIndex)
  /gsi/prediction:
    get:
      description: |
        Retrieval the GreenPowerIndex (GrünstromIndex) for a given city (by zipcode) in Germany.
      operationId: gsiPrediction
      parameters:
        - description: Zipcode (Postleitzahl) of a city in Germany.
          in: query
          name: zip
          schema:
            type: string
        - description: Any valid Stromkonto account (address).
          in: query
          name: key
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  forecast:
                    description: Prediction for the upcomming hours
                    items:
                      $ref: "#/components/schemas/ForecastItem"
                    type: array
                  location:
                    description: Standarized location info sourced for prediction
                    properties:
                      city:
                        description: Pretty Print city name
                        type: string
                      zip:
                        description: Zipcode (Postleitzahl)
                        type: string
                    type: object
                  matrix:
                    description: Device switching recommendation.
                    properties:
                      h0:
                        description: Indicates number of hours a device should run
                        properties:
                          avg_1:
                            description: device should run in 1 hour
                            type: string
                          avg_2:
                            description: device should run in 2 hours
                            type: string
                          avg_3:
                            description: device should run in 3 hour
                            type: string
                        type: object
                    type: object
                type: object
          description: Success
      summary: Prediction
      tags:
        - GreenPowerIndex (GrünstromIndex)
  /metering/reading:
    get:
      description: |
        Retrieves a metered reading using account (Stromkonto).
      operationId: meteringGet
      parameters:
        - description: Account/Address (Stromkonto) to retrieve reading for.
          in: query
          name: account
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  1.8.0:
                    description: Reading as provided as input in Wh
                    type: integer
                  1.8.1:
                    description: Green energy calculated using Green Power Index (GrünstromIndex) in Wh
                    type: integer
                  1.8.2:
                    description: Grey energy calculated using Green Power Index (GrünstromIndex) in Wh
                    type: integer
                  _processingTime:
                    description: Time this reading got imported into consensus (e.q. signed timestamp).
                    type: integer
                  account:
                    description: Stromkonto/Metering address allocated (this is not the MELOID!)
                    type: string
                  co2_g_oekostrom:
                    description: CO2 Emission of metered energy in a green energy mix (e.q. Ökostromtarif)
                    type: integer
                  co2_g_standard:
                    description: CO2 Emission of metered energy in a standard mix
                    type: integer
                  credits:
                    description: Update credits this meter has. Gets refilled automtically to prevent too frequent updates
                  timeStamp:
                    description: API Consensus time this reading was fully received
                    type: integer
                  ttl:
                    description: Time to Live for this reader. If no update is provided it gets decommissioned.
                    type: integer
                type: object
          description: Success
      summary: Meter Reading
      tags:
        - Metering (Decorator)
    post:
      description: |
        Post meter reading and get it decorated. Best practice is to first create a new Stromkonto with the register method and choose a nice secret to protect updates. Now regularly send updates to get readings (consumption) split into green power (1.8.1) and grey power (1.8.2).
      operationId: meteringPost
      requestBody:
        content:
          application/json:
            schema:
              properties:
                1.8.0:
                  description: Meter Reading (prefered in Wh)
                  type: integer
                account:
                  description: Stromkonto account (address) associated with this metering.
                  type: string
                energy:
                  description: Alias for 1.8.0
                  type: integer
                secret:
                  description: Some private password you might choose on first update. However you need to use the same secret on every further posts.
                  type: string
                value:
                  description: Alias for 1.8.0
                  type: integer
                zip:
                  description: Zipcode (Postleitzahl) of metered location
                  type: string
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  1.8.0:
                    description: Reading as provided as input in Wh
                    type: integer
                  1.8.1:
                    description: Green energy calculated using Green Power Index (GrünstromIndex) in Wh
                    type: integer
                  1.8.2:
                    description: Grey energy calculated using Green Power Index (GrünstromIndex) in Wh
                    type: integer
                  _processingTime:
                    description: Time this reading got imported into consensus (e.q. signed timestamp).
                    type: integer
                  account:
                    description: Stromkonto/Metering address allocated (this is not the MELOID!)
                    type: string
                  co2_g_oekostrom:
                    description: CO2 Emission of metered energy in a green energy mix (e.q. Ökostromtarif)
                    type: integer
                  co2_g_standard:
                    description: CO2 Emission of metered energy in a standard mix
                    type: integer
                  timeStamp:
                    description: API Consensus time this reading was fully received
                    type: integer
                type: object
          description: Success
      summary: Meter Reading
      tags:
        - Metering (Decorator)
  /quittung/commit:
    post:
      description: |
        Uses collected fields or provided fields to create a final receipt (Strom-Quittung).
      operationId: quittungComit
      requestBody:
        content:
          application/json:
            schema:
              properties:
                account:
                  type: string
              type: object
        required: false
      responses:
        "200":
          content:
            application/json:
              schema:
                description: Unique ID of a receipt. It might be used via https://api.corrently.io/v2.0/quittung/pdf?token= to retrieve a PDF version of receipt or via   https://corrently.de/service/quittung.html?token= to get online version.
                type: string
          description: Success
      summary: Finishs a collection of data and finalizes receipt. Use this method after collecting all data via quittung/prepare
      tags:
        - Strom-Quittung
  /quittung/create:
    post:
      description: |
        Creates a full featured receipt (Quittung) for an energy delivery as it appears on a charging session or similar events. Allows to embed receipt generation directly into external services.
      operationId: quittungCreate
      requestBody:
        content:
          application/json:
            schema:
              properties:
                email:
                  type: string
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                description: Token for this receipt. It might be extended as 'token' parameter to retrieve actual receipt [sample](https://corrently.de/service/quittung.html?token=0x3C4750bf93aa96e55A0d60be334B6b6E14DCe5bc)
                type: string
          description: Success
      summary: Create a receipt for an energy delivery (only valid in Germany).
      tags:
        - Strom-Quittung
  /quittung/prepare:
    post:
      description: |
        During the first call an account parameter will be returned within the result object. Any other parameter will be set inside the preperation. If account is put into body/request in following requests, the existing collection will be extended/updated with the provided body parameters/values.
      operationId: quittungPrepare
      requestBody:
        content:
          application/json:
            schema:
              properties:
                account:
                  type: string
              type: object
        required: false
      responses:
        "200":
          content:
            application/json:
              schema:
                description: All collected values for an account (eq. session).
                type: string
          description: Success
      summary: Allows to collect data with several requests (or a single) for a receipt.
      tags:
        - Strom-Quittung
  /quittung/tse:
    post:
      description: |
        Allows to retrieve all relevant data assiciated to a TSE service call. E.q. Input parameters, public key and signature.
      operationId: quittungTSE
      parameters:
        - description: Quittung Identifier  (serialnumber generated during receipt generation process)
          in: query
          name: account
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    description: JSON object that got signed by TSE.
                    x-schema:
                      properties:
                        algorithmus:
                          description: Standard used for signing and hashing of input values
                          example: RSA-SHA512
                          type: string
                        clientid:
                          description: Digital Identity of transaction system.
                          example: 1D2323CDEF
                          type: string
                        end:
                          description: Finishing timestamp of signature process by TSE service in UTC ISO Format.
                          example: 2021-07-12T18:43:05.582Z
                          type: string
                        serialnumber:
                          description: Quittung Identifier  (serialnumber generated during receipt generation process)
                          example: "0x29fB5aeE3Ca29f239E7f771280cf4e2fD3999DF3"
                          type: string
                        signaturecnt:
                          description: Sequential number of signed transactions by TSE service.
                          example: 2
                          type: integer
                        start:
                          description: Starting timestamp of signature process by TSE service in UTC ISO Format.
                          example: 2021-07-12T18:43:05.582Z
                          type: string
                        timeformat:
                          description: Format of Timestamp to aply to  KassenSichV regulation
                          example: utcTime
                          type: string
                        txcnt:
                          description: Sequential number of this transaction (requester)
                          example: 1
                          type: integer
                      type: object
                  publickey:
                    description: Public Key of TSE
                    type: string
                  raw:
                    description: Datastring of JSON Object as it got used to create signature.
                    type: string
                  signature:
                    description: Resulting signature by signing raw datastring using private key of TSE.
                    type: string
                type: object
          description: Success
      summary: Retrieve TSE (Technische Sicherheitseinrichtung) Data for a given receipt (Strom-Quittung).
      tags:
        - Strom-Quittung
        - TSE
  /quittung/tsedata:
    post:
      description: |
        Allows to retrieve input string for a signing process.
      operationId: quittungTSEData
      parameters:
        - description: Quittung Identifier  (serialnumber generated during receipt generation process)
          in: query
          name: account
          schema:
            type: string
      responses:
        "200":
          description: Success
      summary: Retrieve TSE (Technische Sicherheitseinrichtung) raw data  only for a given receipt (Strom-Quittung).
      tags:
        - Strom-Quittung
        - TSE
  /quittung/tsesignature:
    post:
      description: |
        Allows to retrieve digital signature for a given receipt.
      operationId: quittungTSEsignature
      parameters:
        - description: Quittung Identifier  (serialnumber generated during receipt generation process)
          in: query
          name: account
          schema:
            type: string
      responses:
        "200":
          description: Success
      summary: Retrieve TSE (Technische Sicherheitseinrichtung) Signature only for a given receipt (Strom-Quittung).
      tags:
        - Strom-Quittung
        - TSE
  /quittung/zugferd:
    get:
      description: |
        Allows to retrieve XML of the zugferd invoice.
      operationId: quittungZugferd
      parameters:
        - description: Quittung Identifier  (serialnumber generated during receipt generation process)
          in: query
          name: account
          schema:
            type: string
      responses:
        "200":
          description: Success
      summary: Retrieve Zugferd XML for a given receipt (Strom-Quittung).
      tags:
        - Strom-Quittung
        - TSE
  /stromkonto/balances:
    get:
      description: |
        Stromkonto represents a core component of the Corrently Ecosystem. It is a ledger for green energy related transactions and gets heavily used by the public Web-UI on www.stromkonto.net . Beside of some decoration and reformating operations all data is backed by the [Energychain blockchain](https://github.com/energychain/) to provide consensus of balances and transactions. Use this API Endppoint if you prefere not to work with low level Distributed Ledger Technology (Blockchain).
      operationId: stromkontoBalances
      parameters:
        - description: Ethereum style address referencing a valid account (AKA Stromkonto).
          in: query
          name: account
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/Balance"
                type: array
          description: Success
      summary: Balances
      tags:
        - Stromkonto (Ledger)
  /stromkonto/choices:
    get:
      description: |
        Signable choices (contract changes) for customer.
      operationId: stromkontoChoices
      parameters:
        - description: Ethereum style address referencing a valid account alias (never use Stromkonto directly!).
          in: query
          name: account
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/Balance"
                type: array
          description: Success
      summary: Selectable Choices for customer
      tags:
        - Stromkonto (Ledger)
  /stromkonto/login:
    post:
      description: |
        Sends a mail to a given email address to login this user. This function makes life a bit easier in order to not having to deal with private key protection on the user side as a shared key is used to sign transactions onbehalf of a particular account.  However viewing consensus information (balances) are public and *might move* from account to account without prior notification. Best practice for third party uses is to always start a session with the login RESP call and only create a user in case the response indicates an `unregistered` status.
      operationId: stromkontoLogin
      requestBody:
        content:
          application/json:
            schema:
              properties:
                email:
                  type: string
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  status:
                    description: Registration status of a user. In case unregistered gets returned use the `register` endpoint to (re-)register.
                    enum:
                      - registered
                      - unregistered
                    type: string
                type: object
          description: Success
      summary: Login (via Mail)
      tags:
        - Stromkonto (Ledger)
  /stromkonto/prepareTransaction:
    post:
      description: |
        Prepares and inques a transaction (transfer) between two accounts (Stromkonten). This might be used to send any balanced entity. Using this endpoint will only prepare the transaction and enques it for signing and countersigning. This is done from within the user UI using validation process. Note: This API method does not validate any transations. In other words authentication, authorization, validation and actual transfer of value is done using a smart contract during processing in the energy blockchain.
      operationId: prepareTransaction
      requestBody:
        content:
          application/json:
            schema:
              properties:
                account:
                  description: Stromkonto account address of sender
                  type: string
                signature:
                  description: Signature per Stromkonto setting (might be simple email confirmation link)
                  type: string
                to:
                  description: Stromkonto account address of reciever
                  type: string
                value:
                  description: Amount to transfer (in Watthours for electricity, or pcs for trees)
                  type: integer
                variation:
                  enum:
                    - gsb
                    - erzeugung
                    - eigenstrom
                    - co2
                    - baeume
                  type: string
              type: object
        required: true
      responses:
        "200":
          description: Success
      summary: Prepare Transaction
      tags:
        - Stromkonto (Ledger)
  /stromkonto/register:
    post:
      description: |
        Calling this method with an unregistered (new) email will create a new account (Stromkonto) with all balances having a value of `0` and no transaction history. In addition some basic properties like region and zipcode are set to allow further operation of account.
      operationId: stromkontoRegister
      requestBody:
        content:
          application/json:
            schema:
              properties:
                email:
                  type: string
                first_name:
                  type: string
                last_name:
                  type: string
                zipcode:
                  type: string
              type: object
        required: true
      responses:
        "200":
          description: Success
      summary: Register (new Stromkonto)
      tags:
        - Stromkonto (Ledger)
  /tariff/components:
    get:
      description: |
        Provides insides into the different cost components of energy for a private household.
        Sample Request: https://api.corrently.io/v2.0/tariff/components?email=demo%40corrently.io&zip=69168&kwha=3300
      operationId: tariffcomponents
      parameters:
        - description: Zipcode (Postzleitzahl) of a city in Germany.
          in: query
          name: zipcode
          schema:
            type: string
        - description: Valid email address to assign request to (pre offer generation). Ensure GDPR (DSGVO) at any time
          in: query
          name: email
          schema:
            type: string
        - description: Total amount of energy in kilo-watt-hours per year. (sample 2100)
          in: query
          name: kwha
          schema:
            type: integer
        - description: If provided all results will be scaled to this timeframe
          in: query
          name: milliseconds
          schema:
            type: integer
        - description: If provided together with milliseconds, a cost component stament for a particular event (like charging a car) will be created.
          in: query
          name: wh
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/componentsh0"
                type: object
          description: Success
      summary: Energy Tariff price components
      tags:
        - Tariff (Price API)
  /tariff/slph0:
    get:
      description: |
        Provides pricing data for private households with standard load profiles (Standardlastprofil H0).
      operationId: tariffSLPH0
      parameters:
        - description: Zipcode (Postzleitzahl) of a city in Germany.
          in: query
          name: zipcode
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/Tariffh0"
                type: array
          description: Success
      summary: Energy Tariff information
      tags:
        - Tariff (Price API)
  /wim/status:
    get:
      description: |
        Access to status information of an existing metering change and allocation process.
      operationId: wimstatus
      parameters:
        - description: VID key of the process.
          in: query
          name: vid
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  wim_started:
                    description: Starting time of process
                    example: 1615914297977
                    type: integer
                  wim_status:
                    description: Latest Status
                    example: Erfolgreiche Prüfung
                    type: string
                type: object
          description: Success
      summary: WiM Proess Informtion
      tags:
        - WiM (Wechselprozesse im Messwesen Strom - Status API)
components:
  schemas:
    Balance:
      properties:
        balance:
          description: Sum owned - sum due by account
          example: 20
          type: integer
        haben:
          description: Sum owned by account
          example: 20
          type: integer
        soll:
          description: Sum due by account
          example: 20
          type: integer
        txs:
          items:
            $ref: "#/components/schemas/Transactions"
          type: array
        variation:
          description: Type of subbalance (sub account)
          enum:
            - gsb
            - erzeugung
            - eigenstrom
            - co2
            - baeume
          type: string
      type: object
    DispatchLocation:
      properties:
        energy:
          description: Percentage of energy
          example: 0.2345677
          type: number
        location:
          description: GeoJSON encoded location of target or source of green energy.
          type: object
      type: object
    ForecastItem:
      properties:
        co2_g_oekostrom:
          description: CO2 footprint in Gramm per kwh (only Green Power)
          example: 23
          type: integer
        energyprice:
          description: Local/regional energyprice modification (cent per kWh or euro per MWh).
          example: -0.219
          type: number
        epochtime:
          description: Timestamps in Seconds
          example: 1609293600
          type: integer
        gsi:
          description: Actual GreenPowerIndex for given Timestamp (between 0-100)
          example: 43
          type: integer
        scaled:
          description: Indicates if scaling is in operation to predict values
          type: boolean
        sci:
          description: Subindex just for Solar Energy
          example: 43
          type: integer
        timeStamp:
          description: Timestamp in Standard Milliseconds
          example: 1609293600000
          type: integer
      type: object
    MarketData:
      properties:
        end_timestamp:
          description: Timestamp in Standard Milliseconds
          example: 1609293600000
          type: integer
        marketprice:
          description: Actual Marketprice for regional green power in EUR per MWh
          example: 43
          type: number
        start_timestamp:
          description: Timestamp in Standard Milliseconds
          example: 1609293600000
          type: integer
      type: object
    Tariffh0:
      properties:
        ap:
          description: Energy price in cent per kwh. (Arbeitspreis) including all taxes and fees.
          example: 22.12
          type: integer
        gp:
          description: Base price in euro per montah (Grundpreis) including all taxes and fees.
          example: 7.5
          type: integer
      type: object
    Transactions:
      properties:
        cashier:
          description: Pretty print of counter signing party
          example: Miller
          type: string
        timeStamp:
          description: Cross signed timestamp of transaction
          example: 1606777200000
          type: integer
        txid:
          description: Unique hash of this transaction as provided by counter signing party
          example: 722d30b2-b46f-4ed4-a8cd-16d262180d37
          type: string
        txtype:
          description: Type of transaction per cashier implementation and schema
          example: bank.incGSB
          type: string
        value:
          description: Amount covered by transaction
          example: 1337
          type: integer
      type: object
    componentsh0:
      properties:
        components:
          description: Sub components of this price
          items:
            $ref: "#/components/schemas/componentsh0"
          type: array
        describtion:
          description: What is this price component about
          example: Grundgebühr
          type: string
        mutlityplier:
          description: Frequency/dependency of component
          example: month
          type: string
        per:
          description: Single unit price multiyplier is based on
          example: 0.012
          format: double
          type: number
        sum:
          description: Total sum in Euro for this price component.
          example: 22.12
          format: double
          type: number
      type: object
    easee-charger:
      properties:
        id:
          description: Given ID by easee api
          example: EH780684
          type: string
        lastSession:
          description: lastSession Info as given by easee API
          type: string
        name:
          description: Name set for charger
          type: string
      type: object
    ommeters:
      properties:
        currentScalingFactor:
          description: Factor imposed on metered current by a transducer
          type: integer
        loadProfileType:
          description: Metering load profile type associated with the meter
          type: string
        location:
          description: Basic address information for geo coding
          type: string
        manufacturerId:
          description: DLMS manufacturerId
          type: string
        measurementType:
          description: Physical quantity being measured by the meter
          type: string
        meta:
          description: Statistical metadata for this household
          type: string
        meterId:
          description: identifier to be used in other methods like readings or activities.
          example: gAAAAABgsYVSfcCjJZV5w2wGBTzOXCihY7dMaDyypwcbJzAELvxeCDaXiy65H2QwtY-7usSOfoqEIomTJjQb1yyIXZfFnTY2pmLgIu_DVw1rjppFte56yWBD5Fgrmbh2KyOkMNUr8zxO
          type: string
        scalingFactor:
          description: Factor imposed on metered current AND voltage by a transducer
          type: integer
        type:
          description: Device type of the meter
          type: string
        voltageScalingFactor:
          description: Factor imposed on metered voltage by a transducer
          type: integer
      type: object
