GET /mpan/v1/{mpid}/analytics
Returns aggregate counts for the authenticated supplier's current MPAN portfolio. This is an as-of-now snapshot, not a dated activity report or a paginated MPAN list.
Request
Method and path:
GET /mpan/v1/{mpid}/analytics
Headers:
X-API-KEYorAuthorization: Bearer <access token>(one required). If both are supplied, the API key takes precedence.
Path parameters:
mpid(required): string supplier MPID. SSI verifies that the authenticated tenant can access it; the path value alone does not grant access.
Query parameters: none. Request body: none.
Response
Success:
200 OK
Illustrative empty-portfolio response:
{
"total": 0,
"market_segments": [],
"energisation": [],
"metered": [],
"gsp_areas": [],
"metering_agents": [],
"data_service_agents": [],
"mhhs_status": [
{ "label": "MHHS migrated", "count": 0 },
{ "label": "MHHS migration pending", "count": 0 },
{ "label": "MHHS missing", "count": 0 }
]
}
Each breakdown is an array of { "label": string, "count": integer } objects. Non-MHHS arrays contain only buckets present in the portfolio and sort by count descending, then label ascending. mhhs_status always contains all three buckets, including zero counts, in migrated → pending → missing order.
| Field | Meaning |
|---|---|
total | Distinct current supplier-owned MPANs. |
market_segments | Smart, Advanced, Unmetered or Unknown (missing or unrecognised segment). This is market segment, not the metered flag. |
energisation | Energised, De-energised or Unknown. |
metered | Metered, Unmetered or Unknown from the current metered indicator. |
gsp_areas | Current GSP group codes, or Unknown when absent. |
metering_agents, data_service_agents | Counts by current appointment agent name, or Unknown when no name/current appointment is available. |
mhhs_status | Three mutually exclusive portfolio MHHS migration-status categories described below. |
Population and as-of rules
The API ranks registration cycles across suppliers for each MPAN before restricting to the authenticated supplier. It includes the winning cycle only when it is currently effective, has registration status Active, and has data status active. Historical rows still participate in ranking so an older supplier cycle cannot reclaim an MPAN. Counts reflect the request time in UTC.
Each current state uses the latest effective row in the selected cycle whose effective-from is no later than the request time and whose effective-to is absent or later. Missing or unrecognised states are counted as Unknown. This population is intentionally stricter than the existing MPAN list endpoint's supplier-cycle selection, so totals can differ.
MHHS migration status
The three mhhs_status buckets partition total, with precedence in this order:
- MHHS migrated: the selected registration cycle has at least one active metering-service or data-service appointment effective at the request time.
- MHHS migration pending: no such active appointment exists, but the cycle has a pending qualifying Change of Agent appointment process.
- MHHS missing: neither condition holds. This includes points with only expired appointments unless a qualifying process is pending.
These labels represent the portfolio's MHHS migration status using the current appointment and qualifying Change of Agent process data held in SSI. A pending process is shown as migration pending until an active appointment is recorded.
Other documented responses:
401/403for authentication or supplier-access failures.
Field-level constraints: