Docs / The stack
Contracts
Every role contract the platforms exchange: what it says, who emits and consumes it, the standard it profiles, and how to check a document against it.
A contract is data, not a crate: a JSON Schema with examples and cases it must refuse. Any system that emits or consumes one takes a role in the stack, whether it is one of the platforms, a vendor system behind an adapter, or something you write yourself.
Set the contract's URN as the CloudEvent's dataschema, under your own type. Consumers route on it, never on your type name.
Run the checker against your output in CI. It validates the schema and the profile's own rules.
Each profile's states, codes and mappings are in the contracts README; the envelope rules on Conventions.
Vendor the files you use, all at once from
contracts.tar.gz, and let CI compare your copy with the
served one.
Orders, products and visits
order@1
TMF622 Product Ordering v5 confidential · GDPRAn order handed to a contract system changed state.
urn:open-utility-stack:order:1
Schema
Example
Refused cases
also #/$defs/Request
uv run contracts/check.py order@1 your.json
product-lifecycle@1
TMF637 Product Inventory v5 confidential · GDPRA product (a supply contract, a line, a charging contract) changed state.
urn:open-utility-stack:product-lifecycle:1
uv run contracts/check.py product-lifecycle@1 your.json
product-notice@1
the stack's own confidential · GDPRA product's terms change or its term ends or renews while its state stays the same: a price change, the end of a fixed term, an automatic renewal, a move.
urn:open-utility-stack:product-notice:1
uv run contracts/check.py product-notice@1 your.json
appointment@1
TMF646 Appointment v4 confidential · GDPRA field visit was agreed, done, failed or called off.
urn:open-utility-stack:appointment:1
uv run contracts/check.py appointment@1 your.json
Charges, bills and collection
rated-charge@1
TMF635 Usage v5 confidential · GDPROne rated line for one settlement period, before invoice rounding.
urn:open-utility-stack:rated-charge:1
Schema Example reverse-chargenot-subjectcorrection Refused cases
uv run contracts/check.py rated-charge@1 your.json
bill-section@1
the stack's own confidential · GDPRWhat a contract engine contributes to a convergent bill: its section's heading and the texts and facts its sector's law requires on every bill (§ 40 EnWG for electricity and gas, § 62 TKG and the TK-Transparenzverordnung for telecoms, AVBWasserV, AVBFernwärmeV and FFVAV for water and heat).
urn:open-utility-stack:bill-section:1
uv run contracts/check.py bill-section@1 your.json
bill@1
TMF678 Customer Bill v5, with the EN 16931 invoice attached confidential · GDPRAn issued bill for one contract account: every sector's sections, each line rounded once, the VAT groups, the totals and what was prepaid.
urn:open-utility-stack:bill:1
uv run contracts/check.py bill@1 your.json
collection-terms@1
the stack's own confidential · GDPRThe rules under which an overdue claim from one contract may lead to a suspension of supply, as the contract's engine states them under its own law (§ 19 StromGVV and §§ 41f, 41g EnWG for electricity and gas, § 61 TKG, AVBFernwärmeV § 33, AVBWasserV § 33). The engine publishes it per contract or product; the account system (konto) evaluates it and proposes, never decides (D2). A suspension it proposes reaches the engine as an order@1 Request with a suspend item.
urn:open-utility-stack:collection-terms:1
uv run contracts/check.py collection-terms@1 your.json
Grid flexibility
flex-request@1
UFTP 3.1 FlexRequest (§ 4.2.24) internalA grid operator asks aggregators for flexibility on a congestion point: per ISP, the power range it can accept, and where it needs a deviation.
urn:open-utility-stack:flex-request:1
uv run contracts/check.py flex-request@1 your.json
flex-offer@1
UFTP 3.1 FlexOffer (§ 4.2.26) confidentialAn aggregator offers flexibility, answering a flex-request@1 or unsolicited: one or more priced options, of which the grid operator may order at most one.
urn:open-utility-stack:flex-offer:1
uv run contracts/check.py flex-offer@1 your.json
flex-prognosis@1
UFTP 3.1 D-Prognosis confidentialAn aggregator's D-Prognosis: the power it expects at one congestion point for one day, per ISP, before any order.
urn:open-utility-stack:flex-prognosis:1
uv run contracts/check.py flex-prognosis@1 your.json
flex-order@1
UFTP 3.1 FlexOrder (§ 4.2.27) confidentialA grid operator orders flexibility, usually one option of a flex-offer@1, at a share of it. A profile of UFTP 3.1 FlexOrder (§ 4.2.27). The activation it carries reaches devices as a limit or schedule.
urn:open-utility-stack:flex-order:1
uv run contracts/check.py flex-order@1 your.json
flex-settlement@1
UFTP 3.1 FlexOrderSettlement (§ 4.2.28), computed as § 2.6 confidentialThe settlement of one flex-order@1 for one day: per ISP, baseline, ordered, actual and delivered power and the deficiency, and the price less the penalty.
urn:open-utility-stack:flex-settlement:1
uv run contracts/check.py flex-settlement@1 your.json
flex-register@1
the stack's own confidential · GDPRA grid operator's registers of flexibility service providers and controllable units, as one data file it serves read-only (fms).
urn:open-utility-stack:flex-register:1
uv run contracts/check.py flex-register@1 your.json
Privacy
erasure@1
the stack's own confidential · GDPRA person's data was erased by the emitter, and every consumer that received data about them must erase or anonymise its copies (G7; Art. 17(2) and Art. 19 GDPR). The event names the person only by references consumers already hold.
urn:open-utility-stack:erasure:1
Schema
Example
Refused cases
also #/$defs/Confirmation
uv run contracts/check.py erasure@1 your.json
Shared definitions
What the profiles share. A profile refers to them by URN; you rarely validate against them alone.
common/money
An exact amount of money.
urn:open-utility-stack:common:money:1
common/time
Instants are UTC; business dates are civil dates in a named zone.
urn:open-utility-stack:common:time:1
common/reference
The client reference of a command (conventions REF-1 to REF-6) and the reference tuple of a market message (REF-7).
urn:open-utility-stack:common:reference:1
common/flex
What the four flexibility profiles share: the market context of a UFTP exchange, ISP spans and powers.
urn:open-utility-stack:common:flex:1