GET /mpan/v1/{mpid}/portfolio-summary
Returns distinct MPAN gains, Change of Supplier processes and distinct MPANs with Change of Agent started in the period, with daily activity.
Request
Method and path:
GET /mpan/v1/{mpid}/portfolio-summary
Headers:
X-API-KEYorAuthorization: Bearer <token>(one required). API key takes precedence when both are supplied.
Path parameters:
mpid(required): string supplier MPID authorized for the authenticated tenant.
Query parameters:
from_date(required): ISO 8601 date, inclusive first UTC calendar day.to_date(required): ISO 8601 date, inclusive last UTC calendar day; on or afterfrom_date, before9999-12-31. Maximum period: 3660 days.
Request body:
- None.
Response
Success:
200 OK
{
"from_date": "2026-10-18",
"to_date": "2026-10-19",
"newly_gained": 1,
"change_of_supplier": 2,
"change_of_agent": 1,
"daily_activity": [
{
"date": "2026-10-18",
"newly_gained": 0,
"change_of_supplier_started": 1,
"change_of_agent_started": 0
},
{
"date": "2026-10-19",
"newly_gained": 1,
"change_of_supplier_started": 1,
"change_of_agent_started": 1
}
]
}
Notes:
- Gains use non-initial cycles with a
SuccessChange of Supplier process, data statusactive,endedorinactive, and registration statusActive,SecuredInactiveorInactive. Dates apply to supply start; historical gains remain eligible after loss. - Change of Agent includes metering-service and data-service appointments with scenario
CSPorMCA, excluding de-appointments. - Changes use
process_started_timestamp, regardless of current status; null timestamps are excluded. Change of Supplier counts processes. Change of Agent counts each MPAN once, using its latest qualifying start within the period; ties use process ID descending. Daily starts sum to the corresponding period totals. - Gains count distinct MPANs within the period and separately per UTC day. Repeat gains on different days can make daily sums exceed
newly_gained. Daily activity includes zero days. - Empty results return
200 OKwith zero counts.
Other documented responses:
400 Bad Requestfor reversed dates, a period exceeding 3660 calendar days, orto_date=9999-12-31.401/403for authentication or supplier-access failures.422 Unprocessable Entityfor missing or invalid dates.
Field-level constraints: