Metering Service API Overview
Base route:
/metering-services/v1
Authentication:
- Header
X-API-KEYis required. - Header
X-IDEMPOTENCY-KEYis required on the appointment endpoint.
Description
The Metering Service Appointment process appoints or updates metering services for a single MPAN and tracks the market workflow to completion. SSI sends outbound appointment messages to DIP, processes inbound appointment outcomes, updates MPAN metering service fields, and supports migration/deappointment branches where required.
Process Overview
- Supplier submits
POST /metering-services/v1/{mpid}/appoint. - SSI validates request/auth/idempotency, checks for conflicting active MS appointment processes, and creates a
Pendingprocess. - SSI sends outbound
IF-031(MSApp) to DIP. - DIP returns
IF-032(initial response):R(rejected) -> process endsFailed.- otherwise -> SSI waits for
IF-035appointment outcome.
- DIP returns
IF-035:RorL-> process endsFailed.A(accepted) -> continue.
- Accepted branch handling:
- update-of-service path can complete directly as
Success. - standard appointment path waits for
IF-036active confirmation at the effective date/SLA. - migration CoA branch can also trigger
D0151de-appointment messaging for legacy MOP before completion.
- update-of-service path can complete directly as
- DIP returns
IF-036(active): SSI updates MPAN metering service fields and can create meter technical details fromB905Listpayload data. - SSI marks the process
Success. Additional linked/deappointment-all branches (IF-003,IF-037, DTN messages) are handled where applicable.
Process Diagram
Endpoints
POST /metering-services/v1/{mpid}/appoint: appoint a metering service for one MPAN.
Docs in this section
Source of truth in backend:
app/modules/supplier_process/api/metering_service_appointment_v1.pyapp/modules/supplier_process/schemas/metering_service_appointment/ms_appointment_schema.pyapp/modules/supplier_process/schemas/supplier_process/supplier_process_schema.pyapp/modules/supplier_process/infrastructure/supplier_process_model.pyapp/modules/supplier_process/services/metering_service_appointment_manager.py