Get patient records

Return the patient's latest stored FHIR resources with their source EHR, paginated.

GET
/patients/{id}/records

Authorization

BearerAuth
AuthorizationBearer <token>

Medblocks API key for server-side requests.

In: header

Path Parameters

id*string

Your patient_id from Patient creation or Session upsert.

Query Parameters

type?string

Comma-separated FHIR resource types to include, e.g. Observation,Condition.

since?|

ISO 8601 date or timestamp. Returns current resources changed after this time.

count?integer

Maximum items per page.

Default100
Range1 <= value <= 100
starting_after?string

Opaque 12-character cursor from a previous response's next_cursor.

ending_before?string

Opaque 12-character cursor from a previous response's previous_cursor.

Header Parameters

Version?string

Date-pinned API version. If omitted, Medblocks uses the version pinned on your API key.

Response Body

application/json

application/json

curl -X GET "https://example.com/patients/string/records" \  -H "Version: 2026-04-25"
{  "resource_type": "list",  "patient_id": "user_42",  "data": [    {      "source": "fhirsrc_SMsb6YLMQLal1qm9AbdSPAcc",      "resource": {        "resourceType": "Observation",        "id": "bmi-1",        "status": "final"      }    }  ],  "has_more": true,  "next_cursor": "aB3xK9mQp2Lz",  "previous_cursor": null}
{  "error": {    "type": "authentication_error",    "code": "invalid_api_key",    "message": "API key invalid",    "param": null,    "doc_url": "https://docs.medblocks.com/errors/invalid_api_key",    "request_id": "9c9b6f7a-8e4f-4a3b-9c1e-6f3a2d8b7c4d"  }}
Non-2xx responses use the standard API error envelope. Log error.code and error.request_id for support.