Skip to main content
POST
/
patients
/
fetch
Fetch Patients
curl --request POST \
  --url https://api.usecobalt.com/v1/patients/fetch \
  --header 'Content-Type: application/json' \
  --header 'access_token: <api-key>' \
  --header 'client_id: <api-key>' \
  --header 'client_secret: <api-key>' \
  --data '{
  "search_by": "dob",
  "dob": "2023-12-25",
  "first_name": "<string>",
  "last_name": "<string>",
  "phone": "<string>"
}'
{
  "success": true,
  "message": "<string>",
  "job_execution_id": "<string>"
}
This is a slow operation that fetches up-to-date patient data directly from the EMR system. If the newest data is not critical, consider using the GET /patients endpoint instead for faster results from cached data.

Webhook Notifications

When the patient fetch is complete, we will send a webhook to your registered endpoint. Here is an example of what the webhook payload will look like:
{
    "id": "evt_1J9X2q2eZvKYlo2Cmnopqr",
    "user_id": "user_1J9X2q2eZvKYlo2Cstuv",
    "job_execution_id": "job_1J9X2q2eZvKYlo2Cmnopqr",
    "timestamp": "2023-10-28T11:00:00Z",
    "type": "patient.live_fetch_completed",
    "action": "sync",
    "data": {
        "success": true,
        "patient_count": 15,
        "patients": [
            {
                "id": "pat_123",
                "mrn": "123456789",
                "first_name": "John",
                "last_name": "Doe",
                "date_of_birth": "1990-01-01"
            }
        ]
    }
}

Authorizations

client_id
string
header
required
client_secret
string
header
required
access_token
string
header
required

Body

application/json
search_by
enum<string>
required

Identifies the search method or criteria being used.

Available options:
dob,
name,
phone
dob
string<date>

Date of birth in ISO 8601 format (YYYY-MM-DD).

first_name
string

Patient's first name.

last_name
string

Patient's last name.

phone
string

Phone number in format XXX-XXX-XXXX (e.g., "555-123-4567").

Response

Request accepted for processing

success
boolean
message
string
job_execution_id
string