PrimaryCheck

Payer enrollment and rosters

A payer is a plan or program you bill — Medicare, a state Medicaid program, a commercial plan — with its ids for you, its enrollment contacts, optional plans (products / networks) and the roster layout it wants. An enrollment is one subject with one payer (and optionally one plan): status, the payer's provider and group ids, submitted / effective / terminated / revalidation dates, document references and your metadata.

POST /v1/payers
{ "name": "Presbyterian Health Plan", "type": "commercial", "states": ["NM"],
  "payerIds": [ { "kind": "payer_id", "value": "PHP-4471" } ], "contacts": [ { "name": "Enrollment desk", "email": "enroll@php.example" } ] }

POST /v1/enrollments
{ "subjectId": "sub_…", "payerId": "pay_…", "planId": "plan_…", "status": "submitted", "submittedAt": "2026-10-01",
  "providerId": "PHP-77812", "groupId": "GRP-9", "documents": [ { "fileId": "file_…", "name": "CAQH attestation" } ] }

GET /v1/enrollments?status=active&revalidationWithinDays=90      soonest due first, overdue included
GET /v1/enrollments/summary                                        counts by status and payer; revalidation buckets

Medicare from CMS, one call

POST /v1/subjects/sub_…/enrollments/sync_medicare
{ "object": "medicare_sync", "status": "ok", "source": "US-CMS-PPEF", "dataAsOf": "2026-10-01T00:00:00+00:00", "npi": "1003000126",
  "enrolled": true, "created": 2, "updated": 0, "payerId": "pay_…",
  "enrollments": [ { "id": "enr_…", "source": "cms_ppef", "sourceRef": "I20031103000001", "status": "effective", "providerId": "8022920719",
                     "revalidationDueAt": "2027-03-31", "metadata": { "state": "NM", "providerType": "PRACTITIONER - INTERNAL MEDICINE", "specialty": "…" },
                     "sourceRecord": { … the PPEF enrollment and revalidation rows … } } ] }

The sync reads the CMS Public Provider Enrollment File joined with the Revalidation Due Date List by the subject's NPI and upserts one enrollment per PECOS enrollment id under your Medicare payer (created on first use). Re-syncing updates in place and restarts the reminder ladder when a due date moves.

Revalidation reminders

Every night the sweep looks at active enrollments with a revalidation date and announces the 120, 90, 60, 30 and 0-day marks once each: an enrollment.revalidation_due webhook and a revalidation_due alert in the same queue as licence expiries (warning, critical at 30 days or overdue). reminders on the enrollment shows what has been sent.

Payer-specific rosters

PATCH /v1/payers/pay_…
{ "rosterTemplate": { "delimiter": "pipe", "columns": [
    { "header": "NPI", "source": "subject.npi" }, { "header": "Provider Name", "source": "person.lastFirst" },
    { "header": "DOB", "source": "person.dob", "format": "MM/DD/YYYY" }, { "header": "Payer Provider ID", "source": "enrollment.providerId" },
    { "header": "Effective", "source": "enrollment.effectiveAt", "format": "MM/DD/YYYY" }, { "header": "Plan", "source": "plan.name" },
    { "header": "License #", "source": "license.number" }, { "header": "Network", "source": "const", "value": "PAR" } ] } }

POST /v1/payers/pay_…/rosters   { }
201 { "object": "payer_roster", "id": "rst_…", "filename": "roster-presbyterian-health-plan-20261108-2240.csv", "rows": 212, "sha256": "…",
      "columns": [ "NPI", "Provider Name", … ], "downloadUrl": "https://api.primarycheck.com/v1/payers/pay_…/rosters/rst_…/download?exp=…&sig=…" }

Each column names a field from GET /v1/payers/roster_columns — subject, person, the newest verified licence (payer-state first), the exclusion screen, the enrollment, plan, payer, any metadata key — or a constant. The roster is rendered over the payer's enrollments (one row each; scope: "subjects" lists every active subject instead), stored with its sha256 and served through a signed link. Send a one-off template in the body to render a layout without saving it.