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

> Write the open-position CSV to the trader's sFTP drop directory.



## OpenAPI

````yaml /setup/internal-openapi.json post /v1/process/delivery-days/{delivery_day}/publish-open-position
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://{your-service-host}
    description: Deployed service
  - url: http://localhost:8000
    description: Local development
security: []
paths:
  /v1/process/delivery-days/{delivery_day}/publish-open-position:
    post:
      summary: Post Publish
      description: Write the open-position CSV to the trader's sFTP drop directory.
      operationId: >-
        post_publish_v1_process_delivery_days__delivery_day__publish_open_position_post
      parameters:
        - name: delivery_day
          in: path
          required: true
          schema:
            type: string
            format: date
            title: Delivery Day
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    PublishResponse:
      properties:
        delivery_day:
          type: string
          format: date
          title: Delivery Day
        csv_remote_path:
          type: string
          title: Csv Remote Path
        total_open:
          items:
            type: number
          type: array
          title: Total Open
      type: object
      required:
        - delivery_day
        - csv_remote_path
        - total_open
      title: PublishResponse
      description: 'Result of the open-position publication step (scope: process).'
    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

````