In short
- Listing takes two calls: linked facilities first, then one facility’s care contexts.
- Each care context’s
statusshows where it is in the consent and data flow. - This lists metadata only; reading a record needs consent and a data transfer.
When to use this
Your PHR app shows the patient what is linked to their ABHA. An ABHA address can carry thousands of care contexts across many facilities. So listing takes two calls: the facilities first, then the care contexts under the one the patient opens. This lists metadata only. Reading a record’s contents needs the patient’s consent and a data transfer. See Request a patient’s consent as a HIU and Receive and decrypt records as a HIU.Before you start
- A client access token, sent as a Bearer token. See Authorization.
- The patient’s Eka user id (
oid), sent as theX-Pt-Idheader or theoidquery parameter. It comes from ABHA creation or Log in to an existing ABHA. - A live ABHA gateway session, if these calls need one. See Hold an ABHA gateway session.
- At least one linked care context, from Discover and link records from a facility or linked by a facility.
Sequence
Steps
1
List linked facilities
Call Get Linked Providers. The response carries
providers, each with hip_id and hip_name. Show the list. If providers is empty or null, the patient has nothing linked yet; offer Discover and link records from a facility.2
List care contexts for one facility
When the patient opens a facility, send its
hip_id as the required hip_id query parameter to Get Linked CareContexts. The response carries care_contexts, each with care_context_id, display, created_at and status.status is one of ConsentRaised, ConsentGranted, ConsentError, DataRequested, DataReceived, DataProcessing, DataProcessed, InvalidDataReceived or NoDataAvailable. Use it to show where each record is in the consent and data flow. State you must persist
When it fails
Errors come back as HTTP 4XX or 5XX with aGenericError body: code, error and source_error. Codes are on the errors page.
Test it
The testing page has the sandbox base URL, credentials and the happy path for every journey. Run against the Stage/Sandbox server,https://api.dev.eka.care.
- Link one care context with Discover and link records from a facility
- Get Linked Providers returns that facility’s
hip_id - Get Linked CareContexts with that
hip_idreturns the care context with astatus - Get Linked CareContexts without
hip_idfails with a 4XX - A patient with nothing linked gets an empty list or
ABDM-1012, and the app offers discovery. Record the code you receive; the expected code is not confirmed.

