PrimaryCheck

Alerts

Every monitor event that matters becomes one alert: a status change, an expiry-ladder step, an exclusion hit, a verdict change, a source outage. Your team works the queue — dismiss with a note, singly or in bulk — and the system resolves what no longer applies (a renewal, a source answering again, a later expiry step superseding an earlier one). The dashboard queue is Alerts.

MethodPathPurpose
GET/v1/alertsNewest first, open only by default. status=dismissed|resolved|all, type, severity, subjectId, monitorId, since; cursor pagination.
GET/v1/alerts/{id}One alert.
POST/v1/alerts/{id}/dismissDismiss with an optional note; records who and when. Idempotent.
POST/v1/alerts/dismissBulk: up to 500 ids with one note → dismissed, notFound.
GET/v1/alerts/aggregateCounts by groupBy=type|severity|state|profession under the same filters — the numbers behind a dashboard.
GET /v1/alerts?severity=critical&subjectId=sub_…
{ "data": [ { "id": "alt_…", "object": "alert", "type": "expiring", "severity": "critical", "status": "open",
              "title": "Licence expires in 7 days: Amy Kowalski — PA · rn · RN353077L",
              "body": { "threshold": 7, "expiresOn": "2027-02-15", "daysLeft": 7, "claim": {...}, "personName": "Amy Kowalski" },
              "monitorId": "mon_…", "subjectId": "sub_…", "state": "PA", "profession": "rn", "reference": "emp_42",
              "createdAt": "…", "dismissedAt": null, "dismissedBy": null, "dismissNote": null, "resolvedAt": null } ],
  "hasMore": false }

POST /v1/alerts/dismiss
{ "ids": ["alt_1", "alt_2"], "note": "Renewal receipts on file." }
→ { "data": [...], "dismissed": 2, "notFound": [] }

GET /v1/alerts/aggregate?groupBy=severity
→ { "object": "alert_aggregate", "groupBy": "severity", "status": "open", "total": 14,
    "data": [ { "key": "critical", "count": 5 }, { "key": "warning", "count": 8 }, { "key": "info", "count": 1 } ] }

Types and severities

typeWhenSeverity
status_changedA licence's status or mapped status moved, or a new board action is on file.critical when the new status is suspended / revoked / expired / lapsed / surrendered / inactive / denied (or a new action); else warning
expiringAn expiry-ladder step before the date: 90, 60, 28, 14, 7, 3 days.warning at 90 / 60 / 28; critical from 14
expiredThe licence lapsed (day 0) or is still lapsed at the +3 recheck.critical
exclusion_hitAn exclusion or healthcare screen now finds the person.critical
verdict_changedThe claim verdict moved and nothing above explains it; or day one was not verified.critical for discrepancy; warning for not_found / unable_to_verify; else info
source_unavailableThe source could not be read (one alert per outage; resolved when it answers again).info

Webhooks and per-subject subscriptions

alert.created and alert.dismissed carry the alert object. Any webhook endpoint can take a filter — { "subjectIds": ["sub_…"], "references": ["emp_42"], "metadata": { "facility": "west" } } — and then receives only events about those subjects (any one criterion matching is enough; events that are not about a subject, such as dataset.refreshed, are always delivered). Set it on POST / PATCH /v1/webhook_endpoints or in the dashboard endpoint form; filter: null clears it. See webhooks.

SDKs

pc.alerts.list(status="open", severity=["critical", "warning"])      # Python
pc.alerts.dismiss("alt_…", note="Renewed; receipt on file")
pc.alerts.dismiss_many(["alt_1", "alt_2"], note="Weekly review")
pc.alerts.aggregate("state")

await pc.alerts.list({ severity: "critical" });                          // Node
await pc.alerts.dismissMany(["alt_1", "alt_2"], { note: "Weekly review" });
await pc.alerts.aggregate("profession");