Skip to main content

After ABHA creation - create ABHA address

Endpoint: POST /abha/api/v3/enrollment/enrol/abha-address

POST/abha/api/v3/enrollment/enrol/abha-address

Flow: Create ABHA - IRIS - step 7 of 7

  • Previous: *After ABHA creation - get ABHA address suggestions*
  • Next: none (last call of this flow)

---

This API endpoint is used to enrol a new ABHA address. It allows users to create a unique ABHA address that can be used for accessing and managing their health records. The endpoint ensures that the provided ABHA address is unique and valid..

Authorizations

Authorizationbearer tokenRequired

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

Headers

REQUEST-IDstringRequired

Unique UUID for every request.

TIMESTAMPstringRequired

Current UTC timestamp in ISO-8601 format.

Body

txnIdstringRequired

The transaction ID returned by the previous call in this flow.

abhaAddressstringRequired

The ABHA address chosen for the account, without the @ suffix.

preferredintegerRequired

1 to make this the preferred ABHA address of the account, 0 otherwise.

Responses

200

The 200 response code indicates a successful request. In this context, it refers to the successful operation of the Enroll ABHA Address API.

txnIdstring
abhaAddressstring
preferredinteger
400

The 400 response code indicates a bad request. In this context, it refers to various errors encountered during the operation of the Suggestion API.

Types of Suggestion API Errors:

Invalid Preferred Flag: This error occurs when the transaction ID provided in the request is invalid. The transaction ID is essential for tracking the request and ensuring that the correct information is processed. An invalid transaction ID means the server cannot verify the request, leading to a failure in enrolling the ABHA address. .

Invalid Transaction Id: This error occurs when the preferred flag provided in the request is invalid. The preferred flag indicates the user’s preference for the suggested ABHA address. An invalid preferred flag means the server cannot process the user’s preference correctly, leading to a failure in enrolling the ABHA address.

Error codes for this module

preferredstring
timestampstring
401

The 401 response code indicates an unauthorized request. In this context, it refers to the lack of proper authentication during the operation of the Invalid Credentials.

Everything returns 401

codestring
messagestring
descriptionstring
500

Internal Server Error

An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

Error codes for this module