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

# Market communication: counts and standing rejections

> Status counts per control area and every standing rejection, told by
its stream and code - never the partner's text. Shared between callers
for 5 minutes.



## OpenAPI

````yaml /setup/internal-openapi.json get /v1/mobile/market-partners
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/market-partners:
    get:
      tags:
        - mobile
      summary: 'Market communication: counts and standing rejections'
      description: |-
        Status counts per control area and every standing rejection, told by
        its stream and code - never the partner's text. Shared between callers
        for 5 minutes.
      operationId: get_market_partners_v1_mobile_market_partners_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketPartners'
        '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'
        '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:
    MarketPartners:
      properties:
        generated_at:
          type: string
          format: date-time
          title: Generated At
        registry_stand:
          additionalProperties:
            anyOf:
              - type: string
                format: date
              - type: 'null'
          type: object
          title: Registry Stand
          description: the date of each TSO's registry list
        totals:
          $ref: '#/components/schemas/PartnerCounts'
          description: every registry partner once
        areas:
          items:
            $ref: '#/components/schemas/AreaPartners'
          type: array
          title: Areas
        rejected:
          items:
            $ref: '#/components/schemas/PartnerRejection'
          type: array
          title: Rejected
          description: newest first
      additionalProperties: false
      type: object
      required:
        - generated_at
        - registry_stand
        - totals
        - areas
        - rejected
      title: MarketPartners
    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.
    PartnerCounts:
      properties:
        rejected:
          type: integer
          title: Rejected
        pending:
          type: integer
          title: Pending
        established:
          type: integer
          title: Established
        complete:
          type: integer
          title: Complete
        zugeordnet:
          type: integer
          title: Zugeordnet
        contacted:
          type: integer
          title: Contacted
        none:
          type: integer
          title: None
        ausgenommen:
          type: integer
          title: Ausgenommen
      additionalProperties: false
      type: object
      required:
        - rejected
        - pending
        - established
        - complete
        - zugeordnet
        - contacted
        - none
        - ausgenommen
      title: PartnerCounts
    AreaPartners:
      properties:
        control_area:
          type: string
          title: Control Area
        counts:
          $ref: '#/components/schemas/PartnerCounts'
      additionalProperties: false
      type: object
      required:
        - control_area
        - counts
      title: AreaPartners
    PartnerRejection:
      properties:
        mp_id:
          type: string
          title: Mp Id
        name:
          type: string
          title: Name
        control_areas:
          items:
            type: string
          type: array
          title: Control Areas
        stream:
          type: string
          enum:
            - partin
            - zuordnung
            - transport
          title: Stream
        reason_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason Code
          description: >-
            an APERAK code (Z29) or a CONTRL syntax error (23), when the
            rejection names one
        reason_label_de:
          type: string
          title: Reason Label De
        reason_label_en:
          type: string
          title: Reason Label En
        at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: At
          description: UTC
      additionalProperties: false
      type: object
      required:
        - mp_id
        - name
        - control_areas
        - stream
        - reason_code
        - reason_label_de
        - reason_label_en
        - at
      title: PartnerRejection
      description: |-
        A standing rejection, told by its stream and code in fixed words -
        never the partner's own text. Names and MP-IDs are public registry data:
        for the app's screens, never for a widget, the watch or a lock screen.
  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.