Skip to main content

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-KEY or Authorization: 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 after from_date, before 9999-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 Success Change of Supplier process, data status active, ended or inactive, and registration status Active, SecuredInactive or Inactive. Dates apply to supply start; historical gains remain eligible after loss.
  • Change of Agent includes metering-service and data-service appointments with scenario CSP or MCA, 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 OK with zero counts.

Other documented responses:

  • 400 Bad Request for reversed dates, a period exceeding 3660 calendar days, or to_date=9999-12-31.
  • 401/403 for authentication or supplier-access failures.
  • 422 Unprocessable Entity for missing or invalid dates.

Field-level constraints: