Reference

Deep reference for parsing, validation, builders, the platform API, and every process.

The reference layer beneath the guides: EDIFACT parsing, validation and message builders via edi-energy (including the Platform struct for multi-party use), the BDEW AS4 profile that carries those messages, the catalogue of every MaKo process, Redispatch 2.0, DVGW gas transport, and the makotest Python toolkit for testing against all of it.

The pages

PageRead it for
ParsingTurning EDIFACT bytes into typed messages — every entry point, the DoS limits, the error variants
ValidationWhat "valid" means: the three layers, the report API, rule ids
BuildersConstructing a message that validates, with the type-state builders
PlatformMulti-tenant and test-isolated profile registries, instead of the global one
Process catalogueEvery MaKo process: who starts it, which messages flow, which Frist applies, what mako implements
Redispatch 2.0The XML document family, the workflows, and the BilAReM regime
DVGW EDIGas transport messages (ALOCAT, NOMINT, NOMRES, SSQNOT)
BDEW AS4The transport that carries every EDIFACT interchange between market partners
makotestWriting tests in Python against the real Fristen and the real validator

Two pages are large enough to be used as lookup tables rather than read end to end: the process catalogue, which is ordered by regulatory framework, and the PID reference over in Regulatory, which maps every Prüfidentifikator to the crate and workflow that owns it.

Vocabulary

German market communication has a small, load-bearing vocabulary. These terms recur on every page below. Fuller definitions, with the identifier formats and the check-digit rules, are in the glossary.

TermWhat it is
MaKoMarktkommunikation — the regulated message exchange between market participants, prescribed by BNetzA Festlegungen
Prüfidentifikator (PID)A five-digit number identifying one business case, e.g. 55001 Lieferbeginn Strom. It selects the AHB column a message is validated against, and the workflow that handles it
AHBAnwendungshandbuch — one column per Prüfidentifikator, saying what that case must, may and must not send
MIGNachrichtenimplementierungshandbuch — the message structure itself: segments, groups, data elements, code lists. One per message type
EBDEntscheidungsbaumdiagramm — a BDEW decision tree (E_0406, E_0623, …) whose leaves are the Antwortcodes (A01, A50, …) an answer may carry
Marktlokation (MaLo)Where energy is consumed or produced, as the market accounts for it — an 11-digit id. Not a meter
Messlokation (MeLo)Where a meter sits — a 33-character Zählpunktbezeichnung. Several MeLo can serve one MaLo
BilanzkreisThe balancing account energy is booked to. Every MaLo is assigned to one; the BKV answers for its balance
Frist / WerktagA regulatory deadline, counted in Werktage (business days) on the BDEW calendar — not in calendar days, and not in the local Bundesland's holidays
SparteStrom or Gas. The same business process usually has a separate PID band per Sparte

See Domain model for the identifier formats and check digits, and Dates and days for what "today" means in a market date.

The four market roles

Every process is a conversation between two of these (full role table):

RoleMarktrolleAnswers for
LFLieferantSupplying the customer — the retail contract, the Bilanzkreis, the invoice
NBNetzbetreiberThe grid the MaLo hangs on — access, grid charges, and most of the confirmations
MSBMessstellenbetreiberThe meter — installing it, reading it, and delivering the values
BKVBilanzkreisverantwortlicherA Bilanzkreis's balance against the ÜNB

A deployment is scoped to the roles it plays, and a role build contains no other arm's code — informatorische Entflechtung, § 6a EnWG.

The 17 EDIFACT message types

edi-energy ships a generated MIG and AHB for each:

MessageCarries
UTILMDStammdaten and the master-data processes — Lieferbeginn, Kündigung, MSB-Wechsel. The largest family by far
MSCONSMetered values — Zählerstände, Lastgänge, Zählerstandsgänge
INVOICInvoices — grid charges, MSB charges, retail, Mehr-/Mindermengen
REMADVThe invoice answer: paid, or itemised rejection
COMDISHandelsunstimmigkeit — a dispute over a REMADV or an IFTSTA
APERAKApplication-level acknowledgement or rejection of a received message
CONTRLSyntax acknowledgement at interchange level. The only AHB with no Prüfidentifikatoren
ORDERSAn order — Sperrauftrag, Werteanforderung, Konfigurationsbestellung
ORDRSPThe answer to an order
ORDCHGA change to an order already placed
REQOTERequest for quotation — the ESA asking an MSB for a price
QUOTESThe quotation itself
PRICATPrice lists — Ausgleichsenergiepreise, MSB- and NB-Preisblätter
IFTSTAStatus reports — Sperrung/Entsperrung progress, WiM Umsetzungsstatus, Redispatch
INSRPTStörungsmeldung and Ablesesteuerung
PARTINKommunikationsdaten — who to reach at a market partner, and how
UTILTSBerechnungsformeln and Zählzeitdefinitionen between grid operators

The wire code is the one in UNH; the Cargo feature that compiles each type in is listed in crates/edi-energy/src/message_type.rs.