---
title: "Search"
method: POST
path: "/patient-merge/v1/search"
tags: ["v1"]
---

# Search

`POST /patient-merge/v1/search`

## Request

- Base URL: `https://pre-api.joincandidhealth.com`
- URL: `https://pre-api.joincandidhealth.com/patient-merge/v1/search`
- Auth: HTTP bearer

Returns a page of patient merge records for the given MRNs. A merge is included
when the MRN matches either the alternative or the primary patient MRN.

## Request body

- PreEncounterPatientMergesV1PatientMergeSearchRequest: The search criteria for fetching patient merge records.
  - `mrns` string[], required: The patient MRNs to fetch merges for.
  - `limit` integer: The max number of records to return. Defaults to 100, capped at 1000.
  - `page_token` string: A token that can be used to retrieve the next or previous page of results

## Response `200`

Response with status 200

- PreEncounterPatientMergesV1PatientMergePage: A page of patient merge records.
  - `next_page_token` string: A token that can be used to retrieve the next or previous page of results
  - `prev_page_token` string: A token that can be used to retrieve the next or previous page of results
  - `total` integer, required
  - `items` PreEncounterPatientMergesV1PatientMerge[], required
    - `organization_id` string, required: The unique identifier for an Organization in the database
    - `deactivated` boolean, required: True if the object is deactivated. Deactivated objects are not returned in search results but are returned in all other endpoints including scan.
    - `version` integer, required: The version of the object. Any update to any property of an object object will create a new version.
    - `updated_at` string, date-time, required
    - `updating_user_id` string, required: The unique identifier for a User in the database
    - `alternative_patient_mrn` string, required: The MRN of the patient that was merged.
    - `primary_patient_mrn` string, required: The MRN of the patient that is getting a patient merged into them.
    - `id` string, required: The unique identifier for a PatientMerge record.

## Other responses

- `400`: Error response with status 400

## Changes

- **2026-09-17** `24b2d80d577a`: 4 breaking, 1 warning, 9 info
  - added the new required request property `mrns`
  - the request's body type changed from no type to `object`
  - the response's body type changed from no type to `object` for status `200`
  - the `content` response's property type changed from no type to `object` for status `400`
  - …10 more
- **2026-09-12** `3a81ee81d4ed`: 1 info
  - api operation id `search` removed and replaced with `v1_search`
- **2026-08-26** `293f25b8a5c7`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/joincandidhealth/apis/api-reference/changes/patient-merge/v1/search/post.md)

---

[API](https://skmtc.dev/joincandidhealth/apis/api-reference.md) - [All operations](https://skmtc.dev/joincandidhealth/apis/api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/joincandidhealth/apis/api-reference/revisions/d8b0a61873e2?raw)
