> ## Documentation Index
> Fetch the complete documentation index at: https://docs.energy.nlead.ch/llms.txt
> Use this file to discover all available pages before exploring further.

# Read activations older than the inbox window into the ledger

> Once, for a stack set up after its BKV's series were activated: the
UTILMD 55062/55063 received since ``seit`` (at most five years back)
are read in windows of at most 180 days, past the MakoFlow cache, and
recorded in the ``zp_aktivierung_stand`` ledger, which then shows them
in ``/zeitreihen/aktivierungen`` like the recent ones. Never replaces a
later word with an older one, so a second run changes nothing.
``fenster`` counts the UTILMD per window: where the counts stop,
mako365's history ends.



## OpenAPI

````yaml /setup/internal-openapi.json post /v1/process/zeitreihen/aktivierungen/nachlesen
openapi: 3.1.0
info:
  title: n:lead Scheduling Bridge — Internal API
  version: 0.4.0
  description: >-
    Internal API of the n:lead scheduling bridge: the process endpoints that
    drive the day-ahead pipeline (aggregate, publish the open position, submit
    schedules, generate forecasts, orchestrate), the operator console endpoints,
    and the read-only operator-app endpoints under /v1/mobile. The process and
    console endpoints require the process API key, /v1/mobile a device key of
    the mobile scope; not for customer use.
servers:
  - url: https://{host}
    description: Deployed service
    variables:
      host:
        default: api.energy.nlead.ch
        description: >-
          The service hostname - n:lead provides it (see the Base URL on the API
          introduction page)
  - url: http://localhost:8000
    description: Local development
security: []
paths:
  /v1/process/zeitreihen/aktivierungen/nachlesen:
    post:
      summary: Read activations older than the inbox window into the ledger
      description: |-
        Once, for a stack set up after its BKV's series were activated: the
        UTILMD 55062/55063 received since ``seit`` (at most five years back)
        are read in windows of at most 180 days, past the MakoFlow cache, and
        recorded in the ``zp_aktivierung_stand`` ledger, which then shows them
        in ``/zeitreihen/aktivierungen`` like the recent ones. Never replaces a
        later word with an older one, so a second run changes nothing.
        ``fenster`` counts the UTILMD per window: where the counts stop,
        mako365's history ends.
      operationId: >-
        post_zp_aktivierungen_nachlesen_v1_process_zeitreihen_aktivierungen_nachlesen_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ZpNachlesenRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZpNachlesenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    ZpNachlesenRequest:
      properties:
        seit:
          type: string
          format: date
          title: Seit
          description: >-
            First day to read from (German time); at most five years back,
            before today
      type: object
      required:
        - seit
      title: ZpNachlesenRequest
      description: |-
        Read the activations of MaBiS-ZP older than the inbox window into
        the ledger - once, for a stack set up after its BKV's series were
        activated.
    ZpNachlesenResponse:
      properties:
        seit:
          type: string
          title: Seit
        fenster:
          items:
            $ref: '#/components/schemas/ZpNachlesenFenster'
          type: array
          title: Fenster
          description: The windows read, oldest first, at most 180 days each
        vorgaenge:
          type: integer
          title: Vorgaenge
          description: Aktivierungen and Deaktivierungen found (UTILMD 55062/55063)
        neu:
          type: integer
          title: Neu
          description: >-
            Zählpunkte whose ledger entry was added or replaced by a later word;
            0 on a second run
        zaehlpunkte:
          items:
            type: string
          type: array
          title: Zaehlpunkte
          description: Those Zählpunkte
      type: object
      required:
        - seit
        - fenster
        - vorgaenge
        - neu
        - zaehlpunkte
      title: ZpNachlesenResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ZpNachlesenFenster:
      properties:
        von:
          type: string
          title: Von
          description: Window start, as sent to MakoFlow
        bis:
          type: string
          title: Bis
          description: Window end, as sent to MakoFlow
        utilmd:
          type: integer
          title: Utilmd
          description: >-
            UTILMD addressed to the BRP in the window - where these stop,
            mako365's history ends
      type: object
      required:
        - von
        - bis
        - utilmd
      title: ZpNachlesenFenster
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      description: OIDC access token (Auth0 M2M)
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.