Skip to main content

Link on carecontext

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/link/on_carecontext

This API endpoint serves as a callback for the /api/hiecm/hip/v3/link/carecontext API. It is used to communicate the outcome of the care context linking process. The response will vary based on the success or failure of the linking operation:

If the linking is successful, pass the successful message

If the linking is unsuccessful, pass the error message with the error code and message

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
statusstringRequired

One of Successfully Linked care contextFailed to link care contextinvalid [invalid request]

responseobjectRequired
response.requestIdstringRequired

The requestId that was passed

Responses

200

OK

400

Bad Request

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 (ABDM-1006) or with a trailing ": " separator (ABDM-1006: ); 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

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

ABDM-9999 - Unknown exception. May be returned either bare (ABDM-9999) or with a trailing ": " separator (ABDM-9999: ); match on the code itself and tolerate the separator.

messagestring

Where this fits​

You produce this callback by calling This API will be used to perform HIP initiated linking..