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

# PARTIN data for one market party

> The PARTIN exchange with one market party, parsed for humans: what
the partner declared about themselves, and what we sent them.

**`received`** holds every PARTIN the partner sent us in the window,
newest first, each parsed into its business content: the application
case (`pruefidentifikator` - `37001` announces their master data,
`37003` answers ours), the company block with address, VAT id and
website, and **every contact block** with the names, e-mail addresses
and phone numbers the partner published - the same addresses the
correction-mail loop writes to. Fields the partner did not fill are
empty strings, never guessed.

**`sent`** lists our own PARTINs to that partner (send date and
interchange reference); their content is our configured datasheet.

Address the partner by MP-ID or by any of its MGA EICs, exactly as in
the `brp-status` endpoint. A read-only **report key** is sufficient.



## OpenAPI

````yaml /setup/internal-openapi.json get /v1/process/market-partners/{key}/partin
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://nleadbridge-app.lemonisland-7d6503d3.germanywestcentral.azurecontainerapps.io
    description: Deployed service
  - url: http://localhost:8000
    description: Local development
security: []
paths:
  /v1/process/market-partners/{key}/partin:
    get:
      summary: PARTIN data for one market party
      description: |-
        The PARTIN exchange with one market party, parsed for humans: what
        the partner declared about themselves, and what we sent them.

        **`received`** holds every PARTIN the partner sent us in the window,
        newest first, each parsed into its business content: the application
        case (`pruefidentifikator` - `37001` announces their master data,
        `37003` answers ours), the company block with address, VAT id and
        website, and **every contact block** with the names, e-mail addresses
        and phone numbers the partner published - the same addresses the
        correction-mail loop writes to. Fields the partner did not fill are
        empty strings, never guessed.

        **`sent`** lists our own PARTINs to that partner (send date and
        interchange reference); their content is our configured datasheet.

        Address the partner by MP-ID or by any of its MGA EICs, exactly as in
        the `brp-status` endpoint. A read-only **report key** is sufficient.
      operationId: get_partin_data_v1_process_market_partners__key__partin_get
      parameters:
        - name: key
          in: path
          required: true
          schema:
            type: string
            description: >-
              The partner's MP-ID (BDEW code or GLN), or the EIC Y code of any
              of its Bilanzierungsgebiete (MGA)
            title: Key
          description: >-
            The partner's MP-ID (BDEW code or GLN), or the EIC Y code of any of
            its Bilanzierungsgebiete (MGA)
        - name: lookback_days
          in: query
          required: false
          schema:
            type: integer
            maximum: 730
            minimum: 1
            description: How far back the MakoFlow inbox and outbox are scanned
            default: 90
            title: Lookback Days
          description: How far back the MakoFlow inbox and outbox are scanned
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartinDataResponse'
        '404':
          description: >-
            The key is neither a Netzbetreiber MP-ID, a Bilanzierungsgebiet EIC,
            nor a party with PARTIN traffic in the lookback window.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '502':
          description: >-
            MakoFlow (the market-communication gateway) did not answer; retry
            once it recovers.
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    PartinDataResponse:
      properties:
        queried:
          $ref: '#/components/schemas/BrpQueried'
        mp_id:
          type: string
          title: Mp Id
          description: The partner's MP-ID
        name:
          type: string
          title: Name
          description: Partner name from the BDEW registry/roles
        received:
          items:
            $ref: '#/components/schemas/PartinEmpfangen'
          type: array
          title: Received
          description: The partner's PARTINs to us, newest first
        sent:
          items:
            $ref: '#/components/schemas/PartinGesendet'
          type: array
          title: Sent
          description: Our PARTINs to the partner, newest first
        lookback_days:
          type: integer
          title: Lookback Days
          description: Evaluated MakoFlow window size
        window:
          $ref: '#/components/schemas/BrpWindow'
      type: object
      required:
        - queried
        - mp_id
        - name
        - received
        - sent
        - lookback_days
        - window
      title: PartinDataResponse
      description: The PARTIN exchange with one market party.
      example:
        lookback_days: 90
        mp_id: '9900146000008'
        name: Stadtwerke Dreieich GmbH
        queried:
          key: '9900146000008'
          resolved_by: mp_id
        received:
          - company:
              hausnummer: '24'
              land: DE
              mp_id: ''
              name: Stadtwerke Dreieich GmbH
              ort: Dreieich
              plz: '63303'
              strasse: Eisenbahnstraße
            contacts:
              - emails:
                  - mako@stadtwerke-dreieich.de
                faxe: []
                name: Marktkommunikation
                rolle: Z21
                telefone:
                  - '+4961031234'
            created_at: 202608251518+00
            date: '2026-08-25T15:20:11+02:00'
            document_number: d1f853bc1eb09c3d
            pruefidentifikator: '37001'
            receiver_mp_id: '9985803000004'
            reference: 4A0669ECFCE8F1
            sender_mp_id: '9900146000008'
            vat_id: DE123456789
            version: '1'
            website: www.stadtwerke-dreieich.de
        sent:
          - date: '2026-08-25T15:15:07+02:00'
            reference: 460669ECFCE8F8
        window:
          begin: '2026-05-30T15:00:00'
          end: '2026-08-28T15:00:00'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BrpQueried:
      properties:
        key:
          type: string
          title: Key
          description: The key exactly as queried
        resolved_by:
          type: string
          enum:
            - mp_id
            - bilanzierungsgebiet
          title: Resolved By
          description: >-
            How the key matched: the partner's own MP-ID, or the EIC of one of
            its Bilanzierungsgebiete (MGA)
      type: object
      required:
        - key
        - resolved_by
      title: BrpQueried
    PartinEmpfangen:
      properties:
        date:
          type: string
          title: Date
          description: MakoFlow receipt date of the message
        sender_mp_id:
          type: string
          title: Sender Mp Id
          description: Sender MP-ID from the envelope
        receiver_mp_id:
          type: string
          title: Receiver Mp Id
          description: Receiver MP-ID (our BKV)
        reference:
          type: string
          title: Reference
          description: Interchange reference (UNB)
        document_number:
          type: string
          title: Document Number
          description: Document number (BGM)
        created_at:
          type: string
          title: Created At
          description: Message creation time (DTM+137)
        pruefidentifikator:
          type: string
          title: Pruefidentifikator
          description: >-
            Application case, e.g. `37001` (Stammdaten des NB), `37003`
            (Antwort), `37004`/`37005` (Änderung/Ende)
        version:
          type: string
          title: Version
          description: Datasheet version (RFF+AGK)
        vat_id:
          type: string
          title: Vat Id
          description: VAT id (RFF+VA)
        website:
          type: string
          title: Website
          description: Website (FTX+Z13)
        company:
          anyOf:
            - $ref: '#/components/schemas/PartinFirma'
            - type: 'null'
          description: >-
            The partner's company block; null when the message carries no named
            party
        contacts:
          items:
            $ref: '#/components/schemas/PartinKontakt'
          type: array
          title: Contacts
          description: Every contact block found, in message order
      type: object
      required:
        - date
        - sender_mp_id
        - receiver_mp_id
        - reference
        - document_number
        - created_at
        - pruefidentifikator
        - version
        - vat_id
        - website
        - company
        - contacts
      title: PartinEmpfangen
      description: |-
        One PARTIN the partner sent us, parsed. Empty string = the partner
        did not fill that field.
    PartinGesendet:
      properties:
        date:
          type: string
          title: Date
          description: MakoFlow send date
        reference:
          type: string
          title: Reference
          description: Interchange reference of our PARTIN
      type: object
      required:
        - date
        - reference
      title: PartinGesendet
    BrpWindow:
      properties:
        begin:
          type: string
          title: Begin
          description: Start of the evaluated MakoFlow window
        end:
          type: string
          title: End
          description: End of the evaluated window (now)
      type: object
      required:
        - begin
        - end
      title: BrpWindow
    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
    PartinFirma:
      properties:
        mp_id:
          type: string
          title: Mp Id
          description: >-
            MP-ID carried in the company NAD, often empty - the authoritative id
            is the message's `sender_mp_id`
        name:
          type: string
          title: Name
          description: Company name as declared
        strasse:
          type: string
          title: Strasse
          description: Street
        hausnummer:
          type: string
          title: Hausnummer
          description: House number
        plz:
          type: string
          title: Plz
          description: Postal code
        ort:
          type: string
          title: Ort
          description: City
        land:
          type: string
          title: Land
          description: Country code
      type: object
      required:
        - mp_id
        - name
        - strasse
        - hausnummer
        - plz
        - ort
        - land
      title: PartinFirma
    PartinKontakt:
      properties:
        rolle:
          type: string
          title: Rolle
          description: >-
            Party qualifier of the block the contact belongs to: `MS` (message
            envelope), `Z10` (Datenaustausch), `Z11` (Rahmenvertrag), `Z21`
            (Marktkommunikation) - partners vary in which blocks they fill
        name:
          type: string
          title: Name
          description: Contact name or unit from the CTA segment
        emails:
          items:
            type: string
          type: array
          title: Emails
          description: E-mail addresses (COM `EM`)
        telefone:
          items:
            type: string
          type: array
          title: Telefone
          description: Phone numbers (COM `TE`)
        faxe:
          items:
            type: string
          type: array
          title: Faxe
          description: Fax numbers (COM `FX`)
      type: object
      required:
        - rolle
        - name
        - emails
        - telefone
        - faxe
      title: PartinKontakt
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      description: OIDC access token (Auth0 M2M)
      scheme: bearer

````