Ndhm

Gateway

Gateway is the hub that routes/orchestrates the interaction between consent managers and API bridges. There are 5 categories of APIs; discovery, link, consent…

Government & public#openapi#open-data

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Gateway is the hub that routes/orchestrates the interaction between consent managers and API bridges. There are 5 categories of APIs; discovery, link, consent flow, data flow and monitoring. To reflect the consumers of APIs, the above apis are also categorized under cm facing, hiu facing and hip facing

Endpoints 48

user auth

  • POSTConfirmation request sending token, otp or other authentication details from HIP/HIU for confirmation/v0.5/users/auth/confirmThis API is called by HIP/HIUs to confirm authentication of users. The transactionId returned by the previous callback API /users/auth/on-init must be sent.…
  • POSTGet a patient's authentication modes relevant to specified purpose/v0.5/users/auth/fetch-modesThis API is meant for identify supported authentication modes for a patient given a specific purpose
  • POSTInitialize authentication from HIP/v0.5/users/auth/initThis API is called by HIPs to initiate authentication of users. A transactionId is retuned by the corresponding callback API for confirmation of user auth.
  • POSTnotification API in case of DIRECT mode of authentication by the CM/v0.5/users/auth/notifyThis API is called by CM to confirm authentication of users. The transactionId returned is same as that passed in /auth/on-init. The "auth.status" conveys…
  • POSTcallback API for /auth/confirm (in case of MEDIATED auth) to confirm user authentication or not/v0.5/users/auth/on-confirmThis API is called by CM to confirm authentication of users. 1. auth.accessToken - is specific to the purpose mentioned in the /auth/init. This token needs to…
  • POSTIdentification result for a consent-manager user-id/v0.5/users/auth/on-fetch-modesIf a patient is found then auth attribute contains the supported modes for the specified purpose. Otherwise, error is raised for invalid requests or for…
  • POSTResponse to user authentication initialization from HIP/v0.5/users/auth/on-initIf the patient's id is valid, CM will return a transactionId as initialization of user auth. If the request is valid, then 'auth.mode' will convey how the…
  • POSTcallback API by HIU/HIPs as acknowledgement of auth notification/v0.5/users/auth/on-notifyThis API is called by HIU/HIPs to confirm acknowledgement for receipt of auth notification is case of DIRECT authentication.

profile

  • POSTResponse to patient's share profile request/v0.5/patients/profile/on-shareResult of patient share profile request at HIP end.
  • POSTShare patient profile detailshttps://your-hrp-server.com/v0.5/patients/profile/shareRequest for sharing patient's profile details to HIP

discovery

  • POSTDiscover patient's accounts/v0.5/care-contexts/discoverRequest for patient care context discover, made by CM for a specific HIP. It is expected that HIP will subsequently return either zero or one patient record…
  • POSTResponse to patient's account discovery request/v0.5/care-contexts/on-discoverResult of patient care-context discovery request at HIP end. If a matching patient found with zero or more care contexts associated, it is specified as result…

link

  • POSTAPI for HIP initiated care-context linking for patient/v0.5/links/link/add-contextsAPI to submit care-context to CM for HIP initiated linking. The API must accompany the "accessToken" fetched in the users/auth process. 1. subsequent usage…
  • POSTToken submission by Consent Manager for link confirmation/v0.5/links/link/confirmAPI to submit the token that was sent by HIP during the link request.
  • POSTLink patient's care contexts/v0.5/links/link/initRequest from CM to links care contexts associated with only one patient 1. Validate account reference number and care context reference number 2. Validate…
  • POSTcallback API for HIP initiated patient linking /link/add-context/v0.5/links/link/on-add-contextsIf the accessToken is valid for purpose of linking, and specified details provided, CM will send "acknoweldgement.status" as SUCCESS. If any error occcurred,…
  • POSTToken authenticated by HIP, indicating completion of linkage of care-contexts/v0.5/links/link/on-confirmReturns a list of linked care contexts with patient reference number. 1. Validated and linked account reference number 2. Validated that the token sent from…
  • POSTResponse to patient's care context link request/v0.5/links/link/on-initResult of patient care-context link request from HIP end. This happens in context of previous discovery of patient found at HIP end, therefore the link…

consent flow

  • POSTCreate consent request/v0.5/consent-requests/initCreates a consent request to get data about a patient by HIU user.
  • POSTResponse to consent request/v0.5/consent-requests/on-initResult of consent request creation for a patient. consentRequest.id represents the consentrequest id created by CM. The result must contain either…
  • POSTResult of consent request status/v0.5/consent-requests/on-statusResult of consent request done previously. Status of request can be GRANTED, DENIED, EXPIRED. If the request was GRANTED, then
  • POSTGet consent request status/v0.5/consent-requests/statusGet status of consent request done previously
  • POSTGet consent artefact/v0.5/consents/fetch
  • POSTConsent notification/v0.5/consents/hip/notifyNotification of consents to health information providers consent request granted, consent revoked, consent expired. Only the GRANTED, REVOKED and EXPIRED…
  • POSTConsent notification/v0.5/consents/hip/on-notifyThis API is called by HIP as acknowledgement to notification of consents, in cases of consent revocation and expiration.
  • POSTConsent notification/v0.5/consents/hiu/notifyHealth information user will get notified about the consent request granted or denied, consent revoked, consent expired. 1. For consent request grant,…
  • POSTConsent notification/v0.5/consents/hiu/on-notifyThis API is called by HIU as acknowledgement to consent notifications, specifically for cases when consent is REVOKED or EXPIRED.
  • POSTResult of fetch request for a consent artefact/v0.5/consents/on-fetchMust contain either consentDetail or error. Possible reason of errors are 1. consentId passed through /fetch is invalid

data flow

  • POSTHealth information data request/v0.5/health-information/cm/on-requestCallback API for acknowledgement of Health information request of HIU. CM calls this API when it has validated the Health Information request given the…
  • POSTHealth information data request/v0.5/health-information/cm/requestRequest for Health information against a consent id. CM would generate a transactionId against each consent and pass it as trnasaction context / correlation…
  • POSTHealth information data request/v0.5/health-information/hip/on-requestAPI called by HIP to acknowledge Health information request receipt. Either the hiRequest or error must be specified. hiRequest element returns the same…
  • POSTHealth information data request/v0.5/health-information/hip/requestAPI called by CM to request Health information from HIP against a validated consent artefact. The transactionId is the correlation id that HIP should use use…
  • POSTNotifications corresponding to events during data flow/v0.5/health-information/notifyAPI called by HIU and HIP during data-transfer. 1. HIP on transfer of data would send sessionStatus - one of [TRANSFERRED, FAILED] 2. HIP would also send…

identification

  • POSTIdentify a patient by her consent-manager user-id/v0.5/patients/findThis API is meant for identify to patient given her consent-manager-user-id
  • POSTIdentification result for a consent-manager user-id/v0.5/patients/on-findIf a patient is found then patient.name contains the patients name. Otherwise, patient is not provided, and possibly error is raised for invalid requests Note…

monitoring

  • GETGet consent request status/v0.5/heartbeat

sessions

  • GETGet openid configuration/v0.5/.well-known/openid-configuration
  • GETGet certs for JWT verification/v0.5/certs
  • POSTGet access token/v0.5/sessions

subscriptions

  • POSTRequest for subscription/v0.5/subscription-requests/cm/initcreates a request for subscription. The subscription categories can be for care-contexts linkages or availability of data against existing care-contexts. Note…
  • POSTcallback API for the /subscription-requests/cm/init to notify a HIU on acceptance/acknowledgement of the request for subscription./v0.5/subscription-requests/cm/on-initThis callback API acknowledges the request for subscription from a HIU, and sends back a "id" that will be used when the patient/user approves or denies the…
  • POSTNotification for subscription grant/deny/revoke/v0.5/subscription-requests/hiu/notifyThis API is used by CM to notify a HIU to grant or deny a request for subscription, and also to notify that in case an existing subscription is revoked or…
  • POSTCallback API for /subscription-requests/hiu/notify to acknowledge receipt of notification./v0.5/subscription-requests/hiu/on-notifyThis API is called by HIU as acknowledgement to subscription request relevant notifications.
  • POSTNotification to HIU on basis of a granted subscription/v0.5/subscriptions/hiu/notifyThis API is used by CM to notify a HIU for notification relevant to subscription. Notifications are sent to subscribed HIUs whenever a new care-context is…
  • POSTCallback API for /subscriptions/hiu/notify to acknowledge receipt of notification./v0.5/subscriptions/hiu/on-notifyThis API is called by HIU as acknowledgement to consent notifications, specifically for cases when consent is REVOKED or EXPIRED.

services

  • GETGet bridge service details/profile by the serviceId provided./v0.5/hi-services/:service-idThis API is meant for displaying the bridge service details by the serviceId provided .

cm facing

  • POSTAcknowledgment response for SMS notification sent to patient by HIP/v0.5/patients/sms/on-notifyIf the SMS notification is successfully sent to patient then "status" will be "ACKNOWLEDGED" with no error. If the SMS notification is failed then "status"…

hip facing

  • POSTAPI for HIP to send SMS notifications to patients/v0.5/patients/sms/notifyAPI to send SMS notifications to patient with custom deeplink.

API details

Base URL
https://dev.ndhm.gov.in/gateway
Authentication
None declared in the description
Operations
48 operations on 48 pathsPOST 44GET 4
Main resources
cm facing 22hiu facing 14hip facing 11consent flow 10user auth 8link 6subscriptions 6data flow 5sessions 3discovery 2
Response formats
application/json application/xml
Description format
OpenAPI 3.0.0, API version 0.5
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the Gateway in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Gateway collection, without the publisher's secrets.
  3. Add your credentialsOpen the collection's variables or an environment and enter your API key or token, if the API needs one.
  4. Send a requestPick an endpoint, for example “Confirmation request sending token, otp or other authentication details from HIP/HIU for confirmation” (POST /v0.5/users/auth/confirm), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Gateway?

Gateway is the hub that routes/orchestrates the interaction between consent managers and API bridges. There are 5 categories of APIs; discovery, link, consent… It is listed under Government & public and has 48 endpoints.

Who publishes the Gateway?

It is listed from Ndhm's public API description (an OpenAPI document), not published by Ndhm on Swastik Codes. Anyone who controls ndhm.gov.in can claim the profile by adding a DNS TXT record.

What is the base URL of the Gateway?

Requests go to https://dev.ndhm.gov.in/gateway. Endpoint paths are added to this base URL.

How do I authenticate with the Gateway?

Its OpenAPI description does not declare an authentication scheme. Some endpoints may be open; check the provider's documentation before relying on that.

How many endpoints does the Gateway have?

48 operations on 48 paths (44 POST, 4 GET). The largest groups are cm facing, hiu facing, hip facing, consent flow.

Is forking the Gateway free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.