Skip to main content

Approve the consent request raised by HIU from PHR/mobile application

Approve a consent request, specifying their preferred data access parameters.

POST/api/hiecm/consent/v3/request/{request-id}/approve

By invoking this API, the user grants permission for the Health Information User (HIU) to access their health data under the defined conditions. This approval process is essential for ensuring that patient data is shared securely and in accordance with the user’s preferences, supporting a transparent and compliant health information exchange. The API facilitates the establishment of trust and adherence to privacy regulations, enabling ethical and efficient access to health information.

Authorizations

Authorizationbearer tokenRequired

The access token from POST /api/hiecm/gateway/v3/sessions.

Path parameters

request-idstringRequired

The consent request id

Headers

REQUEST-IDstringRequired

Unique UUID for track the end to end request transaction

TIMESTAMPstringRequired

Actual time of the request was initiated, ISO 8601 represents date and time by starting with the year, followed by the month, the day, the hour, the minutes, seconds and milliseconds

X-CM-IDstringRequired

Suffix of the consent manager to which the request was intended

X-AUTH-TOKENstringRequired

JWT Authentication token which was issued by ABDM after successful validation of username and password

Body

consentsobject[]Required
consents.hiTypesstring[]Required

Types of health information document.

consents.hipobjectRequired

Identifier and name of the health information provider.

consents.hip.idstringRequired

The service ID of the health information provider. Allows alpha numeric character and special characters like[A-Z a-z 0-9]+[A-Z a-z 0-9 //_//-]*[A-Z a-z 0-9]$

consents.hip.namestringRequired

The name of the health information provider. Allows alpha numeric and special characters like "^[a-zA-Z]+[A-Za-z0-9_\\-@,().\\s\\xa0:/]+"

consents.hip.typestring

The type of the health information provider. Allows alpha numeric and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$"

consents.careContextsobject[]Required

List of care contexts linked at the HIP end for the identified patient.

consents.careContexts.patientReferencestringRequired

A patient identifier with which patient is registered in the facility/hospital. Allows alpha numeric character and special characters like ^[a-zA-Z0-9_\\-@,. \":/]{0,255}$

consents.careContexts.careContextReferencestringRequired

An identifier of patient's care context created in HIP. A care context is a group of patient's health data (Not the actual health data). Allows alpha numeric character and special characters like ^[a-zA-Z0-9_\\-@,().\"/:| ]{0,255}$

consents.permissionobjectRequired
consents.permission.dateRangeobjectRequired
consents.permission.dateRange.fromstringRequired

Should be UTC date time in ISO format. Allows alpha numeric character and special characters like "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"

consents.permission.dateRange.tostringRequired

Should be UTC date time in ISO format. Allows alpha numeric character and special characters like "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"

consents.permission.frequencyobjectRequired
consents.permission.frequency.unitstringRequired

One of HOURDAYWEEKMONTHYEAR

consents.permission.frequency.valuenumberRequired

The frequency unit value. Should be be a integer.Allows alpha numeric character and special characters like ^[a-zA-Z0-9_\\-@,. \":/]{0,255}$

consents.permission.frequency.repeatsnumberRequired

Should be be a integer

consents.permission.accessModestringRequired

One of VIEWSTORESTREAMQUERY

consents.permission.dataEraseAtstringRequired

The date at which the consent expire. Should be UTC date time in ISO format. Allows alpha numeric character and special characters like "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"

Responses

401

Unauthorized

Everything returns 401

500

Internal Server Error

Error codes for this module

503

Service Unavailable

Error codes for this module