Skip to main content

Receive the HIP token on generate token

Hosted by the HIP/HIU, not by ABDM. ABDM calls this endpoint at the callback URL registered for your bridge, so the path below is relative to that URL.

POST/api/v3/hip/token/on-generate-token

"This API endpoint serves as a callback for the /api/hiecm/v3/token/generate-token API which will by the HIE-CM, the HIE-CM will validate the request and if everything is correct, a link token will be generated and is provided in the call-back API, or If anything incorrect in the request which demographics details then it will give the error in the same call back API. It is used to handle the response from the token generation process, ensuring that the HIP can securely manage and use the generated link token. This callback mechanism is essential for maintaining the integrity and security of the token-based linking process, supporting seamless and efficient health information exchange within the healthcare ecosystem."

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

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

Body

abhaAddressstringRequired
linkTokenstring
responseobjectRequired
response.requestIdstringRequired

The requestId that was passed

Responses

200

OK

400

Bad Request. The request could not be processed because it was malformed or failed validation - a missing mandatory field, a value in the wrong format, or a header that did not match the body.

Error codes for this module

errorobject

The error code and message, if any occurred.

error.codestringRequired

ABDM-1006 - Bad Request, invalid request Body. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator.

error.messagestringRequired

Short description of the failure.

401

Unauthorized. The request carried no valid credentials, or the access token has expired. Obtain a fresh token from the session API and retry.

Everything returns 401

codestring

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

messagestring

Short description of the failure.

descriptionstring

Detailed description of the failure.

403

Forbidden. The caller is authenticated but is not permitted to perform this operation on this resource.

Error codes for this module

Where this fits​

You produce this callback by calling API used to generate link token to link the health records.