> ## 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 Submit Schedules

> Build the balancing-group schedules and submit them to Engrate.



## OpenAPI

````yaml /setup/internal-openapi.json post /v1/process/delivery-days/{delivery_day}/submit-schedules
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}/submit-schedules:
    post:
      summary: Post Submit Schedules
      description: Build the balancing-group schedules and submit them to Engrate.
      operationId: >-
        post_submit_schedules_v1_process_delivery_days__delivery_day__submit_schedules_post
      parameters:
        - name: delivery_day
          in: path
          required: true
          schema:
            type: string
            format: date
            title: Delivery Day
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/SubmitSchedulesRequest'
                - type: 'null'
              title: Payload
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitSchedulesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    SubmitSchedulesRequest:
      properties:
        executed_epex_volume:
          anyOf:
            - items:
                type: number
              type: array
            - type: 'null'
          title: Executed Epex Volume
      type: object
      title: SubmitSchedulesRequest
      description: |-
        Input for the schedule submission step (scope: process).

        ``executed_epex_volume`` defaults to the requested total open position;
        pass the real EPEX fills to reflect actual execution.
    SubmitSchedulesResponse:
      properties:
        delivery_day:
          type: string
          format: date
          title: Delivery Day
        home_control_area:
          $ref: '#/components/schemas/ControlArea'
        schedules:
          items:
            $ref: '#/components/schemas/BalancingGroupScheduleOut'
          type: array
          title: Schedules
        balanced:
          type: boolean
          title: Balanced
        imbalances:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Imbalances
          description: Residual per (area, interval) where a group does not net to zero
        submission_accepted:
          type: boolean
          title: Submission Accepted
        submission_reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Submission Reference
        submission_detail:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Submission Detail
          description: >-
            Per-TSO result from the scheduling platform, including the rejection
            reason when a submission was not accepted
      type: object
      required:
        - delivery_day
        - home_control_area
        - schedules
        - balanced
        - submission_accepted
        - submission_reference
      title: SubmitSchedulesResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ControlArea:
      type: string
      enum:
        - 50Hertz
        - Amprion
        - TenneT
        - TransnetBW
      title: ControlArea
      description: The four German TSO control areas (Regelzonen).
    BalancingGroupScheduleOut:
      properties:
        control_area:
          $ref: '#/components/schemas/ControlArea'
        components:
          items:
            $ref: '#/components/schemas/ScheduleComponentOut'
          type: array
          title: Components
        balance:
          items:
            type: number
          type: array
          title: Balance
          description: Signed sum of all components per interval (zero when balanced)
      type: object
      required:
        - control_area
        - components
        - balance
      title: BalancingGroupScheduleOut
      description: |-
        A balancing-group schedule: production forecast, consumption forecast
        and all trades, aggregated per direction and counterparty.
    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
    ScheduleComponentOut:
      properties:
        kind:
          type: string
          title: Kind
        direction:
          type: string
          title: Direction
        counterparty_area:
          anyOf:
            - $ref: '#/components/schemas/ControlArea'
            - type: 'null'
        values:
          items:
            type: number
          type: array
          title: Values
      type: object
      required:
        - kind
        - direction
        - counterparty_area
        - values
      title: ScheduleComponentOut
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````