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

# The stored forecast qualities of up to 14 days

> Per day the active quality, the steps, the customers in supply and
each version's energy per control area; a backup's derivation and its
deviation from the customer's forecast. ``series=true`` adds the
quarter-hour totals and their Berlin labels for one day.



## OpenAPI

````yaml /setup/internal-openapi.json get /v1/mobile/forecasts
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/forecasts:
    get:
      tags:
        - mobile
      summary: The stored forecast qualities of up to 14 days
      description: |-
        Per day the active quality, the steps, the customers in supply and
        each version's energy per control area; a backup's derivation and its
        deviation from the customer's forecast. ``series=true`` adds the
        quarter-hour totals and their Berlin labels for one day.
      operationId: get_forecasts_v1_mobile_forecasts_get
      parameters:
        - name: von
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: first day, default today
            title: Von
          description: first day, default today
        - name: bis
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: last day, default the forecast horizon; at most 14 days
            title: Bis
          description: last day, default the forecast horizon; at most 14 days
        - name: series
          in: query
          required: false
          schema:
            type: boolean
            description: quarter-hour totals - for a single day only
            default: false
            title: Series
          description: quarter-hour totals - for a single day only
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForecastRange'
        '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'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ForecastRange:
      properties:
        von:
          type: string
          format: date
          title: Von
        bis:
          type: string
          format: date
          title: Bis
        today:
          type: string
          format: date
          title: Today
        days:
          items:
            $ref: '#/components/schemas/ForecastDay'
          type: array
          title: Days
      additionalProperties: false
      type: object
      required:
        - von
        - bis
        - today
        - days
      title: ForecastRange
    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.
    ForecastDay:
      properties:
        delivery_day:
          type: string
          format: date
          title: Delivery Day
        offset_days:
          type: integer
          title: Offset Days
        active:
          anyOf:
            - type: string
              enum:
                - customer
                - generated
                - backup
            - type: 'null'
          title: Active
          description: 'null: no forecast for the day'
        interval_count:
          type: integer
          enum:
            - 92
            - 96
            - 100
          title: Interval Count
        aggregated:
          type: string
          enum:
            - done
            - stale
            - pending
          title: Aggregated
        published:
          type: string
          enum:
            - done
            - stale
            - pending
          title: Published
        submitted:
          type: string
          enum:
            - done
            - stale
            - pending
            - rejected
          title: Submitted
        customers:
          additionalProperties:
            type: integer
          propertyNames:
            enum:
              - 50Hertz
              - Amprion
              - TenneT
              - TransnetBW
          type: object
          title: Customers
          description: confirmed customers in supply, per control area
        versions:
          items:
            $ref: '#/components/schemas/ForecastVersion'
          type: array
          title: Versions
        backup_deviation:
          anyOf:
            - $ref: '#/components/schemas/BackupDeviation'
            - type: 'null'
        interval_starts_local:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Interval Starts Local
          description: >-
            the label of every quarter-hour, only with series=true; the repeated
            autumn hour reads 02:00 A ... 02:45 A, 02:00 B ... 02:45 B
      additionalProperties: false
      type: object
      required:
        - delivery_day
        - offset_days
        - active
        - interval_count
        - aggregated
        - published
        - submitted
        - customers
        - versions
        - backup_deviation
        - interval_starts_local
      title: ForecastDay
    ForecastVersion:
      properties:
        source:
          type: string
          enum:
            - customer
            - generated
            - backup
          title: Source
        active:
          type: boolean
          title: Active
          description: the version the day's pipeline runs on
        stored_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Stored At
        consumption_mwh:
          type: number
          title: Consumption Mwh
        production_mwh:
          type: number
          title: Production Mwh
        per_area:
          additionalProperties:
            $ref: '#/components/schemas/AreaEnergy'
          propertyNames:
            enum:
              - 50Hertz
              - Amprion
              - TenneT
              - TransnetBW
          type: object
          title: Per Area
        meta:
          $ref: '#/components/schemas/ForecastMeta'
        consumption_mw:
          anyOf:
            - items:
                type: number
              type: array
            - type: 'null'
          title: Consumption Mw
          description: quarter-hour totals, only with series=true
        production_mw:
          anyOf:
            - items:
                type: number
              type: array
            - type: 'null'
          title: Production Mw
          description: quarter-hour totals, only with series=true
      additionalProperties: false
      type: object
      required:
        - source
        - active
        - stored_at
        - consumption_mwh
        - production_mwh
        - per_area
        - meta
        - consumption_mw
        - production_mw
      title: ForecastVersion
    BackupDeviation:
      properties:
        consumption_mwh:
          type: number
          title: Consumption Mwh
        consumption_pct:
          anyOf:
            - type: number
            - type: 'null'
          title: Consumption Pct
        mean_abs_mw:
          type: number
          title: Mean Abs Mw
      additionalProperties: false
      type: object
      required:
        - consumption_mwh
        - consumption_pct
        - mean_abs_mw
      title: BackupDeviation
      description: The backup against the customer's forecast of the same day.
    AreaEnergy:
      properties:
        consumption_mwh:
          type: number
          title: Consumption Mwh
        production_mwh:
          type: number
          title: Production Mwh
      additionalProperties: false
      type: object
      required:
        - consumption_mwh
        - production_mwh
      title: AreaEnergy
    ForecastMeta:
      properties:
        copied_from:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Copied From
        method:
          anyOf:
            - type: string
              enum:
                - same weekday
                - newest
            - type: 'null'
          title: Method
        customers_without_reference:
          anyOf:
            - type: integer
            - type: 'null'
          title: Customers Without Reference
      additionalProperties: false
      type: object
      required:
        - copied_from
        - method
        - customers_without_reference
      title: ForecastMeta
      description: A backup's derivation; null for the other qualities.
  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.