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

# Post Zuordnung

> Build the Zuordnungsermaechtigung and deliver it to the NB via the
MakoFlow AS4 gateway; the exact interchange lands in the audit trail.



## OpenAPI

````yaml /setup/internal-openapi.json post /v1/process/zuordnungsermaechtigungen
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/zuordnungsermaechtigungen:
    post:
      summary: Post Zuordnung
      description: |-
        Build the Zuordnungsermaechtigung and deliver it to the NB via the
        MakoFlow AS4 gateway; the exact interchange lands in the audit trail.
      operationId: post_zuordnung_v1_process_zuordnungsermaechtigungen_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ZuordnungRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZuordnungSendResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    ZuordnungRequest:
      properties:
        action:
          type: string
          enum:
            - activate
            - deactivate
          title: Action
          default: activate
        receiver_mp_id:
          type: string
          title: Receiver Mp Id
          description: MP-ID of the NB (Netzbetreiber)
        bilanzierungsgebiet_eic:
          type: string
          title: Bilanzierungsgebiet Eic
          description: EIC Y code of the NB's Bilanzierungsgebiet
        zeitreihentypen:
          items:
            type: string
          type: array
          minItems: 1
          title: Zeitreihentypen
          description: ZRT codes, one Vorgang each (e.g. value-based types)
        valid_from:
          type: string
          format: date
          title: Valid From
          description: >-
            Effective day (midnight Europe/Berlin). Activation may be
            retroactive to the 1st of the current balancing month; deactivation
            only ever to the 1st of a month.
        bilanzkreis_eic:
          anyOf:
            - type: string
            - type: 'null'
          title: Bilanzkreis Eic
        lieferant_mp_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Lieferant Mp Id
      type: object
      required:
        - receiver_mp_id
        - bilanzierungsgebiet_eic
        - zeitreihentypen
        - valid_from
      title: ZuordnungRequest
      description: |-
        One Zuordnungsermaechtigung: the BKV permits an NB to let a supplier
        assign market locations of the named time-series types to our balance
        group (MaBiS ch. 10.2/10.3, UTILMD PID 55071/55072).

        ``bilanzkreis_eic`` and ``lieferant_mp_id`` fall back to the configured
        balance group of the home control area and the configured supplier, so
        the routine call only names the NB, its Bilanzierungsgebiet, the
        time-series types and the effective date.
    ZuordnungSendResponse:
      properties:
        pruefidentifikator:
          type: string
          title: Pruefidentifikator
        receiver_mp_id:
          type: string
          title: Receiver Mp Id
        zeitreihentypen:
          items:
            type: string
          type: array
          title: Zeitreihentypen
        valid_from:
          type: string
          format: date
          title: Valid From
        ingress_status:
          type: integer
          title: Ingress Status
        status:
          type: string
          const: sent
          title: Status
          default: sent
      type: object
      required:
        - pruefidentifikator
        - receiver_mp_id
        - zeitreihentypen
        - valid_from
        - ingress_status
      title: ZuordnungSendResponse
    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

````