MPF Endpoints
Auth
The trigger endpoints take a Bearer token of a client_credentials client listed in MPF_TRIGGER_CLIENT_IDS. Mint the token from Aidbox:
POST /auth/token
Content-Type: application/json
{ "grant_type": "client_credentials", "client_id": "mpf-sync", "client_secret": "<secret>" }
POST /admin/mpf/sync
The full run: export, filter, bundle, publish. CMS crawls the registered URLs daily, so schedule a daily run.
Body
All fields are optional. Together they select which of the publications configured under Settings → MPF (see MPF Publications) to regenerate. An empty body regenerates all of them; a selector that matches no configured publication is rejected with 400.
| Field | Description |
|---|---|
contract | Contract ID of a configured publication (H followed by digits). Omit to run every contract of the selected year(s). |
year | Contract year (2024–2099). Omit to run every configured year. CMS reads one URL per contract and year, so each pair is its own publication. |
Example
POST /admin/mpf/sync
Authorization: Bearer <token>
Content-Type: application/json
{ "contract": "H1234", "year": 2026 }
{
"status": "accepted",
"publications": [{ "contract": "H1234", "year": 2026 }],
"generationTime": "2026-06-12T06:15:00.000Z",
"runLog": "_runlogs/2026-06-12T06-15-00-000Z_sync.log",
"message": "Sync started: Aidbox $export → poll → one pipeline per publication. Watch pod logs or GET /admin/mpf/runs."
}
POST /admin/mpf/refresh
A debugging shortcut: skips the $export (where a full sync spends most of its time) and rebuilds bundles from a previous export. Answers 404 when the folder has no files.
Body
| Field | Description |
|---|---|
folder (required) | A previous export's folder in the source bucket. The portal re-signs its files through Aidbox and rebuilds the bundles. |
contract | Same value as of the sync that needs to be re-bundled. |
year | Same value as of the sync that needs to be re-bundled. |
Example
POST /admin/mpf/refresh
Authorization: Bearer <token>
Content-Type: application/json
{ "folder": "20260610_1ebb44dd-5669-4181-a7b2-1b72d116a7eb" }
{
"status": "accepted",
"contract": "H1234",
"year": 2026,
"folder": "20260610_1ebb44dd-5669-4181-a7b2-1b72d116a7eb",
"generationTime": "2026-06-12T10:30:00.000Z",
"message": "Refresh started from export folder (re-sign + re-bundle). Watch pod logs."
}
GET /mpf-provider-directory/{contract}/{year}/{file}
Public, no auth: the endpoint CMS crawls. Proxies the storage bucket (which can stay private) and supports conditional GET, so repeat crawls only download files that changed. index.json lists the bundle URLs. The resources inside the bundles conform to the Plan-Net profiles.
GET /mpf-provider-directory/H1234/2026/index.json
GET /mpf-provider-directory/H1234/2026/PractitionerRole-001.json
| Status | Meaning |
|---|---|
200 | File served. |
304 | Unchanged since the crawler's last visit (If-None-Match / If-Modified-Since). |
404 | Unknown path, nothing published yet, or a publish in progress. |
502 | Signing or storage failed. The body says which: Failed to obtain signed download URL (check the access policy and MPF_EXPORT_CLIENT_*) or Upstream storage error (check the bucket). |
503 | MPF_STORAGE_* is not set on the portal. |
{
"provider_urls": [
"https://<public base>/H1234/2026/InsurancePlan-001.json",
"https://<public base>/H1234/2026/Organization-001.json"
]
}