GET /mpan/v1/{mpid}/portfolio-mpans
Returns gained MPANs, Change of Supplier processes or distinct MPANs with Change of Agent started in the period.
Request
Method and path:
GET /mpan/v1/{mpid}/portfolio-mpans
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:
kind(required):newly-gained,change-of-supplierorchange-of-agent.from_dateandto_date(required): inclusive UTC dates, maximum 3660 days.to_datemust be on or afterfrom_dateand before9999-12-31.q(optional): string, maximum 200 characters, default empty string. Literal MPAN substring search; outer whitespace is trimmed.%and_are literal characters.limit(optional): integer, minimum 1, maximum 200, default 25.offset(optional): integer, minimum 0, default 0.
Request body:
- None.
Response
Success:
200 OK
{
"data": [
{
"mpan_core": 1234567890123,
"postcode": null,
"supply_start_date": null,
"process_id": "00000000-0000-4000-8000-000000000001",
"started_at": "2026-10-18T08:30:00Z",
"appointment_type": "data-service-appointment",
"oldest_pending_since": null,
"pending_appointments": []
}
],
"total_count": 1,
"limit": 25,
"offset": 0,
"has_more": false
}
Notes:
- Gains and Change of Agent return one row per MPAN; Change of Supplier returns one row per started process. Search and date filters apply before counting and pagination.
- Gains use portfolio summary qualification and the latest qualifying supply start per MPAN in the range.
- Changes use
process_started_timestamp, regardless of current status. Change of Agent uses portfolio summary qualification and selects the latest qualifying process per MPAN within the period, with ties ordered by process ID descending.appointment_typeidentifies the selected appointment; other kinds return null. - Gains sort by supply start descending, then MPAN ascending. Changes sort by start timestamp descending, then process ID descending.
oldest_pending_sinceandpending_appointmentsretain defaults of null and[]for all kinds.- Empty and out-of-range pages return
200 OKwithdata: [].
Other documented responses:
400 Bad Requestfor invalid date ranges.401/403for authentication or supplier-access failures.422 Unprocessable Entityfor missing or malformed dates, invalidkind,qlonger than 200 characters,limitoutside 1–200, or negativeoffset.
Field-level constraints: