Skip to main content

Generate link token to link the health records

Generate a link token which will be valid for 6 months..

POST/api/hiecm/v3/token/generate-token

This token can be used for Health Information Provider (HIP) Initiated Linking, enabling HIPs to securely link patient health records to their ABHA (Ayushman Bharat Health Account) address. The generated token ensures that the linking process is authenticated and authorised, maintaining the integrity and security of health information exchange. This functionality is crucial for facilitating seamless and efficient linking of health records within the healthcare ecosystem.

Authorisation: We are passing the access-token in the authorisation [Example: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJBbFJiNVd]

Authorizations

Authorizationbearer tokenRequired

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

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-HIP-IDstringRequired

Identifier of the health information provider to which the request was intended

Body

abhaNumbernumber

it can be null if abhaNumber is not linked with abhaAddress. Allows numeric character like ^\d{14}$

abhaAddressstringRequired

abhaAddress of the user/patient. Allows alpha numeric character and special characters like ^[a-zA-Z0-9][a-zA-Z0-9_.]+[a-zA-Z0-9]@(abdm|sbx)$

namestringRequired

Only alphabets and special characters like ',.- are allowed like ^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$

genderstringRequired

Allows M, F, O, D, T, U as a input

yearOfBirthnumberRequired

Year of birth must be 4 digit, ranging between 1900 and 2200

Responses

400

Bad Request

Error codes for this module

errorobject

The error code and message, if any occurred.

error.codestringRequired

ABDM-1035 - Invalid HIP ID. May be returned either bare (ABDM-1035) or with a trailing ": " separator (ABDM-1035: ); match on the code itself and tolerate the separator.

error.messagestringRequired
401

Unauthorized

Everything returns 401

codestring

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

messagestring
descriptionstring
404

server cannot find the requested resource

Error codes for this module

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

Callbacks​

  • After this call, ABDM posts This is a call back API of [/api/hiecm/v3/token/generate-token]. to /api/v3/hip/token/on-generate-token. Open the callback.