Skip to main content

Receive the HIU's data push URL and encryption key, as the PHR app

Hosted by the PHR application, not by ABDM. The HIE-CM calls this endpoint at the callback URL registered for your bridge, so the path below is relative to that URL.

POST/api/v3/patient-record/on-share

This is a callback API for the PHR application. The HIE-CM provides the HIU's answer to the share request: the data push URL to post the records to, and the ECDH key material to encrypt them with. Generate your own key pair and nonce, encrypt each record, and POST them to the data push URL, then call POST /api/hiecm/patient-record/v3/notify with the transfer status.

Authorizations

Authorizationbearer tokenRequired

JWT access token issued by the ABDM session API after successful validation of client id and secret.

Headers

request-idstringRequired

Random UUID, a v4 style guid, unique per callback.

timestampstringRequired

ISO 8601 timestamp of when the callback was sent.

x-hiu-idstringRequired

Identifier of the health information user to which the request was intended.

Body

hiRequestobjectRequired

The data push URL and the encryption key.

hiRequest.transactionIdstringRequired

The transactionId the share request carried.

hiRequest.dataPushUrlstringRequired

The HIU's URL the PHR app posts the encrypted records to.

hiRequest.keyMaterialobjectRequired
responseobjectRequired
response.requestIdstringRequired

The REQUEST-ID of the share request this answers.

Responses

202

Accepted. Post the encrypted records to the data push URL next.

The callback never arrives

Where this fits​

You produce this callback by calling Reply to a share request with the data push URL and the encryption key..