> ## Documentation Index
> Fetch the complete documentation index at: https://docs.engrate.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit portfolio forecast

> Submit a portfolio forecast for one delivery day. Re-submitting for the same delivery day replaces the previous submission.



## OpenAPI

````yaml /portfolio-forecasts-openapi.json post /portfolio-forecasts/v1alpha1/submissions
openapi: 3.1.0
info:
  title: Engrate Portfolio Forecasts API
  version: v1alpha1
  description: >-
    Submit portfolio forecasts for a delivery day. This alpha API may change or
    be removed without notice.
servers:
  - url: https://api.engrate.io
security:
  - apiKeyAuth: []
paths:
  /portfolio-forecasts/v1alpha1/submissions:
    post:
      summary: Submit portfolio forecast
      description: >-
        Submit a portfolio forecast for one delivery day. Re-submitting for the
        same delivery day replaces the previous submission.
      operationId: submitPortfolioForecast
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ForecastRequest'
      responses:
        '200':
          description: Forecast accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForecastAck'
        '403':
          description: >-
            The authenticated organization is not authorized to submit
            forecasts.
        '422':
          description: Forecast validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Forecast submission is throttled.
          headers:
            Retry-After:
              schema:
                type: string
              description: Time to wait before retrying.
        '502':
          description: Forecast service unavailable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    const: Forecast service unavailable
                required:
                  - detail
        '504':
          description: Forecast service timed out.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    const: Forecast service timed out
                required:
                  - detail
components:
  schemas:
    ForecastRequest:
      type: object
      description: Portfolio production and consumption forecasts for one delivery day.
      properties:
        delivery_day:
          type: string
          format: date
        unit:
          type: string
          enum:
            - MW
            - MWH
          default: MW
        series:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/ForecastSeries'
        malo_mapping:
          anyOf:
            - type: object
              patternProperties:
                ^\d{11}$:
                  $ref: '#/components/schemas/ControlArea'
            - type: 'null'
          description: >-
            MaLo-to-control-area mapping, required when a series is tagged by
            MaLo.
      required:
        - delivery_day
        - series
    ForecastAck:
      type: object
      description: Acknowledgment of an accepted forecast submission.
      properties:
        delivery_day:
          type: string
          format: date
        interval_count:
          type: integer
        series_received:
          type: integer
        total_production_mwh:
          type: number
          description: Total production energy received for the delivery day, in MWh.
        total_consumption_mwh:
          type: number
          description: Total consumption energy received for the delivery day, in MWh.
        input_hash:
          type: string
          description: Content hash for change detection.
        status:
          type: string
          const: received
          default: received
      required:
        - delivery_day
        - interval_count
        - series_received
        - total_production_mwh
        - total_consumption_mwh
        - input_hash
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            type: object
            properties:
              loc:
                type: array
                items:
                  anyOf:
                    - type: string
                    - type: integer
              msg:
                type: string
              type:
                type: string
              input: {}
              ctx:
                type: object
            required:
              - loc
              - msg
              - type
    ForecastSeries:
      type: object
      description: >-
        A production or consumption series for the delivery day. Set exactly one
        of control_area or malo.
      properties:
        kind:
          type: string
          enum:
            - production
            - consumption
        control_area:
          anyOf:
            - $ref: '#/components/schemas/ControlArea'
            - type: 'null'
        malo:
          anyOf:
            - type: string
              pattern: ^\d{11}$
            - type: 'null'
          description: Eleven-digit market location ID.
        values:
          type: array
          items:
            type: number
          description: One value per quarter-hour from local midnight to midnight.
      required:
        - kind
        - values
    ControlArea:
      type: string
      enum:
        - 50Hertz
        - Amprion
        - TenneT
        - TransnetBW
      description: One of the four German TSO control areas.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````