---
title: "Validate an Energy Sharing community application (§ 42c EnWG)"
method: POST
path: "/api/energy-sharing/validate"
tags: ["Energy Sharing Validation"]
---

# Validate an Energy Sharing community application (§ 42c EnWG)

`POST /api/energy-sharing/validate`

## Request

- Base URL: `https://api.cernion.de`
- URL: `https://api.cernion.de/api/energy-sharing/validate`
- Auth: none declared

Executes a deterministic 6-step Energy Sharing validation pipeline: identity → generators → directMarketer → eligibility → decision → audit. Validates generator MaStR records, direct marketer status (§ 21 Abs. 2 EEG), share allocations, and § 42c EnWG eligibility criteria. Results are persisted to the validation database and retrievable via GET /validations/:id.

## Query parameters

- `token` string

## Request body

- object
  - `gridOperatorId` string: MaStR grid operator ID (SNB...)
  - `gridOperatorBdew` string: 13-digit BDEW market-partner code
  - `communityName` string: Name of the Energy Sharing community
  - `communityId` string: External community ID assigned by the VNB
  - `generators` object[]: List of generator participants with mastrNummer, sharePercent, optional direktvermarkter
  - `consumers` object[]: List of consumer participants with maloId, sharePercent, optional name
  - `maxAgeMinutes` integer: Datapoint freshness threshold for Weg B (minutes)
  - `datapointTags` string[]: Tags for datapoint snapshot (Weg B fallback)
  - `token` string: Optional Cernion MCP token for this request. Overrides CERNION_TOKEN when provided.

## Response `200`

EnergyShareValidationReport with findings from all 6 pipeline steps

## Other responses

- `202`: REST/Gateway call accepted as async job. Poll /api/jobs/:jobId/status and /api/jobs/:jobId/result.

---

[API](https://skmtc.dev/cernion/apis/cernion-energy-tools-api.md) · [All operations](https://skmtc.dev/cernion/apis/cernion-energy-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cernion/apis/cernion-energy-tools-api/revisions/cdb94473b538?raw)
