Skip to main content

Metering Service API Overview

Base route:

  • /metering-services/v1

Authentication:

  • Header X-API-KEY is required.
  • Header X-IDEMPOTENCY-KEY is 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

  1. Supplier submits POST /metering-services/v1/{mpid}/appoint.
  2. SSI validates request/auth/idempotency, checks for conflicting active MS appointment processes, and creates a Pending process.
  3. SSI sends outbound IF-031 (MSApp) to DIP.
  4. DIP returns IF-032 (initial response):
    • R (rejected) -> process ends Failed.
    • otherwise -> SSI waits for IF-035 appointment outcome.
  5. DIP returns IF-035:
    • R or L -> process ends Failed.
    • A (accepted) -> continue.
  6. Accepted branch handling:
    • update-of-service path can complete directly as Success.
    • standard appointment path waits for IF-036 active confirmation at the effective date/SLA.
    • migration CoA branch can also trigger D0151 de-appointment messaging for legacy MOP before completion.
  7. DIP returns IF-036 (active): SSI updates MPAN metering service fields and can create meter technical details from B905List payload data.
  8. 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.py
  • app/modules/supplier_process/schemas/metering_service_appointment/ms_appointment_schema.py
  • app/modules/supplier_process/schemas/supplier_process/supplier_process_schema.py
  • app/modules/supplier_process/infrastructure/supplier_process_model.py
  • app/modules/supplier_process/services/metering_service_appointment_manager.py