Skip to main content
POST
Match a patient by demographics

Authorizations

Authorization
string
header
required

Marketplace API key

Headers

X-Organization-Id
string
required

Target clinic organization ID

Body

application/json
matchOn
enum<string>[]

Fields the candidate query requires to agree (AND), e.g. ["lastName", "dateOfBirth"]. Names and email compare trimmed and case-insensitively, phone on its last 10 digits. A chart with no stored value for a listed field is not a candidate. Every listed field must be present in the body (phone with at least 7 digits), and the list must include at least one of dateOfBirth, phone or email; otherwise 400. Fields sent but not listed are scored only. Omitted: candidates are any chart matching dateOfBirth, phone or email (OR).

Available options:
lastName,
firstName,
dateOfBirth,
phone,
email
Example:
firstName
string

Scored; finds candidates only when listed in matchOn.

Example:

"Jane"

lastName
string

Scored; finds candidates only when listed in matchOn, alongside dateOfBirth, phone or email.

Example:

"Doe"

dateOfBirth
string

YYYY-MM-DD. At least one of dateOfBirth, phone (7+ digits) or email is required, otherwise 400.

Example:

"1984-02-11"

phone
string

Compared on digits only (last 10); must have at least 7 digits to find candidates.

Example:

"+13135550123"

email
string

Trimmed, case-insensitive exact match.

Example:

"jane@example.com"

postalCode
string

Scored only; never used to find candidates.

Example:

"48507"

threshold
number

Minimum score to return (0–1). Defaults to 0.75.

Example:

0.75

limit
number

Maximum candidates to return (1–25). Defaults to 5.

Example:

5

instanceIds
string[]

EHR instances to search, as raw UUIDs (ins_… also accepted on v3+). Only charts in these instances are candidates, and the filter is applied before threshold, limit and truncated, so a chart in another instance — such as the legacy twin of a migrated patient — never takes a slot. Ids that are not your organization's match nothing. null, an empty list, or more than 100 ids is a 400. Omitted: every instance in the organization is searched.

Maximum array length: 100
Example:

Response

Success

code
string
required

Response code

Example:

"success"

data
object
required