> ## 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.

# A delivery day's Fahrplan against the Ist, with reBAP and cost

> The console's Fahrplan gegen Ist: for Germany (first) and per
Regelzone the net Fahrplan as the ÜNB confirmed it, the Ist from the
BK-SZR, the deviation (positive: short), the reBAP and what the
deviation costs at it, the calculation of the day, the Ist per
Kategorie and per Bilanzierungsgebiet. Without the customers'
contractual Aufschlag, revenue and margin; no Zählpunkt. Shared between
callers for 5 minutes.



## OpenAPI

````yaml /setup/internal-openapi.json get /v1/mobile/fahrplan-ist
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/mobile/fahrplan-ist:
    get:
      tags:
        - mobile
      summary: A delivery day's Fahrplan against the Ist, with reBAP and cost
      description: |-
        The console's Fahrplan gegen Ist: for Germany (first) and per
        Regelzone the net Fahrplan as the ÜNB confirmed it, the Ist from the
        BK-SZR, the deviation (positive: short), the reBAP and what the
        deviation costs at it, the calculation of the day, the Ist per
        Kategorie and per Bilanzierungsgebiet. Without the customers'
        contractual Aufschlag, revenue and margin; no Zählpunkt. Shared between
        callers for 5 minutes.
      operationId: get_fahrplan_ist_v1_mobile_fahrplan_ist_get
      parameters:
        - name: day
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: >-
              the delivery day, default yesterday; from 120 days back to the
              forecast horizon (T+4)
            title: Day
          description: >-
            the delivery day, default yesterday; from 120 days back to the
            forecast horizon (T+4)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FahrplanIst'
        '401':
          description: Missing or unknown device key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileError'
        '403':
          description: A valid key of another scope - only device keys open /v1/mobile.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileError'
        '422':
          description: A parameter out of range.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileError'
        '429':
          description: Rate limit exceeded; wait the seconds in `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileError'
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileError'
        '503':
          description: MakoFlow could not be read; try again later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    FahrplanIst:
      properties:
        delivery_day:
          type: string
          format: date
          title: Delivery Day
        generated_at:
          type: string
          format: date-time
          title: Generated At
        interval_count:
          type: integer
          enum:
            - 92
            - 96
            - 100
          title: Interval Count
        interval_starts_local:
          items:
            type: string
          type: array
          title: Interval Starts Local
        home_area:
          type: string
          enum:
            - 50Hertz
            - Amprion
            - TenneT
            - TransnetBW
          title: Home Area
        has_plan:
          type: boolean
          title: Has Plan
        latest_day:
          type: string
          format: date
          title: Latest Day
          description: as in plan-ist
        rebap_verfuegbar:
          type: boolean
          title: Rebap Verfuegbar
          description: a settled reBAP for some quarter-hour
        rebap_quelle:
          items:
            anyOf:
              - type: string
                enum:
                  - pricat
                  - netztransparenz
                  - berechnet
                  - schaetzer
                  - prognose
              - type: 'null'
          type: array
          title: Rebap Quelle
        rebap_quellen:
          additionalProperties:
            type: integer
          propertyNames:
            enum:
              - pricat
              - netztransparenz
              - berechnet
              - schaetzer
              - prognose
          type: object
          title: Rebap Quellen
        rebap_prognose:
          anyOf:
            - $ref: '#/components/schemas/RebapPrognose'
            - type: 'null'
        preislisten:
          items:
            $ref: '#/components/schemas/RebapListe'
          type: array
          title: Preislisten
        pricat_gelesen:
          type: integer
          title: Pricat Gelesen
        spot_eur_mwh:
          items:
            anyOf:
              - type: number
              - type: 'null'
          type: array
          title: Spot Eur Mwh
          description: EPEX day-ahead
        spot_verfuegbar:
          type: boolean
          title: Spot Verfuegbar
        zonen:
          items:
            $ref: '#/components/schemas/FahrplanIstZone'
          type: array
          title: Zonen
          description: Germany first, then the Regelzonen
      additionalProperties: false
      type: object
      required:
        - delivery_day
        - generated_at
        - interval_count
        - interval_starts_local
        - home_area
        - has_plan
        - latest_day
        - rebap_verfuegbar
        - rebap_quelle
        - rebap_quellen
        - rebap_prognose
        - preislisten
        - pricat_gelesen
        - spot_eur_mwh
        - spot_verfuegbar
        - zonen
      title: FahrplanIst
    MobileError:
      properties:
        error:
          type: string
          enum:
            - unauthorized
            - forbidden
            - invalid_request
            - rate_limited
            - upstream_unavailable
            - internal
          title: Error
      additionalProperties: false
      type: object
      required:
        - error
      title: MobileError
      description: |-
        Every error under /v1/mobile: a code, nothing else - no detail text,
        no echo of the request.
    RebapPrognose:
      properties:
        tagtyp:
          type: string
          enum:
            - werktag
            - wochenende_feiertag
          title: Tagtyp
        gleicher_tagtyp:
          type: boolean
          title: Gleicher Tagtyp
        basis_tage:
          type: integer
          title: Basis Tage
        basis_von:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Basis Von
        basis_bis:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Basis Bis
      additionalProperties: false
      type: object
      required:
        - tagtyp
        - gleicher_tagtyp
        - basis_tage
        - basis_von
        - basis_bis
      title: RebapPrognose
    RebapListe:
      properties:
        regelzone:
          type: string
          title: Regelzone
          description: the Regelzone, or its EIC if not ours
        monat:
          anyOf:
            - type: string
            - type: 'null'
          title: Monat
        empfangen_am:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Empfangen Am
        preise:
          type: integer
          title: Preise
        treffer:
          type: integer
          title: Treffer
          description: prices for quarter-hours of this day
      additionalProperties: false
      type: object
      required:
        - regelzone
        - monat
        - empfangen_am
        - preise
        - treffer
      title: RebapListe
      description: A reBAP price list the BIKO sent (PRICAT 27001).
    FahrplanIstZone:
      properties:
        control_area:
          anyOf:
            - type: string
              enum:
                - 50Hertz
                - Amprion
                - TenneT
                - TransnetBW
            - type: 'null'
          title: Control Area
          description: 'null: Germany, the sum of the Regelzonen'
        status:
          type: string
          enum:
            - leer
            - keine_werte
            - teilweise
            - vorlaeufig
            - abrechnung
          title: Status
        complete:
          type: boolean
          title: Complete
        covered:
          type: integer
          title: Covered
        fahrplan_quelle:
          type: string
          enum:
            - gesendet
            - bestaetigt
            - bestaetigt_final
          title: Fahrplan Quelle
          description: the Fahrplan as sent, or as the ÜNB confirmed it
        fahrplan_aenderung_mwh:
          type: number
          title: Fahrplan Aenderung Mwh
          description: 'confirmed minus sent; negative: less scheduled than sent'
        plan_mw:
          anyOf:
            - items:
                type: number
              type: array
            - type: 'null'
          title: Plan Mw
          description: >-
            net Fahrplan (consumption minus production) per quarter-hour; null
            without one
        ist_mw:
          items:
            anyOf:
              - type: number
              - type: 'null'
          type: array
          title: Ist Mw
          description: net Ist; null where missing
        abweichung_mw:
          items:
            anyOf:
              - type: number
              - type: 'null'
          type: array
          title: Abweichung Mw
          description: 'Ist minus Fahrplan; positive: short'
        rebap_eur_mwh:
          items:
            anyOf:
              - type: number
              - type: 'null'
          type: array
          title: Rebap Eur Mwh
        kosten_eur:
          items:
            anyOf:
              - type: number
              - type: 'null'
          type: array
          title: Kosten Eur
          description: 'positive: to pay'
        plan_mwh:
          anyOf:
            - type: number
            - type: 'null'
          title: Plan Mwh
        ist_mwh:
          type: number
          title: Ist Mwh
        abweichung_mwh:
          type: number
          title: Abweichung Mwh
        kurz_mwh:
          type: number
          title: Kurz Mwh
        lang_mwh:
          type: number
          title: Lang Mwh
        viertelstunden_verglichen:
          type: integer
          title: Viertelstunden Verglichen
        kosten_summe_eur:
          type: number
          title: Kosten Summe Eur
        kosten_vollstaendig:
          type: boolean
          title: Kosten Vollstaendig
        kosten_geschaetzt:
          type: boolean
          title: Kosten Geschaetzt
        kalkulation:
          $ref: '#/components/schemas/Kalkulation'
        kategorien:
          $ref: '#/components/schemas/FahrplanIstKategorien'
          description: the net Ist of each BK-SZR Kategorie
        bilanzierungsgebiete:
          items:
            $ref: '#/components/schemas/FahrplanIstBg'
          type: array
          title: Bilanzierungsgebiete
        series:
          items:
            $ref: '#/components/schemas/PlanIstSeries'
          type: array
          title: Series
      additionalProperties: false
      type: object
      required:
        - control_area
        - status
        - complete
        - covered
        - fahrplan_quelle
        - fahrplan_aenderung_mwh
        - plan_mw
        - ist_mw
        - abweichung_mw
        - rebap_eur_mwh
        - kosten_eur
        - plan_mwh
        - ist_mwh
        - abweichung_mwh
        - kurz_mwh
        - lang_mwh
        - viertelstunden_verglichen
        - kosten_summe_eur
        - kosten_vollstaendig
        - kosten_geschaetzt
        - kalkulation
        - kategorien
        - bilanzierungsgebiete
        - series
      title: FahrplanIstZone
    Kalkulation:
      properties:
        spot_kauf_kwh:
          type: number
          title: Spot Kauf Kwh
          description: Fahrplan bought day-ahead
        spot_kauf_eur:
          type: number
          title: Spot Kauf Eur
        spot_verkauf_kwh:
          type: number
          title: Spot Verkauf Kwh
          description: Fahrplan sold day-ahead
        spot_verkauf_eur:
          type: number
          title: Spot Verkauf Eur
        spot_netto_kwh:
          type: number
          title: Spot Netto Kwh
        spot_netto_eur:
          type: number
          title: Spot Netto Eur
        spot_preis_ct_kwh:
          anyOf:
            - type: number
            - type: 'null'
          title: Spot Preis Ct Kwh
        ausgleich_kurz_kwh:
          type: number
          title: Ausgleich Kurz Kwh
          description: Ist above the Fahrplan
        ausgleich_lang_kwh:
          type: number
          title: Ausgleich Lang Kwh
          description: Ist below the Fahrplan
        ausgleich_eur:
          type: number
          title: Ausgleich Eur
          description: 'positive: to pay; negative: a credit'
        ausgleich_ct_kwh:
          anyOf:
            - type: number
            - type: 'null'
          title: Ausgleich Ct Kwh
          description: per customer kWh
        ausgleich_geschaetzt:
          type: boolean
          title: Ausgleich Geschaetzt
          description: on a reBAP rebuilt, from the TSOs' estimator or forecast
        kunde_kwh:
          type: number
          title: Kunde Kwh
          description: >-
            what the customers took: the Ist, the Fahrplan where it has not
            arrived (kunde_bezug)
        kunde_spot_eur:
          type: number
          title: Kunde Spot Eur
          description: kunde_kwh at the spot price
        kunde_spot_ct_kwh:
          anyOf:
            - type: number
            - type: 'null'
          title: Kunde Spot Ct Kwh
        kunde_bezug:
          anyOf:
            - type: string
              enum:
                - ist
                - fahrplan
                - teilweise
            - type: 'null'
          title: Kunde Bezug
        gesamtkosten_eur:
          type: number
          title: Gesamtkosten Eur
          description: net procurement plus Ausgleich
        kosten_ct_kwh:
          anyOf:
            - type: number
            - type: 'null'
          title: Kosten Ct Kwh
        mehrkosten_eur:
          type: number
          title: Mehrkosten Eur
          description: Gesamtkosten minus kunde_spot_eur
        aufschlag_ct_kwh:
          anyOf:
            - type: number
            - type: 'null'
          title: Aufschlag Ct Kwh
          description: what the customers' spot price falls short by, per kWh
        viertelstunden_ist:
          type: integer
          title: Viertelstunden Ist
        viertelstunden_fahrplan:
          type: integer
          title: Viertelstunden Fahrplan
          description: counted on the Fahrplan
        viertelstunden_ohne_preis:
          type: integer
          title: Viertelstunden Ohne Preis
        vollstaendig:
          type: boolean
          title: Vollstaendig
      additionalProperties: false
      type: object
      required:
        - spot_kauf_kwh
        - spot_kauf_eur
        - spot_verkauf_kwh
        - spot_verkauf_eur
        - spot_netto_kwh
        - spot_netto_eur
        - spot_preis_ct_kwh
        - ausgleich_kurz_kwh
        - ausgleich_lang_kwh
        - ausgleich_eur
        - ausgleich_ct_kwh
        - ausgleich_geschaetzt
        - kunde_kwh
        - kunde_spot_eur
        - kunde_spot_ct_kwh
        - kunde_bezug
        - gesamtkosten_eur
        - kosten_ct_kwh
        - mehrkosten_eur
        - aufschlag_ct_kwh
        - viertelstunden_ist
        - viertelstunden_fahrplan
        - viertelstunden_ohne_preis
        - vollstaendig
      title: Kalkulation
      description: |-
        A day's or a period's procurement against what the customers took,
        in kWh and EUR - the console's calculation without the customers'
        contractual Aufschlag, their revenue and the margin.
    FahrplanIstKategorien:
      properties:
        A:
          items:
            anyOf:
              - type: number
              - type: 'null'
          type: array
          title: A
        B:
          items:
            anyOf:
              - type: number
              - type: 'null'
          type: array
          title: B
        C:
          items:
            anyOf:
              - type: number
              - type: 'null'
          type: array
          title: C
      additionalProperties: false
      type: object
      required:
        - A
        - B
        - C
      title: FahrplanIstKategorien
    FahrplanIstBg:
      properties:
        bilanzierungsgebiet:
          type: string
          title: Bilanzierungsgebiet
          description: the EIC
        netzbetreiber:
          type: string
          title: Netzbetreiber
          description: the registry's name; empty if unknown
        kategorien:
          items:
            type: string
            enum:
              - A
              - B
              - C
          type: array
          title: Kategorien
        ist_consumption_mwh:
          type: number
          title: Ist Consumption Mwh
        ist_production_mwh:
          type: number
          title: Ist Production Mwh
        covered:
          type: integer
          title: Covered
      additionalProperties: false
      type: object
      required:
        - bilanzierungsgebiet
        - netzbetreiber
        - kategorien
        - ist_consumption_mwh
        - ist_production_mwh
        - covered
      title: FahrplanIstBg
      description: 'The Ist of one Bilanzierungsgebiet: Kategorie A and B per BG.'
    PlanIstSeries:
      properties:
        kategorie:
          type: string
          enum:
            - A
            - B
            - C
          title: Kategorie
          description: >-
            BK-SZR category (MaBiS): A by the Netzbetreiber, monthly; B by the
            ÜNB, monthly; C by the ÜNB, daily and preliminary
        art:
          type: string
          enum:
            - verbrauch
            - erzeugung
          title: Art
        zeitreihentyp:
          type: string
          title: Zeitreihentyp
        werte:
          type: integer
          title: Werte
          description: quarter-hours of the day with a value
      additionalProperties: false
      type: object
      required:
        - kategorie
        - art
        - zeitreihentyp
        - werte
      title: PlanIstSeries
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````

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