Getting Started
First Successful API Call
This guide will help you confirm that your integration is working end to end. By the end of this step, you should be able to make an authenticated request to the Consolidate Health API and receive patient data. This is the first “success moment” after completing the OAuth flow.
What you should have at this point
From the previous steps, your backend should already have:
access_tokenrefresh_tokenexpires_inpatient_id
✅ Recommended:
If you do not have all four, return to the Quick Start guide and complete the token exchange step first.
Understanding the patient_id
The patient_id is returned during the token exchange and uniquely identifies the patient who authorized access.
Every patient data request is scoped to a
patient_idThe same patient may have multiple EHR connections behind this ID
Your application should store and reuse the
patient_idfor future API calls
You do not need to discover or create this value yourself. It is always returned by Consolidate Health.
Making your first request
All API requests must:
Use HTTPS
Include a Bearer token in the Authorization header
Reference the
patient_idin the URL path
Example: Fetch patient medications
Replace:
{patient_id}with the value returned in the token exchange{access_token}with your current access token
Expected response
A successful request returns:
HTTP status
200 OKA JSON response containing medication data
The exact shape of the response depends on the patient’s connected EHR systems. Fields are normalized across providers, but some values may be empty if a source system does not supply them.
If you receive a 200 OK response, your integration is working correctly.
Handling expired access tokens
If your access token has expired, the API will respond with:
HTTP status
401 Unauthorized
When this happens:
Use the
refresh_tokento request a new access tokenRetry the original API request with the new token
Example: Refresh access token
After receiving a new access_token, retry the original request.
Verifying EHR connections
To confirm which EHR portals are connected for a patient, you can call:
This endpoint is useful for:
Debugging missing data
Displaying connection status in your UI
Supporting reconnect flows
Expanding beyond the first call
Once your first request succeeds, you can call any patient data endpoint using the same pattern:
Query Parameters
All endpoints support pagination via limit and offset.
limit: Number of results per page (default: 20, max: 100)offset: Pagination offset
Example
Common issues and quick checks
If your first call fails, check:
The Authorization header uses Bearer
{access_token}exactlyThe
patient_idmatches the value returned during token exchangeThe access token has not expired
Your request is using HTTPS
You are calling the correct API base URL
Ready to get started? Request Sandbox access
Any other questions? Get in touch