> ## 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: every partner's status and datasheet

> Every market partner with its PARTIN exchange - sent, received,
acknowledged or rejected - and its newest datasheet in full: company,
address and every contact block with its phone and fax numbers and
e-mail addresses. For the app's screens and the phone's Contacts, never
a widget, the watch or a notification. Shared between callers for 5
minutes.



## OpenAPI

````yaml /setup/internal-openapi.json get /v1/mobile/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), 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/partin:
    get:
      tags:
        - mobile
      summary: 'PARTIN: every partner''s status and datasheet'
      description: |-
        Every market partner with its PARTIN exchange - sent, received,
        acknowledged or rejected - and its newest datasheet in full: company,
        address and every contact block with its phone and fax numbers and
        e-mail addresses. For the app's screens and the phone's Contacts, never
        a widget, the watch or a notification. Shared between callers for 5
        minutes.
      operationId: get_partin_v1_mobile_partin_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartinDirectory'
        '401':
          description: Missing or unknown device key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileError'
        '403':
          description: A watch key.
          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:
    PartinDirectory:
      properties:
        generated_at:
          type: string
          format: date-time
          title: Generated At
        partners:
          items:
            $ref: '#/components/schemas/PartinPartner'
          type: array
          title: Partners
          description: by name
      additionalProperties: false
      type: object
      required:
        - generated_at
        - partners
      title: PartinDirectory
    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.
    PartinPartner:
      properties:
        mp_id:
          type: string
          title: Mp Id
        name:
          type: string
          title: Name
          description: the registry's name, else the datasheet's
        role:
          anyOf:
            - type: string
              enum:
                - nb
                - uenb
                - biko
                - bkv
            - type: 'null'
          title: Role
        control_areas:
          items:
            type: string
          type: array
          title: Control Areas
        status:
          type: string
          enum:
            - rejected
            - pending
            - established
            - complete
            - zugeordnet
            - contacted
            - none
            - ausgenommen
          title: Status
          description: the Marktpartner overview's
        partin_sent_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Partin Sent At
          description: our PARTIN, UTC
        partin_received_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Partin Received At
          description: theirs, UTC
        partin_ack_positive_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Partin Ack Positive At
        partin_rejected_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Partin Rejected At
        partin_rejection_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Partin Rejection Code
        partin_rejection_label_de:
          anyOf:
            - type: string
            - type: 'null'
          title: Partin Rejection Label De
        partin_rejection_label_en:
          anyOf:
            - type: string
            - type: 'null'
          title: Partin Rejection Label En
        zuordnung_sent_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Zuordnung Sent At
        zuordnung_ack_positive_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Zuordnung Ack Positive At
        erstkontakt:
          anyOf:
            - type: string
              enum:
                - sent
                - answered
                - confirmed
            - type: 'null'
          title: Erstkontakt
          description: the first contact by plain mail
        last_contact_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Contact At
        datasheet:
          anyOf:
            - $ref: '#/components/schemas/PartinDatasheet'
            - type: 'null'
          description: 'none: no datasheet in the last 180 days'
      additionalProperties: false
      type: object
      required:
        - mp_id
        - name
        - role
        - control_areas
        - status
        - partin_sent_at
        - partin_received_at
        - partin_ack_positive_at
        - partin_rejected_at
        - partin_rejection_code
        - partin_rejection_label_de
        - partin_rejection_label_en
        - zuordnung_sent_at
        - zuordnung_ack_positive_at
        - erstkontakt
        - last_contact_at
        - datasheet
      title: PartinPartner
    PartinDatasheet:
      properties:
        received_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Received At
          description: UTC
        via:
          anyOf:
            - type: string
              enum:
                - as4
                - email
                - zentrale
            - type: 'null'
          title: Via
        reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Reference
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
        pruefidentifikator:
          anyOf:
            - type: string
            - type: 'null'
          title: Pruefidentifikator
        older:
          type: integer
          title: Older
          description: how many older datasheets it replaced
        company:
          $ref: '#/components/schemas/PartinCompany'
        website:
          anyOf:
            - type: string
            - type: 'null'
          title: Website
        vat_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Vat Id
        contacts:
          items:
            $ref: '#/components/schemas/PartinContact'
          type: array
          title: Contacts
      additionalProperties: false
      type: object
      required:
        - received_at
        - via
        - reference
        - version
        - pruefidentifikator
        - older
        - company
        - website
        - vat_id
        - contacts
      title: PartinDatasheet
      description: The partner's newest PARTIN to the BKV.
    PartinCompany:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        street:
          anyOf:
            - type: string
            - type: 'null'
          title: Street
        house_number:
          anyOf:
            - type: string
            - type: 'null'
          title: House Number
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
      additionalProperties: false
      type: object
      required:
        - name
        - street
        - house_number
        - postal_code
        - city
        - country
      title: PartinCompany
    PartinContact:
      properties:
        function_code:
          type: string
          title: Function Code
          description: NAD qualifier, e.g. Z21
        function_de:
          type: string
          title: Function De
        function_en:
          type: string
          title: Function En
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: the unit or person the block names
        phones:
          items:
            type: string
          type: array
          title: Phones
        emails:
          items:
            type: string
          type: array
          title: Emails
        faxes:
          items:
            type: string
          type: array
          title: Faxes
      additionalProperties: false
      type: object
      required:
        - function_code
        - function_de
        - function_en
        - name
        - phones
        - emails
        - faxes
      title: PartinContact
      description: One contact block of the datasheet, as the partner sent it.
  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.