Subjects
A subject is one person you keep verifying: a nurse on your roster, a provider in your network. It carries your own id for them (externalId), the identity facts every check needs (name, date of birth, NPI, aliases, the states they practise in) and a status. Verifications and monitors hang off it through subjectId, so "everything we know about Amy" is one call instead of a search by name, and a departure is one call too.
Create a subject
curl -X POST https://api.primarycheck.com/v1/subjects \
-H "Authorization: Bearer pc_live_…" \
-H "Content-Type: application/json" \
-d '{
"externalId": "emp-48213",
"person": {
"firstName": "Amy",
"lastName": "Kowalski",
"dob": "1976-02-14",
"npi": "1003000126",
"aliases": [
{
"firstName": "Amy",
"lastName": "Smith"
}
],
"practiceStates": [
"PA",
"NJ",
"PR"
]
},
"startDate": "2024-01-15",
"metadata": {
"department": "ICU"
}
}'{ "id": "sub_7c1e0b1f2a9d4e8f0a1b", "object": "subject", "externalId": "emp-48213", "type": "person",
"person": { "firstName": "Amy", "middleName": null, "lastName": "Kowalski", "suffix": null, "dob": "1976-02-14",
"npi": "1003000126", "email": null, "phone": null, "aliases": [ { "firstName": "Amy", "lastName": "Smith" } ],
"practiceStates": ["PA", "NJ", "PR"], "ssnLast4": null },
"status": "active", "startDate": "2024-01-15", "endDate": null, "metadata": { "department": "ICU" },
"createdAt": "2026-11-08T14:05:09Z", "updatedAt": "2026-11-08T14:05:09Z", "deactivatedAt": null }| Field | Meaning |
|---|---|
externalId | Your own id for the person (employee id, provider id). Optional, but unique on your account: a second subject with the same value is refused with 422 external_id_taken, on create and on PATCH. |
type | person (default, takes person) or organization (takes entity; see Organizations below). Person fields on an organization, or entity on a person, are a 400 naming the field. |
person.practiceStates | Two-letter codes: the 50 states, DC and the territories PR, VI, GU, AS and MP. Upper-cased and de-duplicated; anything else is a 400 naming the field. |
person.aliases | Former or alternate names as { firstName, lastName } objects. They reach the sources as the contract's "First Last" aliases when you order through the subject. |
person.npi | Ten digits. Filterable on the list. |
person.ssnLast4 | Optional, four digits. Stored for your own matching; never sent to a source on its own. |
startDate · endDate | Hire / credentialing window. A deactivation sets endDate to today unless an earlier date was already given. |
metadata | A map of strings, yours. Replaced as a whole on PATCH. |
Facilities: CMS certification, accreditation, state licence
An organization subject with entity.kind: facility carries the facility file: ccn (CMS Certification Number), facilityType, the state license and accreditations (TJC, DNV, CIHQ, ACHC, CHAP …). It can order facility claims — CMS certification and deeming accreditation from CMS POS / QCOR and the accreditors' public records, identified by CCN, NPI-2 or name — and the organization exclusion screen, and POST /v1/credentialing_requests accepts it with the facility template (claims plus the documents a facility file carries). Everything downstream — checklist, intake request, packet, committee agenda, autopilot — is the same machinery person credentialing uses.
Organizations: vendors, facilities, group practices
A subject can be an organization. Send type: "organization" with entity instead of person: the legal name, trade names under dbaNames, the tin (nine digits, dashes allowed), the organization's type-2 npi, its SAM.gov uei, addresses, and ownerIds — the person subjects on your account who are its owners or managing employees, so the people a vendor screen must also cover are one hop away.
curl -X POST https://api.primarycheck.com/v1/subjects \
-H "Authorization: Bearer pc_live_…" \
-H "Content-Type: application/json" \
-d '{
"externalId": "vend-100",
"type": "organization",
"entity": {
"name": "Acme Home Care LLC",
"dbaNames": [
"Acme Homecare"
],
"tin": "12-3456789",
"npi": "1999999992",
"addresses": [
{
"line1": "12 Main St",
"city": "Erie",
"state": "PA",
"zip": "16501"
}
],
"ownerIds": [
"sub_7c1e0b1f2a9d4e8f0a1b"
]
}
}'{ "id": "sub_9a3f…", "object": "subject", "externalId": "vend-100", "type": "organization", "person": null,
"entity": { "name": "Acme Home Care LLC", "dbaNames": ["Acme Homecare"], "tinLast4": "6789", "npi": "1999999992", "uei": null,
"addresses": [ { "line1": "12 Main St", "line2": null, "city": "Erie", "state": "PA", "zip": "16501" } ],
"ownerIds": ["sub_7c1e0b1f2a9d4e8f0a1b"] },
"status": "active", … }The TIN is write-only. It is sealed at rest and never returned in full: the subject answers tinLast4, and the claim inputs, source records, evidence and webhooks of a screen show *****6789. GET /v1/subjects?type=organization lists them, q searches the organization name, npi matches the type-2 NPI, and the detail adds owners: each linked person subject with its newest exclusion verdict.
Screening an organization
Order an exclusion_screen (or a healthcare_screen) with the organization's subjectId, or put the organization on the claim directly as entity: { name, dbaNames, tin, npi, uei, state }. The screen runs against the entity rows of the lists that have them — SAM.gov exclusions (firms and special entities: name, cross-references, UEI, NPI), the OIG LEIE (business entities: name, NPI), OFAC SDN (entities, vessels and aircraft with their aliases) and every live state Medicaid exclusion list (business name, NPI and the TIN where the state publishes one). Lists that only carry people are not asked, rather than reporting a business "clear" by its name.
curl -X POST https://api.primarycheck.com/v1/verifications \
-H "Authorization: Bearer pc_live_…" \
-H "Content-Type: application/json" \
-d '{
"subjectId": "sub_9a3f…",
"purpose": "network_credentialing",
"claims": [
{
"type": "exclusion_screen"
}
]
}'| Match | Verdict |
|---|---|
| TIN, NPI or UEI equal | discrepancy — the row is evidence; matchedOn names the identifier(s). |
| Business name equal after normalization (Inc / LLC / Corp / punctuation stripped), or a close name in the same state | unable_to_verify(ambiguous_match) — suspected, for review. A name on its own is never a hit and never clears a screen. |
| Nothing above | verified — clear on every entity list that was fresh; a stale or missing list is reported, never counted as clear. |
Every source result's record names the entity as compared (TIN masked), the fields compared (compared: tin, npi, uei, name, dbaNames, state) and the lists_checked. An organization subject can only order exclusion_screen and healthcare_screen (422 claim_requires_person otherwise); its healthcare_screen needs no profession and expands to the type-2 NPPES check plus the entity screen. In the sandbox an organization named Sandbox Excluded … is an exact TIN hit on SAM and a business-name hit on the LEIE; Sandbox Ambiguous … is a suspected name match everywhere.
Import a vendor roster
POST /v1/subjects/import/entities takes the CSV itself as the body (Content-Type: text/csv). Columns: name (required), externalId, dbaNames (|-separated), tin, npi, uei, addressLine1, addressLine2, city, state, zip, startDate, endDate, and owner groups owner1.firstName, owner1.lastName, owner1.dob, owner1.npi, owner1.externalId, owner1.role (then owner2.* …). Each row becomes an organization subject — an existing externalId is updated — and each owner a linked person subject, reused when its externalId already exists. The file is validated as a whole: any bad row is a 422 import_invalid with error.errors[] (row, column, message) and nothing is written. The dashboard's Subjects page uploads the same file.
externalId,name,dbaNames,tin,npi,addressLine1,city,state,zip,owner1.firstName,owner1.lastName,owner1.dob,owner1.externalId,owner1.role
vend-100,Acme Home Care LLC,Acme Homecare|Acme HC,12-3456789,1999999992,12 Main St,Erie,PA,16501,Pat,Owner,1970-05-05,own-pat,owner
→ 201 { "object": "subject_import", "rows": 1, "created": 1, "updated": 0, "ownersCreated": 1, "ownersLinked": 1, "subjects": ["sub_9a3f…"] }Order through the subject
Send subjectId on POST /v1/verifications or POST /v1/monitors and leave person out: it is filled from the subject. An explicit person wins when you send both. The verification or monitor carries subjectId from then on, and GET /v1/verifications?subjectId= / GET /v1/monitors?subjectId= list them.
curl -X POST https://api.primarycheck.com/v1/verifications \
-H "Authorization: Bearer pc_live_…" \
-H "Content-Type: application/json" \
-d '{
"subjectId": "sub_7c1e0b1f2a9d4e8f0a1b",
"purpose": "employment",
"consent": {
"consentId": "cons_…"
},
"claims": [
{
"type": "license",
"state": "PA",
"profession": "rn",
"number": "RN353077L"
},
{
"type": "exclusion_screen"
}
]
}'An unknown id is 400 subject_not_found (param: subjectId). Batches work the same way: an item may name a subjectId instead of a person, and a refused item is listed in error.errors[] with its code.
Everything about one person
GET /v1/subjects/{id} returns the subject and, on top of it:
| Key | What it holds |
|---|---|
latest | The newest verdict per credential across the subject's verifications — keyed by claim type, state, profession (or issuer / school / employer) and identifier — each with verdict, reason, verificationId, claimIndex, verificationStatus and checkedAt. Open the verification for sources, field checks and evidence. |
monitors | Every monitor on the subject: id, status, cadence, claim, expiresOn, daysLeft, last / next check, current verdict. |
events | The 50 most recent monitor change events (kinds), each with its monitorId. |
evidenceCount · verificationCount | How much is on file. |
{ "id": "sub_7c1e…", "status": "active", …,
"latest": [
{ "claimType": "license", "state": "PA", "profession": "rn", "number": "RN353077L", "verdict": "verified", "reason": null,
"verificationId": "ver_0a9d…", "claimIndex": 0, "verificationStatus": "complete", "checkedAt": "2026-11-08T14:06:02Z" },
{ "claimType": "exclusion_screen", "state": null, "profession": null, "number": null, "verdict": "verified", … } ],
"monitors": [ { "id": "mon_3f2a…", "status": "active", "cadence": "weekly", "claim": { "type": "license", "state": "PA", "profession": "rn", "number": "RN353077L" },
"expiresOn": "2027-04-30", "daysLeft": 538, "verdict": "verified", … } ],
"events": [ { "id": "mev_…", "monitorId": "mon_3f2a…", "kind": "baseline", "diff": { "verdict": "verified" }, "createdAt": "…" } ],
"evidenceCount": 4, "verificationCount": 2 }List and search
GET /v1/subjects is cursor-paginated (limit ≤ 100, startingAfter), newest first, with status (active | deactivated), externalId (exact), npi (exact) and q (a case-insensitive substring of the name, your external id or the subject id). Filters combine.
Change a subject
PATCH /v1/subjects/{id} takes any subset of externalId, person, startDate, endDate and metadata. The keys you send inside person are merged into the stored person (send { "person": { "practiceStates": ["PA", "NJ"] } } to change only the states); metadata is replaced as a whole; null clears externalId, startDate or endDate. Fires subject.updated.
Deactivate and reactivate
curl -X DELETE https://api.primarycheck.com/v1/subjects/sub_7c1e0b1f2a9d4e8f0a1b \ -H "Authorization: Bearer pc_live_…"
Deactivation is how a departure is recorded. Nothing is deleted: the subject and every verification, verdict and evidence record stay readable. What changes: status becomes deactivated, endDate becomes today, every active monitor on the subject is stopped (the response lists them under monitorsStopped), and a new verification or monitor naming the subject is refused with 422 subject_deactivated until POST /v1/subjects/{id}/reactivate. Reactivation clears endDate and deactivatedAt; monitors stopped by the deactivation stay stopped — create new ones. Repeats answer 409 already_deactivated / 409 already_active.
To remove a person's data rather than record a departure, see erasure: it redacts verifications and monitors by name and does not touch subject rows.
Webhooks
subject.created, subject.updated (PATCH and reactivate) and subject.deactivated carry the subject as data.object; the deactivation adds monitorsStopped. Subscribe like any other event.
Existing verifications and monitors
Everything you created before subjects existed is linked for you: verifications and monitors that share a reference on your account become one subject whose externalId is that reference, with the newest record's person (gaps filled from older records) and the oldest record's day as startDate. Rows without a reference are left alone rather than matched by name; link them with a PATCH on your side when you know who they are. The back-fill is idempotent and sends no webhooks.
History: every result, per credential
GET /v1/subjects/{id}/history is the timeline: every result ever produced for the subject, newest first — one entry per claim of each verification, plus one entry per monitor carrying its current snapshot (monitorId set, verificationId null). Each entry names its credential (claimKey, claimType, state, profession / issuer / school / employer, number) and carries checkedAt, verdict, reason, statusMapped / statusRaw, expires, source, evidenceCount and changedFields: what differs from the previous result of the same credential (verdict, reason, source, evidence count, every raw and normalized record key, each field check as fieldChecks.<field>; the freshness pair fetchedAt / sourceLastUpdated never counts). Group by claimKey for a timeline per licence.
curl -X GET https://api.primarycheck.com/v1/subjects/sub_7c1e0b1f2a9d4e8f0a1b/history?claimType=license&state=PA&limit=50 \ -H "Authorization: Bearer pc_live_…"
{ "data": [
{ "id": "ver_0b3f…:0", "claimKey": "license|PA|rn|RN353077L", "claimType": "license", "state": "PA", "profession": "rn", "number": "RN353077L",
"verificationId": "ver_0b3f…", "claimIndex": 0, "monitorId": null, "verificationStatus": "complete", "checkedAt": "2026-11-08T14:06:02Z",
"verdict": "discrepancy", "reason": null, "statusMapped": "suspended", "statusRaw": "Suspended", "expires": "2027-04-30",
"source": "PA-PALS", "evidenceCount": 2, "changedFields": ["fieldChecks.status", "flags", "status", "statusMapped", "statusRaw", "verdict"] },
{ "id": "ver_0a9d…:0", "claimKey": "license|PA|rn|RN353077L", …, "verdict": "verified", "statusMapped": "active", "changedFields": [] } ],
"hasMore": false }Filters claimType, state and profession combine; limit ≤ 200 and startingAfter (the last entry's id) page through it. changedFields is computed over the whole timeline before the page is cut, so a page boundary never hides a change.
Identifier graph
Every verification, monitor and roster write leaves a record of the identifiers it saw — NPI, licence numbers by state, DEA and NCSBN ids, certification ids, email, phone, your external id — with the source that showed it, how it arrived and when. GET /v1/subjects/{id}/identifiers is one person's whole identifier set across sources, with duplicates naming other subjects that share a linking identifier (an NPI, a licence number in a state, a DEA or NCSBN id — never a name). GET /v1/identifiers?kind=npi&value=… answers the reverse question: who on the account carries this identifier. Board records contribute too: an NPI or NCSBN id printed on a board page joins the graph as via: board_record.
Eligibility on any date
GET /v1/subjects/{id}/eligibility?on=YYYY-MM-DD answers the auditor's question — "was this person eligible to practise on that date?" — from the history rather than from a fresh lookup. For every credential it takes the newest verification claim or monitor check on or before the date and judges it as of that date: a licence is eligible when its verdict was verified, its status was not adverse and it had not expired by then (expiredOnDate), not_eligible otherwise, unknown when nothing had been checked yet; an exclusion screen is clear or hit. The roll-up is eligible only when every licence is eligible, every screen clear and every practice state (practiceStates=PA,NJ, default the subject's) holds an eligible licence; practiceStatesWithoutEligibleLicense names the gaps and daysBeforeDate says how stale the newest check was. basis states the rule in a sentence for the file.
curl -X GET https://api.primarycheck.com/v1/subjects/sub_7c1e0b1f2a9d4e8f0a1b/eligibility?on=2026-07-15 \ -H "Authorization: Bearer pc_live_…"
{ "object": "eligibility", "subjectId": "sub_7c1e…", "on": "2026-07-15", "eligibility": "not_eligible",
"credentials": [
{ "claimKey": "license|PA|rn|RN353077L", "claimType": "license", "state": "PA", "profession": "rn", "number": "RN353077L",
"eligibility": "not_eligible", "verdict": "verified", "statusMapped": "active", "expires": "2026-06-30", "expiredOnDate": true,
"checkedAt": "2026-01-10T14:06:02Z", "daysBeforeDate": 186, "source": "PA-PALS", "verificationId": "ver_0a9d…", "monitorId": null, "evidenceCount": 2 },
{ "claimKey": "exclusion_screen", "claimType": "exclusion_screen", "eligibility": "clear", "verdict": "verified", "checkedAt": "2026-01-10T14:06:02Z", … } ],
"licensesEligible": 0, "licenses": 1, "screensClear": 1, "screens": 1, "practiceStatesWithoutEligibleLicense": ["PA"],
"basis": "Newest check on or before 2026-07-15 per credential; a licence is eligible when verified, not adverse and unexpired on that date." }In the SDKs: pc.subjects.eligibility(id, on="2026-07-15") / pc.subjects.eligibility(id, { on: "2026-07-15" }).
Compare two runs
GET /v1/subjects/{id}/history/diff?from=ver_a&to=ver_b — or GET /v1/verifications/{id}/diff/{otherId} for any two verifications on your account — returns the field-level difference per credential the two share: only the fields that moved, each as { old, new }, across verdict, reason, the answering source, evidenceCount, every raw and normalized record key (status, statusMapped, expires, flags, …) and each field check (fieldChecks.status → { found, match }). Credentials present in only one run are listed under onlyInFrom / onlyInTo; two runs that share no credential are 400 claims_not_comparable, an id that is not yours 404.
{ "object": "verification_diff", "from": { "id": "ver_0a9d…", … }, "to": { "id": "ver_0b3f…", … },
"claims": [ { "claimKey": "license|PA|rn|RN353077L", "claimType": "license", "state": "PA", "profession": "rn", "number": "RN353077L",
"claimIndex": { "from": 0, "to": 0 }, "changed": true, "changedFields": ["fieldChecks.status", "flags", "status", "statusMapped", "statusRaw", "verdict"],
"fields": { "status": { "old": "Active", "new": "Suspended" }, "statusMapped": { "old": "active", "new": "suspended" },
"verdict": { "old": "verified", "new": "discrepancy" }, "flags": { "old": [], "new": ["disciplinary_action"] },
"fieldChecks.status": { "old": { "found": "Active", "match": true }, "new": { "found": "Suspended", "match": false } },
"fetchedAt": { "old": "2026-10-01T09:00:00Z", "new": "2026-11-08T14:06:02Z" } } } ],
"changedCount": 1, "onlyInFrom": [], "onlyInTo": [] }Monitors keep the same shape in their snapshot: the complete record of the answering source, its field checks and source code, so the history reads a monitor check like a verification; change events (monitoring) still fire for the watched fields only.
Dashboard and SDKs
Roster import (CSV)
An HR or credentialing export becomes the roster in one upload, and the same file can be uploaded every pay period. GET /v1/subjects/import/template.csv is the header — externalId, firstName, lastName, dob, npi, email, practiceStates, licenseState, profession, licenseNumber, cadence, startDate, endDate — and POST /v1/subjects/import (multipart file) takes the filled file. externalId is the key: known ids are updated (blank cells leave the stored value alone), new ids become subjects, and a row with licenseState + profession creates a licence monitor on the subject unless it already has an active one on that licence.
With dryRun=true (the default) nothing is written: the response is the validation report — every row error with its line, column, code and message (invalid_npi, profession_unknown, duplicate_external_id, npi_in_use …), the duplicates by externalId and by NPI within the file and against existing subjects, and the preview counts adds, updates, terminations, monitorsToCreate. Bad rows are skipped, the rest imports. fullRoster=true lists the active subjects whose externalId is missing from the file as terminations — preview only, until a commit with applyTerminations=true deactivates them exactly as DELETE /v1/subjects/{id} would.
{ "id": "imp_…", "object": "subject_import", "status": "validated", "dryRun": true,
"report": { "counts": { "rows": 512, "valid": 498, "invalid": 14, "adds": 37, "updates": 461, "terminations": 5, "monitorsToCreate": 41, "monitorsExisting": 457 },
"errors": [ { "line": 17, "column": "npi", "code": "invalid_npi", "message": "npi must be ten digits.", "externalId": "EMP-2210" } ],
"duplicates": { "externalId": [ { "line": 88, "externalId": "EMP-1001", "firstLine": 2 } ], "npi": [] },
"terminations": [ { "subjectId": "sub_…", "externalId": "EMP-0450" } ], "warnings": [] },
"errorCount": 14, "errorsCsvUrl": "…/v1/subjects/imports/imp_…/errors.csv" }dryRun=false commits as a background job: poll GET /v1/subjects/imports/{id} until complete; result then carries adds, updates, reactivations, terminations, monitorsCreated, monitorsExisting and the ids — the preview counts are the commit counts. Each created monitor runs its first check and emits monitor.baseline, so a lapsed licence in the export reaches you the same day. Every row error, validation and commit-time, is downloadable as GET /v1/subjects/imports/{id}/errors.csv. A commit that creates monitors needs consent (a JSON object with consentId, or disclosureVersion + signedAt) and a vetted account, as monitors do. In the dashboard: Monitors → Import roster (upload → preview → confirm → progress → error CSV). SDKs: pc.subjects.import_(file, dry_run=False, consent=…) / pc.subjects.import(file, { dryRun: false, consent }), then pc.subjects.imports.wait_for_completion(id) / waitForCompletion(id).
The dashboard's Subjects page lists the roster with the same filters (person or organization), creates either kind from one form with a Person / Organization switch, and imports a vendor roster CSV; a subject's page shows the latest verdicts, monitors, events and verifications — an organization's page adds its card (DBA names, TIN last four, NPI, UEI, addresses) and its owners with their latest exclusion verdict — and carries the deactivate / reactivate action. Verifications and monitors link back to their subject. In the SDKs: pc.subjects.create / retrieve / update / list / deactivate / reactivate / import_entities (Python, sync and async; Node importEntities), entity= / type= on create, type= on list, and subject_id= / subjectId on verifications.create and monitors.create.