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

# Store one market data file forwarded by Cloover

> Sent by the Apps Script on Cloover's Drive folder
(``scripts/drive_marktdaten.gs``) with the read-only report key, one
file per call: the BO4E JSON of a UTILMD 55126/55672 (Bilanzierungs-
daten per market location), 55073 (profile definitions) or MSCONS
13010/13011 (normalized profile, Profilschar). Stored on the audit
share and sends nothing. Idempotent per message: a file sent twice
answers ``neu: false``. A Prüfidentifikator the bridge does not
evaluate is stored too and answered with ``art: unbekannt``. The
response and the event carry counts, never market location IDs.



## OpenAPI

````yaml /setup/internal-openapi.json post /v1/process/marktdaten/import
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/marktdaten/import:
    post:
      summary: Store one market data file forwarded by Cloover
      description: |-
        Sent by the Apps Script on Cloover's Drive folder
        (``scripts/drive_marktdaten.gs``) with the read-only report key, one
        file per call: the BO4E JSON of a UTILMD 55126/55672 (Bilanzierungs-
        daten per market location), 55073 (profile definitions) or MSCONS
        13010/13011 (normalized profile, Profilschar). Stored on the audit
        share and sends nothing. Idempotent per message: a file sent twice
        answers ``neu: false``. A Prüfidentifikator the bridge does not
        evaluate is stored too and answered with ``art: unbekannt``. The
        response and the event carry counts, never market location IDs.
      operationId: post_marktdaten_import_v1_process_marktdaten_import_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarktdatenImportRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: >-
                  Response Post Marktdaten Import V1 Process Marktdaten Import
                  Post
        '422':
          description: Not a JSON object - nothing stored.
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    MarktdatenImportRequest:
      properties:
        dokument:
          additionalProperties: true
          type: object
          title: Dokument
          description: The file's JSON content, unchanged
        datei:
          type: string
          maxLength: 300
          title: Datei
          description: File name
          default: ''
        drive_id:
          type: string
          maxLength: 200
          title: Drive Id
          description: Drive file ID
          default: ''
      type: object
      required:
        - dokument
      title: MarktdatenImportRequest
      description: |-
        One market data file as Cloover forwards it to the Drive folder:
        the BO4E JSON of one EDIFACT message (UTILMD 55126/55672/55073, MSCONS
        13010/13011), unchanged, plus where it came from.
  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.