KBP reads meter data from the Zaehldaten service at …/microservices/commodity/zaehldaten. The
service is deprecated. KBP calls it through the NuGet package
EnBW.Vertrieb.ServiceConsumer.Zaehldaten and uses two endpoints, both from
VertragsdatenHolenBase whenever contract data is loaded:
| Endpoint | Request | Purpose in KBP |
|---|---|---|
GET /vertraege/{vertragsnummer}/zaehler |
ZaehlerHolenRequest |
Meters and registers of a contract, for contracts that are awaiting delivery, in delivery, or ended |
GET /zaehler/{marketLocationIdentifier}/metrologicalclassification |
GetMetrologicalClassificationRequest |
Whether an electricity market location has an intelligent metering system |
Two replacements exist. KBP can read the data from EnwiCore directly, which it already calls
through the PowerCloud client. Or it can read the data from the Commodity Layer, which it already
calls through the Refit client ICommodityLayerApi for customers, contracts, readings, and
relocations. Which one should replace the Zaehldaten service?
Chosen option: Replace the Zaehldaten service with the Commodity Layer. The Commodity Layer and EnwiCore teams recommend it. They expect changes in both EnwiCore and the Commodity Layer, and they are currently adapting the EnwiCore interfaces themselves. So there is no stable EnwiCore target to migrate to yet, and they advise KBP to keep using the Commodity Layer.
The Commodity Layer offers counterparts for both calls:
| Zaehldaten service | Commodity Layer |
|---|---|
GET /vertraege/{vertragsnummer}/zaehler |
GET /api/contracts/{contract_id}/meters |
GET /zaehler/{marketLocationIdentifier}/metrologicalclassification |
GET /api/contracts/{contract_id}/market-location, field is_intelligent_meter_system |
The migration is done when EnBW.Vertrieb.ServiceConsumer.Zaehldaten and the Zaehldaten
configuration are removed from KBP. Revisit this decision when the Commodity Layer team announces
a stable EnwiCore target interface or a shutdown date for the Commodity Layer. A migration then
needs a new record that supersedes this one.