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

# Re-deliver messages bounced over a registration problem

> A DSO that bounced our PARTIN or Zuordnungsermächtigung with
CONTRL error 23 / APERAK Z29 ("Absender unbekannt") often registers
us right after - their own PARTIN or a positive acknowledgment then
proves it. This sweep re-delivers the bounced message with a fresh
interchange reference, exactly once per standing rejection; CONTRL
error 26 (duplicate) is re-sent immediately. Business rejections are
never re-sent unchanged - they stay with the Korrektur mails.



## OpenAPI

````yaml /setup/internal-openapi.json post /v1/process/market-partners/nachversand
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/nachversand:
    post:
      summary: Re-deliver messages bounced over a registration problem
      description: |-
        A DSO that bounced our PARTIN or Zuordnungsermächtigung with
        CONTRL error 23 / APERAK Z29 ("Absender unbekannt") often registers
        us right after - their own PARTIN or a positive acknowledgment then
        proves it. This sweep re-delivers the bounced message with a fresh
        interchange reference, exactly once per standing rejection; CONTRL
        error 26 (duplicate) is re-sent immediately. Business rejections are
        never re-sent unchanged - they stay with the Korrektur mails.
      operationId: post_nachversand_v1_process_market_partners_nachversand_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NachversandRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NachversandResponse'
        '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:
    NachversandRequest:
      properties:
        dry_run:
          type: boolean
          title: Dry Run
          default: false
      type: object
      title: NachversandRequest
      description: |-
        Re-deliver messages bounced over a registration problem, once the
        partner demonstrably knows us. ``dry_run`` lists the candidates.
    NachversandResponse:
      properties:
        dry_run:
          type: boolean
          title: Dry Run
        targets:
          items:
            $ref: '#/components/schemas/NachversandZiel'
          type: array
          title: Targets
          description: Every standing registration-class rejection
        resent:
          items:
            $ref: '#/components/schemas/NachversandZiel'
          type: array
          title: Resent
          description: 'Re-deliveries that went out now (with dry_run: would)'
        skipped:
          items:
            $ref: '#/components/schemas/NachversandZiel'
          type: array
          title: Skipped
          description: Targets without a resend, each with the reason
      type: object
      required:
        - dry_run
        - targets
        - resent
        - skipped
      title: NachversandResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    NachversandZiel:
      properties:
        mp_id:
          type: string
          title: Mp Id
        name:
          type: string
          title: Name
        stream:
          type: string
          title: Stream
          description: '`partin` or `zuordnung`'
        rejected_at:
          type: string
          title: Rejected At
          description: When the standing rejection arrived
        reason:
          type: string
          title: Reason
          description: The rejection as recorded
        fall:
          type: string
          title: Fall
          description: >-
            `sofort` (error 26 - duplicate, resend immediately) or `nach_beleg`
            (error 23/Z29 - resend once newer positive evidence shows the
            partner knows us)
        delivered:
          items:
            type: string
          type: array
          title: Delivered
          description: >-
            What went out: `PARTIN`, or the Bilanzierungsgebiet EICs of the
            re-sent Zuordnungen (empty in dry_run and skips)
        skip:
          type: string
          title: Skip
          description: Why nothing was re-sent (only on skipped entries)
          default: ''
      type: object
      required:
        - mp_id
        - name
        - stream
        - rejected_at
        - reason
        - fall
      title: NachversandZiel
    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

````