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

# Create Schedule

> Create a new [Schedule](/api-reference/schedule-management/models/schedule) or a new [Schedule Version](/api-reference/schedule-management/models/schedule-version) of an existing schedule.

Re-submitting for the same TSO + delivery date creates a new version. The TSO message ID is reused with an incremented version number as required by market rules (MaBiS for DE, MMC Hub for NL).

**Submission flow** 1. Validate gate closure (skipped when `test=true`) 2. Validate EIC codes, business types, and interval counts 3. Build ESS XML (DE) or CIM XML (NL) 4. Submit to TSO via AS4 messaging 5. Create audit event 6. Return the created schedule version

**Gate closure (DE, per AG-FPM)** - Day-ahead: open until D-1 14:30 CET for all series types - DA matching (D-1 14:30–16:00 CET): internal series accepted; external/foreign corrections only - Intraday: D-1 16:00 CET until GCT (15-minute lead time for external/foreign)

**Gate closure (NL)** - Day-ahead window: D-2 10:00 CET to D-1 15:00 CET



## OpenAPI

````yaml /openapi.json post /schedule-management/v1/schedules
openapi: 3.1.0
info:
  title: Engrate API
  version: 1.0.0
servers:
  - url: https://api.engrate.io
security:
  - apiKeyAuth: []
paths:
  /schedule-management/v1/schedules:
    post:
      tags:
        - schedules
      summary: Create Schedule
      description: >-
        Create a new
        [Schedule](/api-reference/schedule-management/models/schedule) or a new
        [Schedule
        Version](/api-reference/schedule-management/models/schedule-version) of
        an existing schedule.


        Re-submitting for the same TSO + delivery date creates a new version.
        The TSO message ID is reused with an incremented version number as
        required by market rules (MaBiS for DE, MMC Hub for NL).


        **Submission flow** 1. Validate gate closure (skipped when `test=true`)
        2. Validate EIC codes, business types, and interval counts 3. Build ESS
        XML (DE) or CIM XML (NL) 4. Submit to TSO via AS4 messaging 5. Create
        audit event 6. Return the created schedule version


        **Gate closure (DE, per AG-FPM)** - Day-ahead: open until D-1 14:30 CET
        for all series types - DA matching (D-1 14:30–16:00 CET): internal
        series accepted; external/foreign corrections only - Intraday: D-1 16:00
        CET until GCT (15-minute lead time for external/foreign)


        **Gate closure (NL)** - Day-ahead window: D-2 10:00 CET to D-1 15:00 CET
      operationId: create_schedule_schedule_management_v1_schedules_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduleCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleVersionResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    ScheduleCreateRequest:
      additionalProperties: false
      description: Request body for creating a new schedule.
      properties:
        date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          description: >-
            Delivery date (YYYY-MM-DD). If omitted, derived from the first
            timestamp in series data (UTC → Europe/Berlin). Example: omit when
            the first series timestamp is '2026-01-23T23:00:00Z' (= 2026-01-24
            00:00 Berlin time) to get delivery date 2026-01-24.
          title: Date
        market:
          description: >-
            Electricity market. Valid values: 'DE' or 'germany' (German market,
            MaBiS/ESS), 'NL' or 'netherlands' (Dutch market, TenneT MMC Hub).
          enum:
            - DE
            - NL
            - germany
            - netherlands
          title: Market
          type: string
        receiver_id:
          description: >-
            EIC X code (organization code) of the receiving TSO. DE values by
            TSO — '50HERTZ_DE_TSO': '10XDE-VE-TRANSMK', 'DE-AMPRION-TSO':
            '10XDE-RWENET---W', 'TTG_DE': '10XDE-EON-NETZ-C',
            'DE-TRANSNETBWTSO': '10XDE-ENBW--TNGX'. NL: EAN-13 code of TenneT
            NL: '8716867999983'.
          minLength: 1
          title: Receiver Id
          type: string
        series:
          description: >-
            Time series to submit (0–50). DE requires at least 1 series. NL
            allows an empty list for zero-schedule or cancellation submissions.
          items:
            $ref: '#/components/schemas/ScheduleVersionSeriesItem-Input'
          maxItems: 50
          title: Series
          type: array
        test:
          default: false
          description: >-
            If true, skip gate closure validation. Use in development/testing to
            submit outside normal market windows.
          title: Test
          type: boolean
        tso:
          description: >-
            TSO identifier. DE values: '50HERTZ_DE_TSO' (50Hertz),
            'DE-AMPRION-TSO' (Amprion), 'TTG_DE' (TenneT DE), 'DE-TRANSNETBWTSO'
            (TransnetBW). NL value: 'TENNET_TSO' (TenneT NL).
          minLength: 1
          title: Tso
          type: string
      required:
        - market
        - receiver_id
        - series
        - tso
      title: ScheduleCreateRequest
      type: object
    ScheduleVersionResponse:
      description: >-
        A [Schedule
        Version](/api-reference/schedule-management/models/schedule-version)
        representing one submission attempt. Each re-submission creates a new
        version.
      example:
        acceptance_level: cnf
        created_ts: '2026-03-25T14:00:00+00:00'
        is_active: true
        last_modified_ts: '2026-03-25T14:05:00+00:00'
        message_id: MSG-20260325-001
        nrr_received: true
        org_uid: 9b2e4d8f-1c3a-4f5e-8d7b-6a9e0f2c1b3d
        schedule_uid: f47ac10b-58cc-4372-a567-0e02b2c3d479
        spec:
          market: DE
          receiver_id: 10XDE-VE-TRANSMK
          sender_id: 11XDE-SENDER---A
          series: []
          tso: 50HERTZ_DE_TSO
        status: accepted
        transmission_report_id: TR-20260325-001
        uid: c8d7e6f5-4a3b-4c2d-9e1f-0a8b7c6d5e4f
        version: 1
      properties:
        acceptance_level:
          description: 'Highest acceptance level reached: empty string, `ack`, or `cnf`.'
          examples:
            - cnf
            - ack
            - ''
          title: Acceptance Level
          type: string
        created_ts:
          description: ISO 8601 datetime when this version was created.
          examples:
            - '2026-03-25T14:00:00+00:00'
          title: Created Ts
          type: string
        is_active:
          default: true
          description: >-
            Whether this version is the active one according to the
            authoritative TSO message ID. Older versions become inactive when a
            new version is accepted.
          title: Is Active
          type: boolean
        last_modified_ts:
          description: ISO 8601 datetime of the most recent status change.
          examples:
            - '2026-03-25T14:05:00+00:00'
          title: Last Modified Ts
          type: string
        message_id:
          anyOf:
            - type: string
            - type: 'null'
          description: TSO document identification assigned to this version's message.
          examples:
            - MSG-20260325-001
          title: Message Id
        nrr_received:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether a Non-Repudiation of Receipt (NRR) delivery confirmation has
            been received from the TSO.
          title: Nrr Received
        org_uid:
          description: Organization that owns this version.
          examples:
            - 9b2e4d8f-1c3a-4f5e-8d7b-6a9e0f2c1b3d
          title: Org Uid
          type: string
        schedule_uid:
          description: >-
            Parent
            [Schedule](/api-reference/schedule-management/models/schedule)
            identifier.
          examples:
            - f47ac10b-58cc-4372-a567-0e02b2c3d479
          title: Schedule Uid
          type: string
        spec:
          $ref: '#/components/schemas/ScheduleVersionSpec'
          description: >-
            Full submission specification including market routing and series
            references.
        status:
          description: >-
            Processing status: `ingested`, `submitted`, `accepted`, `rejected`,
            `cnf_partial`, or `icnf`.
          examples:
            - accepted
            - submitted
            - rejected
          title: Status
          type: string
        transmission_report_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Mako365/AS4 transmission report identifier for delivery tracking.
          examples:
            - TR-20260325-001
          title: Transmission Report Id
        uid:
          description: Unique identifier for this version.
          examples:
            - c8d7e6f5-4a3b-4c2d-9e1f-0a8b7c6d5e4f
          title: Uid
          type: string
        version:
          description: >-
            Sequential version number (1-based). Increments with each
            re-submission.
          examples:
            - 1
            - 2
            - 3
          title: Version
          type: integer
        warnings:
          anyOf:
            - items:
                $ref: '#/components/schemas/WarningItem'
              type: array
            - type: 'null'
          description: TSO warnings from the ACK response, if any.
          title: Warnings
      required:
        - acceptance_level
        - created_ts
        - last_modified_ts
        - org_uid
        - schedule_uid
        - spec
        - status
        - uid
        - version
      title: ScheduleVersionResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ScheduleVersionSeriesItem-Input:
      additionalProperties: false
      description: Time series item within a schedule version.
      properties:
        data:
          description: >-
            Interval data points (1–100). Exact count is validated per delivery
            date accounting for DST: 96 normal day, 92 spring, 100 fall.
          items:
            $ref: '#/components/schemas/ScheduleSeriesDataPoint-Input'
          maxItems: 100
          minItems: 1
          title: Data
          type: array
        ids:
          $ref: '#/components/schemas/ScheduleSeriesIds-Input'
        type:
          description: >-
            Series type. 'production': own generation injected into the grid.
            'consumption': own load withdrawn from the grid. 'internal': trade
            within the same TSO control area. 'external': cross-border trade
            between two TSO areas (requires market_agreement_id). 'foreign':
            cross-border trade where your party is not a direct market
            participant (requires market_agreement_id). Note: external/foreign
            schedules are subject to the DA matching gate at D-1 14:30 CET.
          enum:
            - production
            - consumption
            - internal
            - external
            - foreign
          title: Type
          type: string
      required:
        - data
        - ids
        - type
      title: ScheduleVersionSeriesItem
      type: object
    ScheduleVersionSpec:
      description: >-
        The full specification that was submitted with a schedule version,
        including market routing and all series.
      properties:
        market:
          description: Target market (`DE` or `NL`).
          examples:
            - DE
          title: Market
          type: string
        receiver_id:
          description: EIC X code (DE) or EAN-13 (NL) identifying the TSO receiver.
          examples:
            - 10XDE-VE-TRANSMK
            - '8716867999983'
          title: Receiver Id
          type: string
        sender_id:
          description: EIC X code identifying the schedule sender.
          examples:
            - 11XDE-SENDER---A
          title: Sender Id
          type: string
        series:
          description: The individual time series included in this version (max 50).
          items:
            $ref: '#/components/schemas/ScheduleVersionSeriesItem-Output'
          maxItems: 50
          title: Series
          type: array
        tso:
          description: TSO identifier the schedule was sent to.
          examples:
            - 50HERTZ_DE_TSO
          title: Tso
          type: string
      required:
        - market
        - receiver_id
        - sender_id
        - series
        - tso
      title: ScheduleVersionSpec
      type: object
    WarningItem:
      description: A TSO warning returned in an ACK or CNF response (e.g. B45, A54).
      properties:
        code:
          description: Warning reason code from the TSO response.
          examples:
            - B45
            - A54
          title: Code
          type: string
        text:
          description: Human-readable warning description.
          examples:
            - Schedule values adjusted for DST transition
          title: Text
          type: string
      required:
        - code
        - text
      title: WarningItem
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    ScheduleSeriesDataPoint-Input:
      additionalProperties: false
      description: Single data point in a time series.
      properties:
        amount:
          description: Energy amount in MWh for this interval
          maximum: 99999.99
          minimum: -99999.99
          title: Amount
          type: number
        ts:
          description: >-
            Interval start timestamp (ISO 8601, UTC). Example:
            '2026-01-23T23:00:00Z' = 00:00 Berlin time on the delivery date.
          format: date-time
          title: Ts
          type: string
      required:
        - amount
        - ts
      title: ScheduleSeriesDataPoint
      type: object
    ScheduleSeriesIds-Input:
      additionalProperties: false
      description: Series party and area identifiers for schedule submission.
      properties:
        in_area:
          description: >-
            EIC Y code (16-character area code) of the receiving control area.
            DE TSO area codes: '10YDE-VE-------2' (50Hertz), '10YDE-RWENET---I'
            (Amprion), '10YDE-EON------1' (TenneT DE), '10YDE-ENBW-----N'
            (TransnetBW). NL: '10YNL----------L' (TenneT NL). Format: starts
            with '10Y', 16 characters total.
          title: In Area
          type: string
        in_party:
          description: >-
            Identifier of the receiving balance responsible party. Format is
            market-dependent: DE uses EIC X codes (16-character, e.g. '11X...'),
            NL uses EAN-13 codes (13 digits with check digit).
          title: In Party
          type: string
        market_agreement_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Market agreement identifier (Fahrplanvereinbarung). Required for
            'external' and 'foreign' series types. Assigned by the TSO when the
            cross-border trade agreement is registered.
          title: Market Agreement Id
        out_area:
          description: >-
            EIC Y code (16-character area code) of the sending control area. See
            in_area for valid TSO area codes. For internal series, in_area and
            out_area are typically the same TSO area.
          title: Out Area
          type: string
        out_party:
          description: >-
            Identifier of the sending balance responsible party. Format is
            market-dependent: DE uses EIC X codes (16-character, e.g. '11X...'),
            NL uses EAN-13 codes (13 digits with check digit). For
            production/consumption series, this is typically your own party code
            as registered with the TSO.
          title: Out Party
          type: string
      required:
        - in_area
        - in_party
        - out_area
        - out_party
      title: ScheduleSeriesIds
      type: object
    ScheduleVersionSeriesItem-Output:
      description: >-
        Series reference within a [Schedule
        Version](/api-reference/schedule-management/models/schedule-version)
        spec.
      properties:
        in_area:
          description: EIC Y code of the receiving control area.
          examples:
            - 10YDE-VE-------2
          title: In Area
          type: string
        in_party:
          description: EIC X code of the receiving party (balance responsible party).
          examples:
            - 11XDE-EXAMPLE--A
          title: In Party
          type: string
        out_area:
          description: EIC Y code of the sending control area.
          examples:
            - 10YDE-VE-------2
          title: Out Area
          type: string
        out_party:
          description: EIC X code of the sending party (balance responsible party).
          examples:
            - 11XDE-EXAMPLE--B
          title: Out Party
          type: string
        time_series_uid:
          description: Time series identifier used in the ESS/CIM document.
          examples:
            - TS-001
          title: Time Series Uid
          type: string
        ts_version:
          default: 1
          description: Per-series version number (`SendersTimeSeriesVersion` in ESS).
          examples:
            - 1
            - 2
          title: Ts Version
          type: integer
        type:
          description: >-
            Series type: `internal`, `external`, `foreign`, `production`, or
            `consumption`.
          examples:
            - internal
            - external
            - consumption
          title: Type
          type: string
        uid:
          description: Unique identifier for this series record.
          examples:
            - d1e2f3a4-b5c6-4d7e-8f9a-0b1c2d3e4f5a
          title: Uid
          type: string
      required:
        - in_area
        - in_party
        - out_area
        - out_party
        - time_series_uid
        - type
        - uid
      title: ScheduleVersionSeriesItem
      type: object
  securitySchemes:
    apiKeyAuth:
      in: header
      name: Authorization
      type: apiKey

````