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

# Record the address a partner asked us to write to

> Erstkontakt, Erinnerung, Quittungs-Nachfass and Korrektur mail all
use this address from then on, ahead of the BDEW list contact and of
the desk named in the partner's own PARTIN. Idempotent.



## OpenAPI

````yaml /setup/internal-openapi.json put /v1/process/market-partners/{key}/kontakt
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) and the operator console
    endpoints. Requires the process API key; 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/market-partners/{key}/kontakt:
    put:
      summary: Record the address a partner asked us to write to
      description: |-
        Erstkontakt, Erinnerung, Quittungs-Nachfass and Korrektur mail all
        use this address from then on, ahead of the BDEW list contact and of
        the desk named in the partner's own PARTIN. Idempotent.
      operationId: put_kontakt_adresse_v1_process_market_partners__key__kontakt_put
      parameters:
        - name: key
          in: path
          required: true
          schema:
            type: string
            description: The partner's MP-ID, or one of its MGA EICs
            title: Key
          description: The partner's MP-ID, or one of its MGA EICs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KontaktAdresseRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KontaktAdresseResponse'
        '404':
          description: The key names no known market party.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    KontaktAdresseRequest:
      properties:
        email:
          type: string
          pattern: ^[^@\s]+@[^@\s]+\.[^@\s]+$
          title: Email
        reason:
          type: string
          maxLength: 300
          minLength: 3
          title: Reason
          description: >-
            Where it comes from, e.g. 'Kommunikationsdatenblatt Stand
            01.01.2024, Zeile Bilanzierung/Zuordnungsermaechtigung'
      type: object
      required:
        - email
        - reason
      title: KontaktAdresseRequest
      description: |-
        The address a partner asked us to write to.

        The BDEW Marktpartnerliste often names a person, while the house
        publishes functional mailboxes on its Kommunikationsdatenblatt. This
        records the correction so it survives the conversation: it beats both
        the list and the desk named in the partner's own PARTIN.
    KontaktAdresseResponse:
      properties:
        mp_id:
          type: string
          title: Mp Id
        name:
          type: string
          title: Name
          default: ''
        email:
          type: string
          title: Email
        reason:
          type: string
          title: Reason
        noted_at:
          type: string
          title: Noted At
      type: object
      required:
        - mp_id
        - email
        - reason
        - noted_at
      title: KontaktAdresseResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````