Skip to main content

Fetch the consent artefact details associated with the artefact-ID

GET/api/hiecm/consent/v3/artefact/{consentId}

By invoking this API, users can retrieve comprehensive information about the consent artefact, including its status, scope, and any associated conditions. This functionality is essential for ensuring that users have access to accurate and up-to-date consent artefact information, supporting secure and compliant health information exchange. The API facilitates efficient management and verification of consent artefacts, enhancing the overall integrity of the consent management process.

Authorizations

Authorizationbearer tokenRequired

The access token from POST /api/hiecm/gateway/v3/sessions, sent with a Bearer prefix.

Path parameters

consentIdstringRequired

Consent artefact 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

The user token the PHR service issued when the patient logged in.

Responses

200

Ok

statusstringRequired

One of GRANTEDDENIEDEXPIREDREVOKED

consentDetailobjectRequired
consentDetail.consentIdstring

Allows alpha numeric character and special characters like "^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$";

consentDetail.purposeobjectRequired
consentDetail.purpose.textstringRequired

One of Care ManagementBreak the GlassPublic HealthHealthcare PaymentDisease Specific Healthcare ResearchSelf Requested

consentDetail.purpose.codestringRequired

One of CAREMGTBTGPUBHLTHHPAYMTDSRCHPATRQT

consentDetail.purpose.refUristringRequired

The reference URL. Should be a valid URL

consentDetail.patientobjectRequired
consentDetail.patient.idstringRequired

The abha address of the patient

consentDetail.hipobject

Identifier and name of the health information provider.

consentDetail.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]$

consentDetail.hip.namestringRequired

The name of the health information provider. Allows alpha numeric and special characters like _\-@,():/

consentDetail.hip.typestring

The type of the health information provider. Allows alpha numeric and special characters like _\-@,. ":/

consentDetail.hiuobjectRequired
consentDetail.hiu.idstringRequired

The service ID of the health information user. 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]$

consentDetail.hiu.namestringRequired

The name of the health information user. Allows alpha numeric and special characters like _\-@,():/

consentDetail.hiu.typestring

The type of the health information user. Allows alpha numeric and special characters like _\-@,. ":/

consentDetail.careContextsobject[]

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

consentDetail.careContexts.patientReferencestringRequired

A patient identifier with which patient is registered in the facility/hospital

consentDetail.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)

consentDetail.requesterobjectRequired
consentDetail.requester.namestringRequired

The name of the requester

consentDetail.requester.identifierobjectRequired
consentDetail.requester.identifier.valuestringRequired

The type of the identification. Allows alpha numeric character and special characters like _\-@,. ":/

consentDetail.requester.identifier.typestringRequired

The identification value. Allows alpha numeric character and special characters like _\-@,. ":/

consentDetail.requester.identifier.systemstringRequired

Allows alpha numeric character and special characters like _\-@,. ":/

consentDetail.createdAtstring
consentDetail.lastUpdatedstring
consentDetail.schemaVersionstring
consentDetail.consentManagerobject
consentDetail.consentManager.idstring
consentDetail.hiTypesstring[]Required

Types of health information document.

consentDetail.permissionobjectRequired
consentDetail.permission.accessModestringRequired

One of VIEWSTORESTREAMQUERY

consentDetail.permission.dateRangeobjectRequired
consentDetail.permission.dateRange.fromstringRequired

Should be UTC date time in ISO format

consentDetail.permission.dateRange.tostringRequired

Should be UTC date time in ISO format

consentDetail.permission.dataEraseAtstringRequired

The date at which the consent expire. Should be UTC date time in ISO format

consentDetail.permission.frequencyobjectRequired
consentDetail.permission.frequency.unitstringRequired

One of HOURDAYWEEKMONTHYEAR

consentDetail.permission.frequency.valuenumberRequired

The frequency unit value. Should be be a integer

consentDetail.permission.frequency.repeatsnumberRequired

Should be be a integer

signaturestringRequired
400

Bad Request

Error codes for this module

errorobject

The error code and message, if any occurred.

error.codestringRequired

ABDM-1080 - Invalid Consent artefact id. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator.

error.messagestringRequired
401

Unauthorized

Everything returns 401

codestring

900901 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator.

messagestring
descriptionstring
404

Not Found

Error codes for this module

errorobject

The error code and message, if any occurred.

error.codestringRequired

ABDM-1001 - No data found. May be returned either bare (ABDM-1001) or with a trailing ": " separator (ABDM-1001: ); match on the code itself and tolerate the separator.

error.messagestringRequired
500

Internal Server Error

Error codes for this module

codestring

900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator.

messagestring
descriptionstring
503

Service Unavailable

Error codes for this module

codestringRequired

ABDM-1024 - Dependent service unavailable. May be returned either bare (ABDM-1024) or with a trailing ": " separator (ABDM-1024: ); match on the code itself and tolerate the separator.

messagestringRequired