# Fetch the service ids registered against a bridge `GET /api/hiecm/gateway/v3/bridge-services` Retrieve the unique identifiers, known as service IDs, that are associated with a specific bridge. In this context, a bridge acts as an intermediary component that connects various services or networks, enabling them to communicate with each other. When you call this API, it queries the bridge to gather a list of all the service IDs that have been registered with it. ```bash curl --request GET \ --url https://dev.abdm.gov.in/api/hiecm/gateway/v3/bridge-services \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended ## Responses - `200`: OK - `bridge` (object) - `bridge.id` (string) - `bridge.name` (string) - `bridge.url` (string) - `bridge.active` (boolean) - `bridge.blocklisted` (boolean) - `services` (object[]) - `services.id` (string) - `services.name` (string) - `services.types` (string[]) - `services.endpoints` (object) - `services.endpoints.hipEndpoints` (object[]) - `services.endpoints.hipEndpoints.use` (string) - `services.endpoints.hipEndpoints.connectionType` (string) - `services.endpoints.hipEndpoints.address` (string) - `services.endpoints.hiuEndpoints` (object[]) - `services.endpoints.hiuEndpoints.use` (string) - `services.endpoints.hiuEndpoints.connectionType` (string) - `services.endpoints.hiuEndpoints.address` (string) - `services.endpoints.healthLockerEndpoints` (object[]) - `services.endpoints.healthLockerEndpoints.use` (string) - `services.endpoints.healthLockerEndpoints.connectionType` (string) - `services.endpoints.healthLockerEndpoints.address` (string) - `services.active` (boolean) - `204`: No Content - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `400`: Bad Request - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): ABDM-1015 - Invalid Response. May be returned either bare (`ABDM-1015`) or with a trailing ": " separator (`ABDM-1015: `); match on the code itself and tolerate the separator. - `error.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden. The caller is authenticated but is not permitted to perform this operation on this resource. - `500`: Internal Server Error - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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. - `error.message` (string, required) - `503`: Service Unavailable - `code` (string, required): 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. - `message` (string, required) Shape of the 200 response, generated from the schema. The values are placeholders, not a captured response: ```json { "bridge": { "id": "Bridge_ABC", "name": "ABC Bridge", "url": "https://abc.def.in", "active": true, "blocklisted": false }, "services": [ { "id": "ABC_Service", "name": "Service ABC", "types": [ "HIP" ], "endpoints": { "hipEndpoints": [ { "use": "registration", "connectionType": "HTTPS", "address": "https://abc.com/register" } ], "hiuEndpoints": [ { "use": "registration", "connectionType": "HTTPS", "address": "https://abc.com/register" } ], "healthLockerEndpoints": [ { "use": "registration", "connectionType": "HTTPS", "address": "https://abc.com/register" } ] }, "active": true } ] } ``` --- # Fetch the details of a service ID `GET /api/hiecm/gateway/v3/bridge-service/serviceId/{service-id}` Retrieve the details associated with a specific service ID. When invoked, it queries the system to fetch comprehensive information about the service identified by the provided service ID. ```bash curl --request GET \ --url https://dev.abdm.gov.in/api/hiecm/gateway/v3/bridge-service/serviceId/{service-id} \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended ## Path parameters - `service-id` (string, required): The service id ## Responses - `200`: OK - `id` (number) - `bridgeId` (string) - `serviceId` (string) - `name` (string) - `isHip` (boolean) - `isHiu` (boolean) - `isHealthLocker` (boolean) - `isPhr` (boolean) - `active` (boolean) - `registerTime` (string) - `dateCreated` (string) - `dateModified` (string) - `204`: No Content - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `400`: Bad Request - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): ABDM-1015 - Invalid Response. May be returned either bare (`ABDM-1015`) or with a trailing ": " separator (`ABDM-1015: `); match on the code itself and tolerate the separator. - `error.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden. The caller is authenticated but is not permitted to perform this operation on this resource. - `500`: Internal Server Error - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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. - `error.message` (string, required) - `503`: Service Unavailable - `code` (string, required): 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. - `message` (string, required) Shape of the 200 response, generated from the schema. The values are placeholders, not a captured response: ```json { "id": 4, "bridgeId": "ABC_Bridge", "serviceId": "ABC_Service", "name": "Service ABC", "isHip": true, "isHiu": true, "isHealthLocker": true, "isPhr": true, "active": true, "registerTime": "2022-10-06T10:10:00.587Z", "dateCreated": "2022-10-06T10:10:00.587Z", "dateModified": "2022-10-06T10:10:00.587Z" } ``` --- # Update the bridge URL `PATCH /api/hiecm/gateway/v3/bridge/url` Update the URL of a bridge. When invoked, it allows users to modify the existing URL associated with a specific bridge. This functionality is crucial for maintaining accurate and up-to-date connection information within the network. By using this API, administrators can ensure that the bridge URL reflects the current configuration and routing requirements, facilitating seamless communication and integration between different services in the form of webhook site. ```bash curl --request PATCH \ --url https://dev.abdm.gov.in/api/hiecm/gateway/v3/bridge/url \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'Content-Type: application/json' \ --data '{ "url": "" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended ## Body - `url` (string, required): The bridge URL to be updated ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `204`: No Content - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `400`: Bad Request - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): ABDM-1015 - Invalid Response. May be returned either bare (`ABDM-1015`) or with a trailing ": " separator (`ABDM-1015: `); match on the code itself and tolerate the separator. - `error.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden. The caller is authenticated but is not permitted to perform this operation on this resource. - `500`: Internal Server Error - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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. - `error.message` (string, required) - `503`: Service Unavailable - `code` (string, required): 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. - `message` (string, required) Shape of the 204 response, generated from the schema. The values are placeholders, not a captured response: ```json { "error": { "code": "ABDM-1001", "message": "No data found" } } ``` --- # Generate access token `POST /api/hiecm/gateway/v3/sessions` Generate an access token. When invoked, it facilitates the authentication process by providing a secure token that can be used to access various services and resources within the system. This functionality is essential for ensuring secure and authorised access, enabling users to interact with protected endpoints and perform operations that require authentication. By using this API, users can obtain the necessary tokens to maintain secure sessions and access the system’s features effectively. ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/gateway/v3/sessions \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'Content-Type: application/json' \ --data '{ "clientId": "SBX_0000", "clientSecret": "0******-***-***-***-a****", "grantType": "client_credentials" }' ``` ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended ## Body - `clientId` (string, required): The client ID issued to the integrator by ABDM at registration. - `clientSecret` (string, required): The client secret issued to the integrator by ABDM along with the client ID. - `grantType` (string, required): The method used by the client to obtain an access token, e.g. client_credentials. One of: client_credentials. ## Responses - `202`: Accepted - `accessToken` (string) - `expiresIn` (integer) - `refreshExpiresIn` (integer) - `refreshToken` (string) - `tokenType` (string) - `204`: No Content - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `400`: Bad Request - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): ABDM-1015 - Invalid Response. May be returned either bare (`ABDM-1015`) or with a trailing ": " separator (`ABDM-1015: `); match on the code itself and tolerate the separator. - `error.message` (string, required) - `401`: Unauthorized. The request carried no valid credentials, or the access token has expired. Obtain a fresh token from the session API and retry. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string): Short description of the failure. - `description` (string): Detailed description of the failure. - `403`: Forbidden. The caller is authenticated but is not permitted to perform this operation on this resource. - `500`: Internal Server Error - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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. - `error.message` (string, required) - `503`: Service Unavailable - `code` (string, required): 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. - `message` (string, required) Shape of the 202 response, generated from the schema. The values are placeholders, not a captured response: ```json { "accessToken": "", "expiresIn": 1200, "refreshExpiresIn": 1800, "refreshToken": "", "tokenType": "bearer" } ``` --- # Gateway session Session and token calls, certificate endpoints for verifying tokens, and bridge registration calls that tell ABDM which URL your callbacks arrive on. The full operation list is in the [Gateway session API reference](/reference/hiecm-gateway). New to this? Start with [Milestones](/docs/hiecm/v3/milestones). --- # API references Every endpoint below is generated from the specification that declares it. Each one has its own page with the headers, the body and a request you can send. This page lists every module, including any that the role you have chosen does not use. The sidebar shows only yours. In M2 and M3 a call is acknowledged now and answered later. The answer arrives as a callback, a POST from ABDM to the URL you registered, declared in the specification as a webhook. Each callback is shown on the call it belongs to, and has a page of its own under that module. ## Gateway session 4 endpoints across 2 use cases: Bridge, Session. Each endpoint has its own page in the sidebar. [Read the whole specification](/reference/hiecm-gateway) ## M1 Identity 122 endpoints across 10 use cases: Create ABHA, Child ABHA, Login, Profile, ABHA Card & Profile, Find ABHA, Forgot ABHA, Benefit, Access Tokens & Encryption, ABHA Address Login. Each endpoint has its own page in the sidebar. [Read the whole specification](/reference/hiecm-m1) ## M2 Health Information Provider 20 endpoints across 5 use cases: Link token, HIP initiated linking, User initiated linking, Consent and data flow, Callbacks. Each endpoint has its own page in the sidebar. [Read the whole specification](/reference/hiecm-m2) ## M3 Health Information User 12 endpoints across 2 use cases: Consent and data flow, Callbacks. Each endpoint has its own page in the sidebar. [Read the whole specification](/reference/hiecm-m3) ## M4 Registry Integration 100 endpoints across 4 use cases: HPID, HFR, HRP bridge services, HPR. Each endpoint has its own page in the sidebar. [Read the whole specification](/reference/hiecm-m4) ## P1 Registration and login 42 endpoints across 4 use cases: PHR certificate and session token, Create ABHA number, Aadhaar OTP, Create ABHA address, PHR login. Each endpoint has its own page in the sidebar. [Read the whole specification](/reference/hiecm-p1) ## P2 Consents Management 46 endpoints across 5 use cases: PHR profile, Link ABHA number, Quick OPD Registration, User initiated linking, Consent manager. Each endpoint has its own page in the sidebar. [Read the whole specification](/reference/hiecm-p2) ## P3 Subscription 14 endpoints across 2 use cases: Subscription request and notifications, HIU side, Subscription approval and management, PHR side. Each endpoint has its own page in the sidebar. [Read the whole specification](/reference/hiecm-p3) ## P4 Locker 5 endpoints across 1 use case: Locker. Each endpoint has its own page in the sidebar. [Read the whole specification](/reference/hiecm-p4) ## Scan and Register 2 endpoints across 1 use case: Scan and register. Each endpoint has its own page in the sidebar. [Read the whole specification](/reference/hiecm-scan-and-register) ## Patient scan and record share 11 endpoints across 1 use case: Record share. Each endpoint has its own page in the sidebar. [Read the whole specification](/reference/hiecm-record-share) ## Scan and Pay 18 endpoints across 2 use cases: Scan and pay, Scan and pay details and version update. Each endpoint has its own page in the sidebar. [Read the whole specification](/reference/hiecm-scan-and-pay) --- # Search ABHA address (auth methods) `POST /abha/api/v3/phr/web/login/abha/search` **Endpoint:** `POST /abha/api/v3/phr/web/login/abha/search` **Flow:** **ABHA Address Login - Aadhaar OTP** - step 1 of 6 - Previous: none (first call of this flow) - Next: *ABHA address login via Aadhaar OTP - send OTP* --- This API endpoint is used to search for ABHA (Ayushman Bharat Health Account) profiles. It allows users to retrieve information about their ABHA profiles using identifier ABHA address. This is essential for verifying the user’s identity and ensuring secure access to their ABHA profile ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/search \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "abhaAddress": "" }' ``` ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `abhaAddress` (string, required): The ABHA address chosen for the account, without the @ suffix. ## Responses - `200`: The 200 response code indicates a successful request. In this context, it refers to the successful retrieve of user details based on the ABHA address - `healthIdNumber` (string) - `abhaAddress` (string) - `authMethods` (string[]) - `blockedAuthMethods` (string[]) - `status` (string) - `message` (string) - `fullName` (string) - `mobile` (string) - `400`: The 400 response code signifies a bad request. In this context, it means that no user was found for the provided ABHA address. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `401`: A 401 Unauthorized error occurs when a server receives a request without valid authentication credentials or with incorrect credentials. This error indicates that the server cannot authenticate the user, See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: A 404 Not Found error occurs when a server cannot find the requested resource. This error indicates that the server is reachable, but the specific page or resource is not available See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "healthIdNumber": "", "abhaAddress": "", "authMethods": [ "MOBILE_OTP", "AADHAAR_OTP" ], "blockedAuthMethods": [], "status": "ACTIVE", "message": null, "fullName": "", "mobile": "9340******" } ``` --- # ABHA address login via Aadhaar OTP - send OTP `POST /abha/api/v3/phr/web/login/abha/request/otp` Starts login with an ABHA address. UIDAI sends an OTP to the Aadhaar-linked mobile. `loginId` is the RSA-encrypted ABHA address. Use *Search ABHA address (auth methods)* first to check that `Aadhaar_OTP` is allowed. **Endpoint:** `POST /abha/api/v3/phr/web/login/abha/request/otp` **Flow:** **ABHA Address Login - Aadhaar OTP** - step 2 of 6 - Previous: *Search ABHA address (auth methods)* - Next: *ABHA address login via Aadhaar OTP - verify* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-address-login", "Aadhaar-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"ABHA-address"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"Aadhaar"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-address-login", "aadhaar-verify" ], "loginHint": "abha-address", "loginId": "{{encryptedAbhaAddress}}", "otpSystem": "aadhaar" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: abha-address. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: aadhaar. ## Responses - `200`: Success: OTP send-Success - Aadhaar - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): ABHA Address Verification via Aadhaar OTP-User Not found; ABHA Address Verification via Aadhaar OTP-Invaild abha address; ABHA Address Verification via Aadhaar OTP-Invaild Otp System See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Missing Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-1074eb18a5fa", "message": "OTP sent to Aadhaar registered mobile number ending with ******0933" } ``` --- # ABHA address login via Aadhaar OTP - verify `POST /abha/api/v3/phr/web/login/abha/verify` Verifies the Aadhaar OTP for ABHA-address login. Returns the linked ABHA address(es) in `users` and `tokens.token`. Send that token as the `X-token` header to the ABHA-address profile, PHR card and QR code APIs. **Endpoint:** `POST /abha/api/v3/phr/web/login/abha/verify` **Flow:** **ABHA Address Login - Aadhaar OTP** - step 3 of 6 - Previous: *ABHA address login via Aadhaar OTP - send OTP* - Next: *Get ABHA-address profile* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-address-login", "Aadhaar-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-address-login", "aadhaar-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "41e59beb-6ee7-421e-a844-3652b2482038", "otpValue": "{{encryptedOtpValue}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: OTP Verification -Success Aadhaaar Otp - `message` (string) - `authResult` (string) - `users` (object[]) - `users.abhaAddress` (string) - `users.fullName` (string) - `users.profilePhoto` (string) - `users.abhaNumber` (string) - `users.status` (string) - `users.kycStatus` (string) - `tokens` (object) - `tokens.token` (string) - `tokens.expiresIn` (integer) - `tokens.refreshToken` (string) - `tokens.refreshExpiresIn` (integer) - `400`: Bad Request (request validation failed): ABHA Address Verification via Aadhaar OTP-Invalid Scope; ABHA Address Verification via Aadhaar OTP-Invalid Auth Methods; ABHA Address Verification via Aadhaar OTP-Invalid Transaction Id See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Missing Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "message": "OTP verified successfully", "authResult": "success", "users": [ { "abhaAddress": "", "fullName": "", "profilePhoto": "", "abhaNumber": "", "status": "ACTIVE", "kycStatus": "VERIFIED" } ], "tokens": { "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000 } } ``` --- # Get ABHA-address profile `GET /abha/api/v3/phr/web/login/profile/abha-profile` **Endpoint:** `GET /abha/api/v3/phr/web/login/profile/abha-profile` **Flow:** **ABHA Address Login - Aadhaar OTP** - step 4 of 6 - Previous: *ABHA address login via Aadhaar OTP - verify* - Next: *Get PHR card* --- This API endpoint retrieves the user’s ABHA (Ayushman Bharat Health Account) profile. Access to this profile is granted after the successful verification of the OTP, ensuring the user’s profile information is secure. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha-profile \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{jwtToken}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `200`: The 200 response code indicates a successful request. In this context, it signifies that the user was successfully verified with the OTP in the previous API call. A valid JWT token was provided, which authenticated the user and allowed access to their profile. As a result, the user profile was successfully retrieved, including all ABHA profile details. - `abhaAddress` (string) - `fullName` (string) - `profilePhoto` (string) - `firstName` (string) - `middleName` (string) - `lastName` (string) - `dayOfBirth` (string) - `monthOfBirth` (string) - `yearOfBirth` (string) - `dateOfBirth` (string) - `gender` (string) - `email` (string) - `mobile` (string) - `abhaNumber` (string) - `address` (string) - `stateName` (string) - `pinCode` (string) - `stateCode` (string) - `districtCode` (string) - `authMethods` (string[]) - `status` (string) - `subDistrictCode` (string) - `subDistrictName` (string) - `emailVerified` (string) - `mobileVerified` (string) - `kycStatus` (string) - `400`: A Bad Request error with the description “invalid X-token” indicates that the server received a request with an invalid or missing authentication token. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: The 401 response code indicates that the request was not authorized due to invalid credentials. Ensure that your API invocation includes the appropriate authorization header. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "abhaAddress": "", "fullName": "", "profilePhoto": "", "firstName": "", "middleName": "", "lastName": "", "dayOfBirth": "", "monthOfBirth": "", "yearOfBirth": "", "dateOfBirth": "", "gender": "M", "email": "", "mobile": "", "abhaNumber": "", "address": "
", "stateName": "MAHARASHTRA", "pinCode": "", "stateCode": "27", "districtCode": "487", "authMethods": [ "AADHAAR_OTP", "MOBILE_OTP" ], "status": "ACTIVE", "subDistrictCode": "", "subDistrictName": "", "emailVerified": "false", "mobileVerified": "true", "kycStatus": "VERIFIED" } ``` --- # Get PHR card `GET /abha/api/v3/phr/web/login/profile/abha/phr-card` **Endpoint:** `GET /abha/api/v3/phr/web/login/profile/abha/phr-card` **Flow:** **ABHA Address Login - Aadhaar OTP** - step 5 of 6 - Previous: *Get ABHA-address profile* - Next: *Get ABHA-address QR code* --- This API endpoint is used to generate a PHR Card profile. It requires valid credentials and headers for authentication. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha/phr-card \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{jwtToken}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `202`: Indicates a successful generation of PHR card See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: A 400 Bad Request error with the description “invalid X-token” indicates that the server received a request with an invalid or missing authentication token. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Invalid Credentials error occurs when a server receives a request but cannot authorize it due to incorrect or missing authentication See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors --- # Get ABHA-address QR code `GET /abha/api/v3/phr/web/login/profile/abha/qr-code` **Endpoint:** `GET /abha/api/v3/phr/web/login/profile/abha/qr-code` **Flow:** **ABHA Address Login - Aadhaar OTP** - step 6 of 6 - Previous: *Get PHR card* - Next: none (last call of this flow) --- This API endpoint is used to generate a QR code for a complete ABHA address profile. The QR code can be used to quickly access and share the user’s ABHA address profile information. This is particularly useful for healthcare providers to retrieve patient information efficiently and securely. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha/qr-code \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{X-token}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `200`: Receives a QR code as a response which can be used to quickly access and share the user’s ABHA profile information. - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m1/errors --- # ABHA address login via Fingerprint - send authentication request `POST /abha/api/v3/phr/web/login/abha/request/otp` Starts fingerprint login with an ABHA address. `loginId` is the RSA-encrypted ABHA address. Use the returned `txnId` in *ABHA address login via Fingerprint - verify*. **Endpoint:** `POST /abha/api/v3/phr/web/login/abha/request/otp` **Flow:** **ABHA Address Login - Fingerprint** - step 1 of 5 - Previous: none (first call of this flow) - Next: *ABHA address login via Fingerprint - verify* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-bio-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"ABHA-address"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"Aadhaar"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | > **Note:** Biometric ABHA-address login uses scope `ABHA-login`, not `ABHA-address-login` (the same in Swagger and Postman). ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-bio-verify" ], "loginHint": "abha-address", "loginId": "{{encryptedAbhaAddress}}", "otpSystem": "aadhaar" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: abha-address. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: aadhaar. ## Responses - `200`: Success: Send Authentication Request via Biometric (Fingerprint Authentication) - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Missing Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "4faf0ca4-ce24-4804-8dfa-1dd1c9f0edfb", "message": "FingerPrint authentication request successfully sent" } ``` --- # ABHA address login via Fingerprint - verify `POST /abha/api/v3/phr/web/login/abha/verify` Completes fingerprint login with an ABHA address. Send the `txnId` and the fingerprint PID. Returns `users` and `tokens.token` (send it as `X-token` to the profile, PHR card and QR code APIs). **Endpoint:** `POST /abha/api/v3/phr/web/login/abha/verify` **Flow:** **ABHA Address Login - Fingerprint** - step 2 of 5 - Previous: *ABHA address login via Fingerprint - send authentication request* - Next: *Get ABHA-address profile* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-bio-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["bio"]` | yes | Authentication method used in this step. | | `authData.bio` | object | yes | Fingerprint authentication block. | | `authData.bio.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.bio.fingerPrintAuthPid` | string | yes | Base64 PID block captured from a registered fingerprint RD device. | > **Note:** Biometric ABHA-address login uses scope `ABHA-login`, not `ABHA-address-login` (the same in Swagger and Postman). ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-bio-verify" ], "authData": { "authMethods": [ "bio" ], "bio": { "txnId": "41e59beb-6ee7-421e-a844-3652b2482038", "fingerPrintAuthPid": "{{fingerPrintAuthPid}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.bio` (object, required): Fingerprint authentication block. - `authData.bio.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.bio.fingerPrintAuthPid` (string, required): Base64 PID block captured from a registered fingerprint RD device. ## Responses - `200`: Success: Verify via Biometric - Fingerprint Authentication - `message` (string) - `authResult` (string) - `users` (object[]) - `users.abhaAddress` (string) - `users.fullName` (string) - `users.profilePhoto` (string) - `users.abhaNumber` (string) - `users.status` (string) - `users.kycStatus` (string) - `tokens` (object) - `tokens.token` (string) - `tokens.expiresIn` (integer) - `tokens.refreshToken` (string) - `tokens.refreshExpiresIn` (integer) - `400`: Bad Request (request validation failed): Biometric is locked; Biometric data did not match See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Missing Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "4faf0ca4-ce24-4804-8dfa-1dd1c9f0edfb", "message": "BIO verified successfully", "authResult": "success", "users": [ { "abhaAddress": "", "fullName": "", "profilePhoto": "", "abhaNumber": "", "status": "ACTIVE", "kycStatus": "VERIFIED" } ], "tokens": { "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000, "switchProfileEnabled": false } } ``` --- # Get ABHA-address profile `GET /abha/api/v3/phr/web/login/profile/abha-profile` **Endpoint:** `GET /abha/api/v3/phr/web/login/profile/abha-profile` **Flow:** **ABHA Address Login - Fingerprint** - step 3 of 5 - Previous: *ABHA address login via Fingerprint - verify* - Next: *Get PHR card* --- This API endpoint retrieves the user’s ABHA (Ayushman Bharat Health Account) profile. Access to this profile is granted after the successful verification of the OTP, ensuring the user’s profile information is secure. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha-profile \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{jwtToken}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `200`: The 200 response code indicates a successful request. In this context, it signifies that the user was successfully verified with the OTP in the previous API call. A valid JWT token was provided, which authenticated the user and allowed access to their profile. As a result, the user profile was successfully retrieved, including all ABHA profile details. - `abhaAddress` (string) - `fullName` (string) - `profilePhoto` (string) - `firstName` (string) - `middleName` (string) - `lastName` (string) - `dayOfBirth` (string) - `monthOfBirth` (string) - `yearOfBirth` (string) - `dateOfBirth` (string) - `gender` (string) - `email` (string) - `mobile` (string) - `abhaNumber` (string) - `address` (string) - `stateName` (string) - `pinCode` (string) - `stateCode` (string) - `districtCode` (string) - `authMethods` (string[]) - `status` (string) - `subDistrictCode` (string) - `subDistrictName` (string) - `emailVerified` (string) - `mobileVerified` (string) - `kycStatus` (string) - `400`: A Bad Request error with the description “invalid X-token” indicates that the server received a request with an invalid or missing authentication token. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: The 401 response code indicates that the request was not authorized due to invalid credentials. Ensure that your API invocation includes the appropriate authorization header. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "abhaAddress": "", "fullName": "", "profilePhoto": "", "firstName": "", "middleName": "", "lastName": "", "dayOfBirth": "", "monthOfBirth": "", "yearOfBirth": "", "dateOfBirth": "", "gender": "M", "email": "", "mobile": "", "abhaNumber": "", "address": "
", "stateName": "MAHARASHTRA", "pinCode": "", "stateCode": "27", "districtCode": "487", "authMethods": [ "AADHAAR_OTP", "MOBILE_OTP" ], "status": "ACTIVE", "subDistrictCode": "", "subDistrictName": "", "emailVerified": "false", "mobileVerified": "true", "kycStatus": "VERIFIED" } ``` --- # Get PHR card `GET /abha/api/v3/phr/web/login/profile/abha/phr-card` **Endpoint:** `GET /abha/api/v3/phr/web/login/profile/abha/phr-card` **Flow:** **ABHA Address Login - Fingerprint** - step 4 of 5 - Previous: *Get ABHA-address profile* - Next: *Get ABHA-address QR code* --- This API endpoint is used to generate a PHR Card profile. It requires valid credentials and headers for authentication. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha/phr-card \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{jwtToken}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `202`: Indicates a successful generation of PHR card See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: A 400 Bad Request error with the description “invalid X-token” indicates that the server received a request with an invalid or missing authentication token. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Invalid Credentials error occurs when a server receives a request but cannot authorize it due to incorrect or missing authentication See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors --- # Get ABHA-address QR code `GET /abha/api/v3/phr/web/login/profile/abha/qr-code` **Endpoint:** `GET /abha/api/v3/phr/web/login/profile/abha/qr-code` **Flow:** **ABHA Address Login - Fingerprint** - step 5 of 5 - Previous: *Get PHR card* - Next: none (last call of this flow) --- This API endpoint is used to generate a QR code for a complete ABHA address profile. The QR code can be used to quickly access and share the user’s ABHA address profile information. This is particularly useful for healthcare providers to retrieve patient information efficiently and securely. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha/qr-code \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{X-token}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `200`: Receives a QR code as a response which can be used to quickly access and share the user’s ABHA profile information. - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m1/errors --- # ABHA address login via IRIS - send authentication request `POST /abha/api/v3/phr/web/login/abha/request/otp` Starts IRIS login with an ABHA address. `loginId` is the RSA-encrypted ABHA address. Use the returned `txnId` in *ABHA address login via IRIS - verify*. **Endpoint:** `POST /abha/api/v3/phr/web/login/abha/request/otp` **Flow:** **ABHA Address Login - IRIS** - step 1 of 5 - Previous: none (first call of this flow) - Next: *ABHA address login via IRIS - verify* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-iris-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"ABHA-address"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"Aadhaar"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | > **Note:** Biometric ABHA-address login uses scope `ABHA-login`, not `ABHA-address-login` (the same in Swagger and Postman). ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-iris-verify" ], "loginHint": "abha-address", "loginId": "{{encryptedAbhaAddress}}", "otpSystem": "aadhaar" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: abha-address. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: aadhaar. ## Responses - `200`: Success: Send Authentication Request via Biometric (IRIS Authentication) - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Missing Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "4faf0ca4-ce24-4804-8dfa-1dd1c9f0edfb", "message": "Iris authentication request successfully sent" } ``` --- # ABHA address login via IRIS - verify `POST /abha/api/v3/phr/web/login/abha/verify` Completes IRIS login with an ABHA address. Send the `txnId` and the IRIS PID. Returns `users` and `tokens.token` (send it as `X-token` to the profile, PHR card and QR code APIs). **Endpoint:** `POST /abha/api/v3/phr/web/login/abha/verify` **Flow:** **ABHA Address Login - IRIS** - step 2 of 5 - Previous: *ABHA address login via IRIS - send authentication request* - Next: *Get ABHA-address profile* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-iris-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["iris"]` | yes | Authentication method used in this step. | | `authData.iris` | object | yes | IRIS authentication block. | | `authData.iris.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.iris.irisAuthPid` | string | yes | Base64 PID block captured from a registered IRIS RD device. | > **Note:** Biometric ABHA-address login uses scope `ABHA-login`, not `ABHA-address-login` (the same in Swagger and Postman). ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-iris-verify" ], "authData": { "authMethods": [ "iris" ], "iris": { "txnId": "41e59beb-6ee7-421e-a844-3652b2482038", "irisAuthPid": "{{irisAuthPid}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.iris` (object, required): IRIS authentication block. - `authData.iris.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.iris.irisAuthPid` (string, required): Base64 PID block captured from a registered IRIS RD device. ## Responses - `200`: Success: Verify via Biometric - Iris Authentication - `message` (string) - `authResult` (string) - `users` (object[]) - `users.abhaAddress` (string) - `users.fullName` (string) - `users.profilePhoto` (string) - `users.abhaNumber` (string) - `users.status` (string) - `users.kycStatus` (string) - `tokens` (object) - `tokens.token` (string) - `tokens.expiresIn` (integer) - `tokens.refreshToken` (string) - `tokens.refreshExpiresIn` (integer) - `400`: Bad Request (request validation failed): Biometric is locked; Biometric data did not match See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Missing Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "4faf0ca4-ce24-4804-8dfa-1dd1c9f0edfb", "message": "Iris verified successfully", "authResult": "success", "users": [ { "abhaAddress": "", "fullName": "", "profilePhoto": "", "abhaNumber": "", "status": "ACTIVE", "kycStatus": "VERIFIED" } ], "tokens": { "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000, "switchProfileEnabled": false } } ``` --- # Get ABHA-address profile `GET /abha/api/v3/phr/web/login/profile/abha-profile` **Endpoint:** `GET /abha/api/v3/phr/web/login/profile/abha-profile` **Flow:** **ABHA Address Login - IRIS** - step 3 of 5 - Previous: *ABHA address login via IRIS - verify* - Next: *Get PHR card* --- This API endpoint retrieves the user’s ABHA (Ayushman Bharat Health Account) profile. Access to this profile is granted after the successful verification of the OTP, ensuring the user’s profile information is secure. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha-profile \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{jwtToken}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `200`: The 200 response code indicates a successful request. In this context, it signifies that the user was successfully verified with the OTP in the previous API call. A valid JWT token was provided, which authenticated the user and allowed access to their profile. As a result, the user profile was successfully retrieved, including all ABHA profile details. - `abhaAddress` (string) - `fullName` (string) - `profilePhoto` (string) - `firstName` (string) - `middleName` (string) - `lastName` (string) - `dayOfBirth` (string) - `monthOfBirth` (string) - `yearOfBirth` (string) - `dateOfBirth` (string) - `gender` (string) - `email` (string) - `mobile` (string) - `abhaNumber` (string) - `address` (string) - `stateName` (string) - `pinCode` (string) - `stateCode` (string) - `districtCode` (string) - `authMethods` (string[]) - `status` (string) - `subDistrictCode` (string) - `subDistrictName` (string) - `emailVerified` (string) - `mobileVerified` (string) - `kycStatus` (string) - `400`: A Bad Request error with the description “invalid X-token” indicates that the server received a request with an invalid or missing authentication token. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: The 401 response code indicates that the request was not authorized due to invalid credentials. Ensure that your API invocation includes the appropriate authorization header. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "abhaAddress": "", "fullName": "", "profilePhoto": "", "firstName": "", "middleName": "", "lastName": "", "dayOfBirth": "", "monthOfBirth": "", "yearOfBirth": "", "dateOfBirth": "", "gender": "M", "email": "", "mobile": "", "abhaNumber": "", "address": "
", "stateName": "MAHARASHTRA", "pinCode": "", "stateCode": "27", "districtCode": "487", "authMethods": [ "AADHAAR_OTP", "MOBILE_OTP" ], "status": "ACTIVE", "subDistrictCode": "", "subDistrictName": "", "emailVerified": "false", "mobileVerified": "true", "kycStatus": "VERIFIED" } ``` --- # Get PHR card `GET /abha/api/v3/phr/web/login/profile/abha/phr-card` **Endpoint:** `GET /abha/api/v3/phr/web/login/profile/abha/phr-card` **Flow:** **ABHA Address Login - IRIS** - step 4 of 5 - Previous: *Get ABHA-address profile* - Next: *Get ABHA-address QR code* --- This API endpoint is used to generate a PHR Card profile. It requires valid credentials and headers for authentication. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha/phr-card \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{jwtToken}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `202`: Indicates a successful generation of PHR card See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: A 400 Bad Request error with the description “invalid X-token” indicates that the server received a request with an invalid or missing authentication token. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Invalid Credentials error occurs when a server receives a request but cannot authorize it due to incorrect or missing authentication See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors --- # Get ABHA-address QR code `GET /abha/api/v3/phr/web/login/profile/abha/qr-code` **Endpoint:** `GET /abha/api/v3/phr/web/login/profile/abha/qr-code` **Flow:** **ABHA Address Login - IRIS** - step 5 of 5 - Previous: *Get PHR card* - Next: none (last call of this flow) --- This API endpoint is used to generate a QR code for a complete ABHA address profile. The QR code can be used to quickly access and share the user’s ABHA address profile information. This is particularly useful for healthcare providers to retrieve patient information efficiently and securely. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha/qr-code \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{X-token}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `200`: Receives a QR code as a response which can be used to quickly access and share the user’s ABHA profile information. - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m1/errors --- # Search ABHA address (auth methods) `POST /abha/api/v3/phr/web/login/abha/search` **Endpoint:** `POST /abha/api/v3/phr/web/login/abha/search` **Flow:** **ABHA Address Login - Mobile OTP** - step 1 of 6 - Previous: none (first call of this flow) - Next: *ABHA address login via Mobile OTP - send OTP* --- This API endpoint is used to search for ABHA (Ayushman Bharat Health Account) profiles. It allows users to retrieve information about their ABHA profiles using identifier ABHA address. This is essential for verifying the user’s identity and ensuring secure access to their ABHA profile ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/search \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "abhaAddress": "" }' ``` ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `abhaAddress` (string, required): The ABHA address chosen for the account, without the @ suffix. ## Responses - `200`: The 200 response code indicates a successful request. In this context, it refers to the successful retrieve of user details based on the ABHA address - `healthIdNumber` (string) - `abhaAddress` (string) - `authMethods` (string[]) - `blockedAuthMethods` (string[]) - `status` (string) - `message` (string) - `fullName` (string) - `mobile` (string) - `400`: The 400 response code signifies a bad request. In this context, it means that no user was found for the provided ABHA address. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `401`: A 401 Unauthorized error occurs when a server receives a request without valid authentication credentials or with incorrect credentials. This error indicates that the server cannot authenticate the user, See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: A 404 Not Found error occurs when a server cannot find the requested resource. This error indicates that the server is reachable, but the specific page or resource is not available See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "healthIdNumber": "", "abhaAddress": "", "authMethods": [ "MOBILE_OTP", "AADHAAR_OTP" ], "blockedAuthMethods": [], "status": "ACTIVE", "message": null, "fullName": "", "mobile": "9340******" } ``` --- # ABHA address login via Mobile OTP - send OTP `POST /abha/api/v3/phr/web/login/abha/request/otp` Starts login with an ABHA address. ABDM sends an OTP to the mobile linked with the ABHA address. `loginId` is the RSA-encrypted ABHA address. Use *Search ABHA address (auth methods)* first to check that `MOBILE_OTP` is allowed. **Endpoint:** `POST /abha/api/v3/phr/web/login/abha/request/otp` **Flow:** **ABHA Address Login - Mobile OTP** - step 2 of 6 - Previous: *Search ABHA address (auth methods)* - Next: *ABHA address login via Mobile OTP - verify* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-address-login", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"ABHA-address"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"ABDM"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-address-login", "mobile-verify" ], "loginHint": "abha-address", "loginId": "{{encryptedAbhaAddress}}", "otpSystem": "abdm" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: abha-address. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: abdm. ## Responses - `200`: Success: OTP send-Success- Mobile Number - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Missing Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-1074eb18a5fa", "message": "OTP is sent to Mobile number ending with ******9127" } ``` --- # ABHA address login via Mobile OTP - verify `POST /abha/api/v3/phr/web/login/abha/verify` Verifies the mobile OTP for ABHA-address login. Returns the linked ABHA address(es) in `users` and `tokens.token`. Send that token as the `X-token` header to the ABHA-address profile, PHR card and QR code APIs. **Endpoint:** `POST /abha/api/v3/phr/web/login/abha/verify` **Flow:** **ABHA Address Login - Mobile OTP** - step 3 of 6 - Previous: *ABHA address login via Mobile OTP - send OTP* - Next: *Get ABHA-address profile* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-address-login", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-address-login", "mobile-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "41e59beb-6ee7-421e-a844-3652b2482038", "otpValue": "{{encryptedOtpValue}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: OTP Verification -Success Mobile Otp; OTP Verification -OTP expired - `message` (string) - `authResult` (string) - `users` (object[]) - `users.abhaAddress` (string) - `users.fullName` (string) - `users.profilePhoto` (string) - `users.abhaNumber` (string) - `users.status` (string) - `users.kycStatus` (string) - `tokens` (object) - `tokens.token` (string) - `tokens.expiresIn` (integer) - `tokens.refreshToken` (string) - `tokens.refreshExpiresIn` (integer) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Missing Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "message": "OTP verified successfully", "authResult": "success", "users": [ { "abhaAddress": "", "fullName": "", "profilePhoto": "", "abhaNumber": "", "status": "ACTIVE", "kycStatus": "VERIFIED" } ], "tokens": { "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000 } } ``` --- # Get ABHA-address profile `GET /abha/api/v3/phr/web/login/profile/abha-profile` **Endpoint:** `GET /abha/api/v3/phr/web/login/profile/abha-profile` **Flow:** **ABHA Address Login - Mobile OTP** - step 4 of 6 - Previous: *ABHA address login via Mobile OTP - verify* - Next: *Get PHR card* --- This API endpoint retrieves the user’s ABHA (Ayushman Bharat Health Account) profile. Access to this profile is granted after the successful verification of the OTP, ensuring the user’s profile information is secure. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha-profile \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{jwtToken}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `200`: The 200 response code indicates a successful request. In this context, it signifies that the user was successfully verified with the OTP in the previous API call. A valid JWT token was provided, which authenticated the user and allowed access to their profile. As a result, the user profile was successfully retrieved, including all ABHA profile details. - `abhaAddress` (string) - `fullName` (string) - `profilePhoto` (string) - `firstName` (string) - `middleName` (string) - `lastName` (string) - `dayOfBirth` (string) - `monthOfBirth` (string) - `yearOfBirth` (string) - `dateOfBirth` (string) - `gender` (string) - `email` (string) - `mobile` (string) - `abhaNumber` (string) - `address` (string) - `stateName` (string) - `pinCode` (string) - `stateCode` (string) - `districtCode` (string) - `authMethods` (string[]) - `status` (string) - `subDistrictCode` (string) - `subDistrictName` (string) - `emailVerified` (string) - `mobileVerified` (string) - `kycStatus` (string) - `400`: A Bad Request error with the description “invalid X-token” indicates that the server received a request with an invalid or missing authentication token. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: The 401 response code indicates that the request was not authorized due to invalid credentials. Ensure that your API invocation includes the appropriate authorization header. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "abhaAddress": "", "fullName": "", "profilePhoto": "", "firstName": "", "middleName": "", "lastName": "", "dayOfBirth": "", "monthOfBirth": "", "yearOfBirth": "", "dateOfBirth": "", "gender": "M", "email": "", "mobile": "", "abhaNumber": "", "address": "
", "stateName": "MAHARASHTRA", "pinCode": "", "stateCode": "27", "districtCode": "487", "authMethods": [ "AADHAAR_OTP", "MOBILE_OTP" ], "status": "ACTIVE", "subDistrictCode": "", "subDistrictName": "", "emailVerified": "false", "mobileVerified": "true", "kycStatus": "VERIFIED" } ``` --- # Get PHR card `GET /abha/api/v3/phr/web/login/profile/abha/phr-card` **Endpoint:** `GET /abha/api/v3/phr/web/login/profile/abha/phr-card` **Flow:** **ABHA Address Login - Mobile OTP** - step 5 of 6 - Previous: *Get ABHA-address profile* - Next: *Get ABHA-address QR code* --- This API endpoint is used to generate a PHR Card profile. It requires valid credentials and headers for authentication. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha/phr-card \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{jwtToken}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `202`: Indicates a successful generation of PHR card See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: A 400 Bad Request error with the description “invalid X-token” indicates that the server received a request with an invalid or missing authentication token. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Invalid Credentials error occurs when a server receives a request but cannot authorize it due to incorrect or missing authentication See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors --- # Get ABHA-address QR code `GET /abha/api/v3/phr/web/login/profile/abha/qr-code` **Endpoint:** `GET /abha/api/v3/phr/web/login/profile/abha/qr-code` **Flow:** **ABHA Address Login - Mobile OTP** - step 6 of 6 - Previous: *Get PHR card* - Next: none (last call of this flow) --- This API endpoint is used to generate a QR code for a complete ABHA address profile. The QR code can be used to quickly access and share the user’s ABHA address profile information. This is particularly useful for healthcare providers to retrieve patient information efficiently and securely. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha/qr-code \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{X-token}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `200`: Receives a QR code as a response which can be used to quickly access and share the user’s ABHA profile information. - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m1/errors --- # Get ABHA QR code `GET /abha/api/v3/profile/account/qrCode` **Endpoint:** `GET /abha/api/v3/profile/account/qrCode` **Flow:** **ABHA Card & Profile** - independent API; call the one that fits your identifier / modality. --- This API endpoint is used to generate a QR code for an ABHA (Ayushman Bharat Health Account) profile. The QR code can be used to quickly access and share the user’s ABHA profile information. This is particularly useful for healthcare providers to retrieve patient information efficiently and securely. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/qrCode \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{X-token}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `200`: Receives a QR code as a response which can be used to quickly access and share the user’s ABHA profile information. - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m1/errors --- # Retrieve ABHA card image `GET /abha/api/v3/profile/account/abha-card` **Endpoint:** `GET /abha/api/v3/profile/account/abha-card` **Flow:** **ABHA Card & Profile** - independent API; call the one that fits your identifier / modality. --- This API endpoint is used to retrieve the ABHA card image. It requires valid credentials and headers for authentication. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/abha-card \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{X-token}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `200`: Successfully retrieved ABHA card image. - `400`: Invalid X-token. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `message` (string) - `timestamp` (string) - `401`: Unauthorized. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors --- # Get ABHA profile `GET /abha/api/v3/profile/account` **Endpoint:** `GET /abha/api/v3/profile/account` **Flow:** **ABHA Card & Profile** - independent API; call the one that fits your identifier / modality. --- This API endpoint is used to manage ABHA (Ayushman Bharat Health Account) profiles. It allows users to fetch the user profile, ensuring that their details are accurate and up-to-date. This is essential for maintaining the integrity and security of the user’s health records. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{X-token}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `200`: The account information was successfully retrieved or updated. - `ABHANumber` (string) - `preferredAbhaAddress` (string) - `mobile` (string) - `firstName` (string) - `middleName` (string) - `lastName` (string) - `name` (string) - `yearOfBirth` (string) - `dayOfBirth` (string) - `monthOfBirth` (string) - `gender` (string) - `profilePhoto` (string) - `status` (string) - `stateCode` (string) - `districtCode` (string) - `pincode` (string) - `address` (string) - `kycPhoto` (string) - `stateName` (string) - `districtName` (string) - `subdistrictName` (string) - `authMethods` (string[]) - `tags` (object) - `kycVerified` (boolean) - `verificationStatus` (string) - `verificationType` (string) - `localizedDetails` (object) - `localizedDetails.name` (string) - `localizedDetails.stateName` (string) - `localizedDetails.districtName` (string) - `localizedDetails.villageName` (string) - `localizedDetails.townName` (string) - `localizedDetails.gender` (string) - `localizedDetails.localizedLabels` (object) - `localizedDetails.localizedLabels.name` (string) - `localizedDetails.localizedLabels.abhaNumber` (string) - `localizedDetails.localizedLabels.abhaAddress` (string) - `localizedDetails.localizedLabels.gender` (string) - `localizedDetails.localizedLabels.dob` (string) - `localizedDetails.localizedLabels.mobile` (string) - `createdDate` (string) - `400`: Indicates various errors encountered during the account management process, such as invalid identifiers or missing parameters. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `message` (string) - `timestamp` (string) - `401`: The request was unauthorized. This can occur due to invalid credentials or token. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "ABHANumber": "", "preferredAbhaAddress": "", "mobile": "******0903", "firstName": "Username", "middleName": "", "lastName": "", "name": "", "yearOfBirth": "", "dayOfBirth": "", "monthOfBirth": "", "gender": "M", "profilePhoto": "", "status": "ACTIVE", "stateCode": "27", "districtCode": "478", "pincode": "", "address": "
", "kycPhoto": "", "stateName": "MAHARASHTRA", "districtName": "
", "subdistrictName": "
", "authMethods": [ "MOBILE_OTP", "AADHAAR_BIO", "... 3 more of the same shape" ], "tags": {}, "kycVerified": true, "verificationStatus": "VERIFIED", "verificationType": "AADHAAR", "localizedDetails": { "name": "", "stateName": "महाराष्ट्र", "districtName": "
", "villageName": "
", "townName": "
", "gender": "पुरुष", "localizedLabels": { "name": "नाव", "abhaNumber": "आभा क्रमांक", "abhaAddress": "आभा पत्ता", "gender": "लिंग", "dob": "जन्मतारीख", "mobile": "मोबाईल" } }, "createdDate": "07-05-2024" } ``` --- # Download ABHA card `GET /abha/api/v3/profile/account/download-abha-card` **Endpoint:** `GET /abha/api/v3/profile/account/download-ABHA-card` **Flow:** **ABHA Card & Profile** - independent API; call the one that fits your identifier / modality. --- Downloads the ABHA card of the logged-in user (`X-token`). > **Note:** This API is only in the Postman collection (ABHA Profile/3. ABHA Card/3.4). The response is assumed to be a PDF / binary card, the same as *Retrieve ABHA Card image*. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/download-abha-card \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{X-token}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `200`: ABHA card file. - `400`: Invalid X-token. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `message` (string) - `timestamp` (string) - `401`: Unauthorized. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors --- # Refresh user token `GET /abha/api/v3/profile/account/request/token` **Endpoint:** `GET /abha/api/v3/profile/account/request/token` **Flow:** **Access Tokens & Encryption** - independent API; call the one that fits your identifier / modality. --- This API endpoint is used to request a token for accessing a user’s ABHA (Ayushman Bharat Health Account) profile. This token is essential for authenticating and authorizing the user to perform various actions within their profile. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/request/token \ --header 'Authorization: Bearer ' \ --header 'R-token: Bearer {{R-jwtToken}}' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `R-token` (string, required): Refresh token (`Bearer `) received at login. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `REQUEST-ID` (string, required): Unique UUID for every request. ## Responses - `200`: The token was successfully generated and sent to the user’s registered contact method. - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `400`: The 400 response code indicates a bad request See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `message` (string) - `timestamp` (string) - `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 See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `value` (object) - `value.code` (string) - `value.message` (string) - `value.description` (string) - `404`: A 404 Not Found error occurs when a server cannot find the requested resource. This error indicates that the server is reachable, but the specific page or resource is not available See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000 } ``` --- # Generate access token `POST /api/hiecm/gateway/v3/sessions` Generate an access token. When invoked, it facilitates the authentication process by providing a secure token that can be used to access various services and resources within the system. This functionality is essential for ensuring secure and authorised access, enabling users to interact with protected endpoints and perform operations that require authentication. By using this API, users can obtain the necessary tokens to maintain secure sessions and access the system’s features effectively. ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/gateway/v3/sessions \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'Content-Type: application/json' \ --data '{ "clientId": "SBX_0000", "clientSecret": "0******-***-***-***-a****", "grantType": "client_credentials" }' ``` ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended ## Body - `clientId` (string, required): The client ID issued to the integrator by ABDM at registration. - `clientSecret` (string, required): The client secret issued to the integrator by ABDM along with the client ID. - `grantType` (string, required): The method used by the client to obtain an access token, e.g. client_credentials. One of: client_credentials. ## Responses - `202`: Accepted - `accessToken` (string) - `expiresIn` (integer) - `refreshExpiresIn` (integer) - `refreshToken` (string) - `tokenType` (string) - `204`: No Content - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `400`: Bad Request - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): ABDM-1015 - Invalid Response. May be returned either bare (`ABDM-1015`) or with a trailing ": " separator (`ABDM-1015: `); match on the code itself and tolerate the separator. - `error.message` (string, required) - `401`: Unauthorized. The request carried no valid credentials, or the access token has expired. Obtain a fresh token from the session API and retry. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string): Short description of the failure. - `description` (string): Detailed description of the failure. - `403`: Forbidden. The caller is authenticated but is not permitted to perform this operation on this resource. - `500`: Internal Server Error - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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. - `error.message` (string, required) - `503`: Service Unavailable - `code` (string, required): 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. - `message` (string, required) Shape of the 202 response, generated from the schema. The values are placeholders, not a captured response: ```json { "accessToken": "", "expiresIn": 1200, "refreshExpiresIn": 1800, "refreshToken": "", "tokenType": "bearer" } ``` --- # Get public certificate (RSA encryption key) `GET /abha/api/v3/profile/public/certificate` Fetch the public key used for encryption of Aadhaar, OTP, mobile and other fields which require encryption. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/public/certificate \ --header 'Authorization: Bearer ' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `REQUEST-ID` (string, required): Unique UUID for every request. ## Responses - `200`: Successful response - `publicKey` (string) - `encryptionAlgorithm` (string) - `400`: The 400 response code indicates a bad request See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `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 See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `example` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "publicKey": "MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAstWB95C5pHLXiYW59qyO4Xb+59KYVm9Hywbo77qETZVAyc6VIsxU+UWhd/k/YtjZibCznB+HaXWX9TVTFs9Nwgv7LRGq5uLczpZQDrU7dnGkl/urRA8p0Jv/f8T0MZdFWQgks91uFffeBmJOb58u68ZRxSYGMPe4hb9XXKDVsgoSJaRNYviH7RgAI2QhTCwLEiMqIaUX3p1SAc178ZlN8qHXSSGXvhDR1GKM+y2DIyJqlzfik7lD14mDY/I4lcbftib8cv7llkybtjX1AayfZp4XpmIXKWv8nRM488/jOAF81Bi13paKgpjQUUuwq9tb5Qd/DChytYgBTBTJFe7irDFCmTIcqPr8+IMB7tXA3YXPp3z605Z6cGoYxezUm2Nz2o6oUmarDUntDhq/PnkNergmSeSvS8gD9DHBuJkJWZweG3xOPXiKQAUBr92mdFhJGm6fitO5jsBxgpmulxpG0oKDy9lAOLWSqK92JMcbMNHn4wRikdI9HSiXrrI7fLhJYTbyU3I4v5ESdEsayHXuiwO/1C8y56egzKSw44GAtEpbAkTNEEfK5H5R0QnVBIXOvfeF4tzGvmkfOO6nNXU3o/WAdOyV3xSQ9dqLY5MEL4sJCGY1iJBIAQ452s8v0ynJG5Yq+8hNhsCVnklCzAlsIzQpnSVDUVEzv17grVAw078CAwEAAQ==", "encryptionAlgorithm": "RSA/ECB/OAEPWithSHA-1AndMGF1Padding" } ``` --- # Create ABHA - Demographic authentication (Demo Auth) `POST /abha/api/v3/enrollment/enrol/byAadhaar` Creates an ABHA number from Aadhaar demographic details (name, DOB, gender, state/district, mobile), without OTP or biometric. If an ABHA already exists for the Aadhaar, it is returned. **Only for integrators approved by NHA**, who must send the `Benefit-Name` header. **Endpoint:** `POST /abha/api/v3/enrollment/enrol/byAadhaar` **Flow:** **Benefit - Child ABHA** - step 1 of 6 - Previous: none (first call of this flow) - Next: *Create Child ABHA* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | REQUEST-ID | yes | Unique UUID for every request. | | Benefit-Name | yes | **Applicable for user who is enrolling via Benefit Program.** | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["demo_auth"]` | yes | Authentication method used in this step. | | `authData.demo_auth` | object | yes | Demographic authentication block (Aadhaar demographic match). | | `authData.demo_auth.aadhaarNumber` | string | yes | Aadhaar number, RSA-encrypted. | | `authData.demo_auth.districtCode` | string | yes | LGD district code. | | `authData.demo_auth.stateCode` | string | yes | LGD state code. | | `authData.demo_auth.dateOfBirth` | string | yes | Date of birth as per Aadhaar (dd-MM-yyyy). | | `authData.demo_auth.gender` | string | yes | Gender (M / F / O). | | `authData.demo_auth.name` | string | yes | Full name. | | `authData.demo_auth.mobile` | string | no | Mobile number to be linked with the ABHA (plain, 10 digits). | | `authData.demo_auth.profilePhoto` | string | no | Base64 encoded profile photo. | | `authData.demo_auth.pinCode` | string | no | PIN code of the address. | | `authData.demo_auth.address` | string | no | Address as per Aadhaar. | | `consent` | object | yes | Consent captured from the user for ABHA enrolment. | | `consent.code` | string | yes | Consent code. Use `ABHA-enrollment`. | | `consent.version` | string | yes | Consent version. Use `1.4`. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/byAadhaar \ --header 'Authorization: Bearer ' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'Content-Type: application/json' \ --data '{ "authData": { "authMethods": [ "demo_auth" ], "demo_auth": { "aadhaarNumber": "{{encrypted aadhaar number}}", "districtCode": "{{District code}}", "stateCode": "{{State code}}", "dateOfBirth": "{{DOB}}", "gender": "{{Gender}}", "name": "{{Full name}}", "mobile": "{{Mobile number}}", "profilePhoto": "{{Base64 plain String}}", "pinCode": "", "address": "
" } }, "consent": { "code": "abha-enrollment", "version": "1.4" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `REQUEST-ID` (string, required): Unique UUID for every request. - `BENEFIT_NAME` (string, required): **Applicable for user who is enrolling via Benefit Program.** ## Body - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.demo_auth` (object, required): Demographic authentication block (Aadhaar demographic match). - `authData.demo_auth.aadhaarNumber` (string, required): Aadhaar number, RSA-encrypted. - `authData.demo_auth.districtCode` (string, required): LGD district code. - `authData.demo_auth.stateCode` (string, required): LGD state code. - `authData.demo_auth.dateOfBirth` (string, required): Date of birth as per Aadhaar (dd-MM-yyyy). - `authData.demo_auth.gender` (string, required): Gender (M / F / O). - `authData.demo_auth.name` (string, required): Full name. - `authData.demo_auth.mobile` (string): Mobile number to be linked with the ABHA (plain, 10 digits). - `authData.demo_auth.profilePhoto` (string): Base64 encoded profile photo. - `authData.demo_auth.pinCode` (string): PIN code of the address. - `authData.demo_auth.address` (string): Address as per Aadhaar. - `consent` (object, required): Consent captured from the user for ABHA enrolment. - `consent.code` (string, required): Consent code. Use `abha-enrollment`. - `consent.version` (string, required): Consent version. Use `1.4`. ## Responses - `200`: Success: DemoAuth API - New ABHA creation; DemoAuth API - In case of Existing ABHA Number - `message` (string) - `tokens` (object) - `tokens.token` (string) - `tokens.expiresIn` (integer) - `tokens.refreshToken` (string) - `tokens.refreshExpiresIn` (integer) - `ABHAProfile` (object) - `ABHAProfile.firstName` (string) - `ABHAProfile.middleName` (string) - `ABHAProfile.lastName` (string) - `ABHAProfile.dob` (string) - `ABHAProfile.gender` (string) - `ABHAProfile.mobile` (string) - `ABHAProfile.phrAddress` (string[]) - `ABHAProfile.districtCode` (string) - `ABHAProfile.stateCode` (string) - `ABHAProfile.abhaType` (string) - `ABHAProfile.stateName` (string) - `ABHAProfile.districtName` (string) - `ABHAProfile.ABHANumber` (string) - `ABHAProfile.abhaStatus` (string) - `isNew` (boolean) - `400`: Bad Request (request validation failed): DemoAuth API-State District not matching See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): DemoAuth API-Invalid Benefit Name See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `message` (string) - `timestamp` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure): DemoAuth API-6 ABHA linked to Mobile; DemoAuth API-Details not matches against Aadhaar See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "healthIdNumber": "", "healthId": "", "mobile": "******0903", "firstName": "Username", "middleName": "", "lastName": "", "name": "", "yearOfBirth": "", "dayOfBirth": "", "monthOfBirth": "", "gender": "F", "stateCode": "27", "districtCode": "490", "stateName": "MAHARASHTRA", "districtName": "
", "kycVerified": true, "token": "", "jwtResponse": { "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000 }, "status": "ACTIVE", "new": true } ``` --- # Create Child ABHA `POST /abha/api/v3/enrollment/enrol/byAadhaar` Creates a Child ABHA linked to the parent's ABHA. Send the **parent's** `X-token` (from the parent's ABHA creation or login) and `Benefit-Name`.**Only for Government integrators approved by NHA.** **Endpoint:** `POST /abha/api/v3/enrollment/enrol/byAadhaar` **Flow:** **Benefit - Child ABHA** - step 2 of 6 - Previous: *Create ABHA - Demographic authentication (Demo Auth)* - Next: *Get Child ABHA list of the parent* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | REQUEST-ID | yes | Unique UUID for every request. | | Benefit-Name | yes | **Applicable for user who is enrolling via Benefit Program.** | | X-token | yes | **Applicable for child ABHA creation. X-token of Parent user, user can get X-token after login to the system** | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["child"]` | yes | Authentication method used in this step. | | `authData.child` | object | yes | Child ABHA details. | | `authData.child.dayOfBirth` | string | yes | Day of birth of the child. | | `authData.child.monthOfBirth` | string | yes | Month of birth of the child. | | `authData.child.yearOfBirth` | string | yes | Year of birth of the child. | | `authData.child.gender` | string | yes | Gender (M / F / O). | | `authData.child.password` | string | no | Password (RSA-encrypted) / password block. | | `authData.child.name` | string | yes | Full name. | | `authData.child.profilePhoto` | string | no | Base64 encoded profile photo. | | `authData.child.parentConsent` | string | no | Parent consent flag for creating a child ABHA. | | `consent` | object | yes | Consent captured from the user for ABHA enrolment. | | `consent.code` | string | yes | Consent code. Use `ABHA-enrollment`. | | `consent.version` | string | yes | Consent version. Use `1.4`. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/byAadhaar \ --header 'Authorization: Bearer ' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'X-token: Bearer {{X-token}}' \ --header 'Content-Type: application/json' \ --data '{ "authData": { "authMethods": [ "child" ], "child": { "dayOfBirth": "{{day Of Birth}}", "monthOfBirth": "{{month Of Birth}}", "yearOfBirth": "{{year Of Birth}}", "gender": "{{Gender}}", "password": "", "name": "{{Name}}", "profilePhoto": "", "parentConsent": "true" } }, "consent": { "code": "abha-enrollment", "version": "1.4" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `REQUEST-ID` (string, required): Unique UUID for every request. - `BENEFIT_NAME` (string, required): **Applicable for user who is enrolling via Benefit Program.** - `X-token` (string, required): **Applicable for child abha creation. X-token of Parent user, user can get X-token after login to the system** ## Body - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.child` (object, required): Child ABHA details. - `authData.child.dayOfBirth` (string, required): Day of birth of the child. - `authData.child.monthOfBirth` (string, required): Month of birth of the child. - `authData.child.yearOfBirth` (string, required): Year of birth of the child. - `authData.child.gender` (string, required): Gender (M / F / O). - `authData.child.password` (string): Password (RSA-encrypted) / password block. - `authData.child.name` (string, required): Full name. - `authData.child.profilePhoto` (string): Base64 encoded profile photo. - `authData.child.parentConsent` (string): Parent consent flag for creating a child ABHA. - `consent` (object, required): Consent captured from the user for ABHA enrolment. - `consent.code` (string, required): Consent code. Use `abha-enrollment`. - `consent.version` (string, required): Consent version. Use `1.4`. ## Responses - `200`: Success: Create CHILD ABHA - Positive Flow; CHILD ABHA - Account Already Exist - `message` (string) - `tokens` (object) - `tokens.token` (string) - `tokens.expiresIn` (integer) - `tokens.refreshToken` (string) - `tokens.refreshExpiresIn` (integer) - `ABHAProfile` (object) - `ABHAProfile.firstName` (string) - `ABHAProfile.middleName` (string) - `ABHAProfile.lastName` (string) - `ABHAProfile.dob` (string) - `ABHAProfile.gender` (string) - `ABHAProfile.mobile` (string) - `ABHAProfile.phrAddress` (string[]) - `ABHAProfile.districtCode` (string) - `ABHAProfile.stateCode` (string) - `ABHAProfile.abhaType` (string) - `ABHAProfile.stateName` (string) - `ABHAProfile.districtName` (string) - `ABHAProfile.ABHANumber` (string) - `ABHAProfile.abhaStatus` (string) - `isNew` (boolean) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): CHILD ABHA-Invalid Benefit Name; CHILD ABHA-Access Issue; CHILD ABHA - X-token expired See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `message` (string) - `timestamp` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure): CHILD ABHA-CHILD LIMIT See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "message": "Account created successfully", "tokens": { "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000 }, "ABHAProfile": { "firstName": "Username", "middleName": "", "lastName": "", "dob": "", "gender": "F", "photo": "", "mobile": "******0903", "districtCode": "490", "stateCode": "27", "abhaType": "CHILD", "stateName": "Maharashtra", "districtName": "
", "ABHANumber": "", "abhaStatus": "ACTIVE" }, "isNew": true } ``` --- # Get Child ABHA list of the parent `GET /abha/api/v3/enrollment/profile/children` **Endpoint:** `GET /abha/api/v3/enrollment/profile/children` **Flow:** **Benefit - Child ABHA** - step 3 of 6 - Previous: *Create Child ABHA* - Next: *Update Child ABHA profile* --- This API endpoint retrieves the ABHA (Ayushman Bharat Health Account) profile of a child, making it especially useful for managing minors’ health records and information. It provides essential details such as the child’s ABHA number, date of birth, name, and gender. Additionally, this endpoint allows users to access all child records linked to a parent’s ABHA number. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/profile/children \ --header 'Authorization: Bearer ' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'Content-Type: application/json' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'X-token: Bearer {{X-token}}' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `REQUEST-ID` (string, required): Unique UUID for every request. - `Content-Type` (string, required): `application/json`. - `BENEFIT_NAME` (string, required): Benefit / program name approved by NHA for the integrator. - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. ## Responses - `200`: Indicates a successful request. The response includes the updated child ABHA profile details - `parentAbhaNumber` (string) - `mobileNumber` (string) - `childrenCount` (integer) - `children` (object[]) - `children.dateOfBirth` (string) - `children.name` (string) - `children.gender` (string) - `children.phrAddress` (string) - `children.ABHANumber` (string) - `401`: Indicates an unauthorized request due to invalid credentials See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "parentAbhaNumber": "", "mobileNumber": "******0903", "childrenCount": 2, "children": [ { "dateOfBirth": "", "name": "", "gender": "M", "phrAddress": "", "ABHANumber": "" }, { "dateOfBirth": "", "name": "", "gender": "F", "phrAddress": "", "ABHANumber": "" } ] } ``` --- # Update Child ABHA profile `PATCH /abha/api/v3/profile/account` Updates the demographic details (name, DOB, gender) of a Child ABHA. Send `Benefit-Name` and the `X-token` from the Child ABHA creation response. A non-KYC Child ABHA can be updated only once. **Endpoint:** `PATCH /abha/api/v3/profile/account` **Flow:** **Benefit - Child ABHA** - step 4 of 6 - Previous: *Get Child ABHA list of the parent* - Next: *Child ABHA KYC - send Aadhaar OTP* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | REQUEST-ID | yes | Unique UUID for every request. | | Benefit-Name | yes | Benefit / programme name approved by NHA for the integrator. | | X-token | yes | User token (`Bearer `) received after verification / login. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `abhaNumber` | string | yes | 14 digit ABHA number (xx-xxxx-xxxx-xxxx). | | `dob` | string | yes | Date of birth (d-M-yyyy). | | `name` | string | yes | Full name. | | `gender` | string | yes | Gender (M / F / O). | ```bash curl --request PATCH \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account \ --header 'Authorization: Bearer ' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'X-token: Bearer {{X-token}}' \ --header 'Content-Type: application/json' \ --data '{ "abhaNumber": "", "dob": "", "name": "", "gender": "F" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `REQUEST-ID` (string, required): Unique UUID for every request. - `BENEFIT_NAME` (string, required): Benefit / program name approved by NHA for the integrator. - `X-token` (string, required): User token (`Bearer `) received after verification / login. ## Body - `abhaNumber` (string, required): 14 digit ABHA number (xx-xxxx-xxxx-xxxx). - `dob` (string, required): Date of birth (d-M-yyyy). - `name` (string, required): Full name. - `gender` (string, required): Gender (M / F / O). ## Responses - `200`: Success: CHILD ABHA-Child Details - `ABHANumber` (string) - `preferredAbhaAddress` (string) - `mobile` (string) - `firstName` (string) - `middleName` (string) - `lastName` (string) - `yearOfBirth` (integer) - `monthOfBirth` (integer) - `dayOfBirth` (integer) - `gender` (string) - `status` (string) - `stateCode` (integer) - `districtCode` (integer) - `stateName` (string) - `districtName` (string) - `subdistrictName` (string) - `authMethods` (string[]) - `tags` (object) - `kycVerified` (boolean) - `verificationStatus` (string) - `verificationType` (string) - `createdDate` (string) - `400`: Bad Request (request validation failed): CHILD ABHA-Access Issue See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.message` (string) - `error.timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): CHILD ABHA-Access Issue See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `error` (object) - `error.code` (string) - `error.message` (string) - `404`: Not Found: CHILD ABHA-Access Issue See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure): CHILD ABHA-Access Issue See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "ABHANumber": "", "preferredAbhaAddress": "", "mobile": "******0903", "firstName": "", "middleName": "", "lastName": "", "yearOfBirth": "", "monthOfBirth": "", "dayOfBirth": "", "gender": "F", "status": "ACTIVE", "stateCode": 27, "districtCode": 290, "stateName": "Maharashtra", "districtName": "
", "subdistrictName": "
", "authMethods": [ "MOBILE_OTP" ], "tags": {}, "kycVerified": false, "verificationStatus": "VERIFIED", "verificationType": "CHILD_ABHA", "createdDate": "10-05-2024" } ``` --- # Child ABHA KYC - send Aadhaar OTP `POST /abha/api/v3/profile/account/request/otp` Starts KYC of a non-KYC Child ABHA. UIDAI sends an OTP to the mobile linked with the child's Aadhaar number. Send the child's `X-token`. **Endpoint:** `POST /abha/api/v3/profile/account/request/otp` **Flow:** **Benefit - Child ABHA** - step 5 of 6 - Previous: *Update Child ABHA profile* - Next: *Child ABHA KYC - verify Aadhaar OTP* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | X-token | yes | User token (`Bearer `) received after ABHA creation / login. | | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-profile", "re-KYC"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"Aadhaar"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"Aadhaar"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/request/otp \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{X-token}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-profile", "re-kyc" ], "loginHint": "aadhaar", "loginId": "{{encrypted aadhaar number}}", "otpSystem": "aadhaar" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: aadhaar. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: aadhaar. ## Responses - `200`: Success: KYC Child ABHA -Send OTP - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `Invalid Scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "c2095ea0-52ed-44ee-b8fc-02375b874e7a", "message": "OTP is sent to Aadhaar registered mobile number ending with *******0903" } ``` --- # Child ABHA KYC - verify Aadhaar OTP `POST /abha/api/v3/profile/account/verify` Verifies the Aadhaar OTP sent by *Child ABHA KYC - send Aadhaar OTP* and marks the Child ABHA as KYC verified. **Endpoint:** `POST /abha/api/v3/profile/account/verify` **Flow:** **Benefit - Child ABHA** - step 6 of 6 - Previous: *Child ABHA KYC - send Aadhaar OTP* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | X-token | yes | User token (`Bearer `) received after ABHA creation / login. | | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-profile", "re-KYC"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/verify \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{X-token}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-profile", "re-kyc" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted otp value}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: CHILD ABHA KYC- Positive Flow - `txnId` (string) - `authResult` (string) - `message` (string) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `Invalid Scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `message` (string) - `timestamp` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "bb548986-e96d-4b48-be1b-1e36741e867d", "authResult": "success", "message": "KYC verification has been done", "accounts": [ { "ABHANumber": "" }, { "mobileVerified": "true" } ] } ``` --- # Create ABHA - Demographic authentication (Demo Auth) `POST /abha/api/v3/enrollment/enrol/byAadhaar` Creates an ABHA number from Aadhaar demographic details (name, DOB, gender, state/district, mobile), without OTP or biometric. If an ABHA already exists for the Aadhaar, it is returned. **Only for integrators approved by NHA**, who must send the `Benefit-Name` header. **Endpoint:** `POST /abha/api/v3/enrollment/enrol/byAadhaar` **Flow:** **Benefit - Create ABHA via Demo Auth** - step 1 of 1 - Previous: none (first call of this flow) - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | REQUEST-ID | yes | Unique UUID for every request. | | Benefit-Name | yes | **Applicable for user who is enrolling via Benefit Program.** | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["demo_auth"]` | yes | Authentication method used in this step. | | `authData.demo_auth` | object | yes | Demographic authentication block (Aadhaar demographic match). | | `authData.demo_auth.aadhaarNumber` | string | yes | Aadhaar number, RSA-encrypted. | | `authData.demo_auth.districtCode` | string | yes | LGD district code. | | `authData.demo_auth.stateCode` | string | yes | LGD state code. | | `authData.demo_auth.dateOfBirth` | string | yes | Date of birth as per Aadhaar (dd-MM-yyyy). | | `authData.demo_auth.gender` | string | yes | Gender (M / F / O). | | `authData.demo_auth.name` | string | yes | Full name. | | `authData.demo_auth.mobile` | string | no | Mobile number to be linked with the ABHA (plain, 10 digits). | | `authData.demo_auth.profilePhoto` | string | no | Base64 encoded profile photo. | | `authData.demo_auth.pinCode` | string | no | PIN code of the address. | | `authData.demo_auth.address` | string | no | Address as per Aadhaar. | | `consent` | object | yes | Consent captured from the user for ABHA enrolment. | | `consent.code` | string | yes | Consent code. Use `ABHA-enrollment`. | | `consent.version` | string | yes | Consent version. Use `1.4`. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/byAadhaar \ --header 'Authorization: Bearer ' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'Content-Type: application/json' \ --data '{ "authData": { "authMethods": [ "demo_auth" ], "demo_auth": { "aadhaarNumber": "{{encrypted aadhaar number}}", "districtCode": "{{District code}}", "stateCode": "{{State code}}", "dateOfBirth": "{{DOB}}", "gender": "{{Gender}}", "name": "{{Full name}}", "mobile": "{{Mobile number}}", "profilePhoto": "{{Base64 plain String}}", "pinCode": "", "address": "
" } }, "consent": { "code": "abha-enrollment", "version": "1.4" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `REQUEST-ID` (string, required): Unique UUID for every request. - `BENEFIT_NAME` (string, required): **Applicable for user who is enrolling via Benefit Program.** ## Body - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.demo_auth` (object, required): Demographic authentication block (Aadhaar demographic match). - `authData.demo_auth.aadhaarNumber` (string, required): Aadhaar number, RSA-encrypted. - `authData.demo_auth.districtCode` (string, required): LGD district code. - `authData.demo_auth.stateCode` (string, required): LGD state code. - `authData.demo_auth.dateOfBirth` (string, required): Date of birth as per Aadhaar (dd-MM-yyyy). - `authData.demo_auth.gender` (string, required): Gender (M / F / O). - `authData.demo_auth.name` (string, required): Full name. - `authData.demo_auth.mobile` (string): Mobile number to be linked with the ABHA (plain, 10 digits). - `authData.demo_auth.profilePhoto` (string): Base64 encoded profile photo. - `authData.demo_auth.pinCode` (string): PIN code of the address. - `authData.demo_auth.address` (string): Address as per Aadhaar. - `consent` (object, required): Consent captured from the user for ABHA enrolment. - `consent.code` (string, required): Consent code. Use `abha-enrollment`. - `consent.version` (string, required): Consent version. Use `1.4`. ## Responses - `200`: Success: DemoAuth API - New ABHA creation; DemoAuth API - In case of Existing ABHA Number - `message` (string) - `tokens` (object) - `tokens.token` (string) - `tokens.expiresIn` (integer) - `tokens.refreshToken` (string) - `tokens.refreshExpiresIn` (integer) - `ABHAProfile` (object) - `ABHAProfile.firstName` (string) - `ABHAProfile.middleName` (string) - `ABHAProfile.lastName` (string) - `ABHAProfile.dob` (string) - `ABHAProfile.gender` (string) - `ABHAProfile.mobile` (string) - `ABHAProfile.phrAddress` (string[]) - `ABHAProfile.districtCode` (string) - `ABHAProfile.stateCode` (string) - `ABHAProfile.abhaType` (string) - `ABHAProfile.stateName` (string) - `ABHAProfile.districtName` (string) - `ABHAProfile.ABHANumber` (string) - `ABHAProfile.abhaStatus` (string) - `isNew` (boolean) - `400`: Bad Request (request validation failed): DemoAuth API-State District not matching See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): DemoAuth API-Invalid Benefit Name See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `message` (string) - `timestamp` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure): DemoAuth API-6 ABHA linked to Mobile; DemoAuth API-Details not matches against Aadhaar See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "healthIdNumber": "", "healthId": "", "mobile": "******0903", "firstName": "Username", "middleName": "", "lastName": "", "name": "", "yearOfBirth": "", "dayOfBirth": "", "monthOfBirth": "", "gender": "F", "stateCode": "27", "districtCode": "490", "stateName": "MAHARASHTRA", "districtName": "
", "kycVerified": true, "token": "", "jwtResponse": { "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000 }, "status": "ACTIVE", "new": true } ``` --- # Link / De-link benefit using X-token `POST /abha/api/v3/profile/benefit/linkAndDelink` Links (`scope: ["link"]`) or de-links (`scope: ["de-link"]`) the benefit named in the `BENEFIT_NAME` header for the ABHA of the logged-in user (`X-token`). The body has only `scope`. **Endpoint:** `POST /abha/api/v3/profile/benefit/linkAndDelink` **Flow:** **Benefit - Link / De-link** - independent API; call the one that fits your identifier / modality. **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | BENEFIT_NAME | yes | Benefit / programme name approved by NHA for the integrator. | | X-token | yes | User token (`Bearer `) received after verification / login. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["link"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/benefit/linkAndDelink \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'X-token: Bearer {{X-token}}' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "link" ] }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `BENEFIT_NAME` (string, required): Benefit / program name approved by NHA for the integrator. - `X-token` (string, required): User token (`Bearer `) received after verification / login. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. ## Responses - `200`: Success: Linked successfully; Linked successfully (2); Linked successfully (Postman); De-linked successfully - `benefitName` (string) - `healthId` (string) - `status` (string) - `400`: Bad Request (request validation failed): Already de-linked (spec); Already linked; Already de-linked; Invalid x-token See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token; Invalid benefit name; De-link_insurance restricted; link- Insurance restricted See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "benefitName": "COVIN", "healthId": "", "status": "Benefit record has been linked successfully" } ``` --- # Link / De-link benefit using ABHA number `POST /abha/api/v3/profile/benefit/linkAndDelink` Links (`scope: ["link"]`) or de-links (`scope: ["de-link"]`) the benefit named in the `BENEFIT_NAME` header for an ABHA number. `loginId` is the RSA-encrypted ABHA number. **Endpoint:** `POST /abha/api/v3/profile/benefit/linkAndDelink` **Flow:** **Benefit - Link / De-link** - independent API; call the one that fits your identifier / modality. **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | BENEFIT_NAME | yes | Benefit / programme name approved by NHA for the integrator. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["link"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"ABHA-number"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/benefit/linkAndDelink \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "link" ], "loginHint": "abha-number", "loginId": "{{encrypted abha-number}}" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `BENEFIT_NAME` (string, required): Benefit / program name approved by NHA for the integrator. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: abha-number. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. ## Responses - `200`: Success: Linked successfully; Linked successfully (2); Linked successfully (Postman); De-linked successfully - `benefitName` (string) - `healthId` (string) - `status` (string) - `400`: Bad Request (request validation failed): Already de-linked (spec); Already linked; Already de-linked; Invalid Login ID See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token; Invalid Benefit Name - Link; Invalid Benefit Name - De-link; Insurance Restricted - Link; Insurance Restricted - De-link See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "benefitName": "COVIN", "healthId": "", "status": "Benefit record has been linked successfully" } ``` --- # Link / De-link benefit using xmlUid `POST /abha/api/v3/profile/benefit/linkAndDelink` Links (`scope: ["link"]`) or de-links (`scope: ["de-link"]`) the benefit named in the `BENEFIT_NAME` header for an Aadhaar xmlUid. `loginId` is the RSA-encrypted xmlUid. **Endpoint:** `POST /abha/api/v3/profile/benefit/linkAndDelink` **Flow:** **Benefit - Link / De-link** - independent API; call the one that fits your identifier / modality. **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | BENEFIT_NAME | yes | Benefit / programme name approved by NHA for the integrator. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["de-link"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"xmlUid"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/benefit/linkAndDelink \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "de-link" ], "loginHint": "xmlUid", "loginId": "{{encrypted xmlUid}}" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `BENEFIT_NAME` (string, required): Benefit / program name approved by NHA for the integrator. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: xmlUid. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. ## Responses - `200`: Success: Linked successfully; Linked successfully (2); Linked successfully (Postman); De-linked successfully - `benefitName` (string) - `healthId` (string) - `status` (string) - `400`: Bad Request (request validation failed): Already de-linked (spec); Already linked; Already de-linked; Invalid Login ID See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token; Insurance Restricted - De-link; Insurance Restricted - Link; Invalid Benefit Name - Link; Invalid Benefit Name - De-link See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "benefitName": "COVIN", "healthId": "", "status": "Benefit record has been linked successfully" } ``` --- # Benefit search by xmlUid `POST /abha/api/v3/profile/benefit/search` Lists the benefit programmes linked to an Aadhaar xmlUid. `loginId` is the RSA-encrypted xmlUid. **Endpoint:** `POST /abha/api/v3/profile/benefit/search` **Flow:** **Benefit - Search** - independent API; call the one that fits your identifier / modality. **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | BENEFIT_NAME | yes | Benefit / programme name approved by NHA for the integrator. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["search"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"xmlUid"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/benefit/search \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "search" ], "loginHint": "xmlUid", "loginId": "{{encrypted xmlUid}}" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `BENEFIT_NAME` (string, required): Benefit / program name approved by NHA for the integrator. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: xmlUid. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. ## Responses - `200`: Success: Benefit Search via xmlUid; Benefit found (Postman) - `400`: Bad Request (request validation failed): Invalid Scope; Invalid Login Hint; Invalid LoginId; Invalid Benefit Name See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `loginId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: Not Found: User Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json [ { "benefitName": "healthid api", "abhaNumber": "", "status": 1 } ] ``` --- # Benefit search by ABHA number `POST /abha/api/v3/profile/benefit/search` Lists the benefit programmes linked to an ABHA number. `loginId` is the RSA-encrypted ABHA number. **Endpoint:** `POST /abha/api/v3/profile/benefit/search` **Flow:** **Benefit - Search** - independent API; call the one that fits your identifier / modality. **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | BENEFIT_NAME | yes | Benefit / programme name approved by NHA for the integrator. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["search"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"ABHA-number"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/benefit/search \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "search" ], "loginHint": "abha-number", "loginId": "{{encrypted abha-number}}" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `BENEFIT_NAME` (string, required): Benefit / program name approved by NHA for the integrator. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: abha-number. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. ## Responses - `200`: Success: Benefit Search via ABHA number; Benefit found (Postman); Benefit found - sandbox (Postman) - `400`: Bad Request (request validation failed): Invalid Scope; Invalid Login Hint; Invalid LoginId; Invalid Benefit Name See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `loginId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: Not Found: User Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json [ { "benefitName": "healthid api", "abhaNumber": "", "status": 1 } ] ``` --- # Get benefits linked to an ABHA number `GET /abha/api/v3/profile/benefit/abha/{abhanumber}` **Endpoint:** `GET /abha/api/v3/profile/benefit/abha/{abhanumber}` **Flow:** **Benefit - Search** - independent API; call the one that fits your identifier / modality. --- This API endpoint is used to retrieve the benefit details associated with a specific ABHA (Ayushman Bharat Health Account) number. By providing the ABHA number in the request, the API returns information about the benefits linked to that account. This includes details such as the type of benefits, eligibility, and any other relevant information associated with the ABHA number. This endpoint ensures that users can access and manage their health benefits securely and efficiently. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/benefit/abha/{abhanumber} \ --header 'Authorization: Bearer ' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `BENEFIT_NAME` (string, required): Benefit / program name approved by NHA for the integrator. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Path parameters - `abhanumber` (string, required) ## Responses - `200`: This scenario occurs when an ABHA (Ayushman Bharat Health Account) is linked to one or multiple benefit programs. Each benefit program may offer different types of health services, financial assistance, or other healthcare-related benefits. The system ensures that the ABHA number is correctly associated with all the relevant benefit programs, allowing the user to access and manage their benefits efficiently - `abhaNumber` (string) - `programme` (object[]) - `programme.benefitName` (string) - `401`: The 401 response code indicates an unauthorized request. In this context, it refers to the lack of proper authentication See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: The 404 response code indicates that the requested resource could not be found. In the context of searching for an ABHA (Ayushman Bharat Health Account) number using the endpoint API, this error occurs when the specified ABHA number does not exist or cannot be found in the system. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "abhaNumber": "", "programme": [ { "benefitName": "Poshan Abhiyaan" }, { "benefitName": "Test Benefit Program" }, "... 1 more of the same shape" ] } ``` --- # Create Child ABHA `POST /abha/api/v3/enrollment/enrol/byAadhaar` Creates a Child ABHA linked to the parent's ABHA. Send the **parent's** `X-token` (from the parent's ABHA creation or login) and `Benefit-Name`.**Only for Government integrators approved by NHA.** **Endpoint:** `POST /abha/api/v3/enrollment/enrol/byAadhaar` **Flow:** **Child ABHA** - step 1 of 5 - Previous: none (first call of this flow) - Next: *Get Child ABHA list of the parent* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | REQUEST-ID | yes | Unique UUID for every request. | | Benefit-Name | yes | **Applicable for user who is enrolling via Benefit Program.** | | X-token | yes | **Applicable for child ABHA creation. X-token of Parent user, user can get X-token after login to the system** | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["child"]` | yes | Authentication method used in this step. | | `authData.child` | object | yes | Child ABHA details. | | `authData.child.dayOfBirth` | string | yes | Day of birth of the child. | | `authData.child.monthOfBirth` | string | yes | Month of birth of the child. | | `authData.child.yearOfBirth` | string | yes | Year of birth of the child. | | `authData.child.gender` | string | yes | Gender (M / F / O). | | `authData.child.password` | string | no | Password (RSA-encrypted) / password block. | | `authData.child.name` | string | yes | Full name. | | `authData.child.profilePhoto` | string | no | Base64 encoded profile photo. | | `authData.child.parentConsent` | string | no | Parent consent flag for creating a child ABHA. | | `consent` | object | yes | Consent captured from the user for ABHA enrolment. | | `consent.code` | string | yes | Consent code. Use `ABHA-enrollment`. | | `consent.version` | string | yes | Consent version. Use `1.4`. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/byAadhaar \ --header 'Authorization: Bearer ' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'X-token: Bearer {{X-token}}' \ --header 'Content-Type: application/json' \ --data '{ "authData": { "authMethods": [ "child" ], "child": { "dayOfBirth": "{{day Of Birth}}", "monthOfBirth": "{{month Of Birth}}", "yearOfBirth": "{{year Of Birth}}", "gender": "{{Gender}}", "password": "", "name": "{{Name}}", "profilePhoto": "", "parentConsent": "true" } }, "consent": { "code": "abha-enrollment", "version": "1.4" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `REQUEST-ID` (string, required): Unique UUID for every request. - `BENEFIT_NAME` (string, required): **Applicable for user who is enrolling via Benefit Program.** - `X-token` (string, required): **Applicable for child abha creation. X-token of Parent user, user can get X-token after login to the system** ## Body - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.child` (object, required): Child ABHA details. - `authData.child.dayOfBirth` (string, required): Day of birth of the child. - `authData.child.monthOfBirth` (string, required): Month of birth of the child. - `authData.child.yearOfBirth` (string, required): Year of birth of the child. - `authData.child.gender` (string, required): Gender (M / F / O). - `authData.child.password` (string): Password (RSA-encrypted) / password block. - `authData.child.name` (string, required): Full name. - `authData.child.profilePhoto` (string): Base64 encoded profile photo. - `authData.child.parentConsent` (string): Parent consent flag for creating a child ABHA. - `consent` (object, required): Consent captured from the user for ABHA enrolment. - `consent.code` (string, required): Consent code. Use `abha-enrollment`. - `consent.version` (string, required): Consent version. Use `1.4`. ## Responses - `200`: Success: Create CHILD ABHA - Positive Flow; CHILD ABHA - Account Already Exist - `message` (string) - `tokens` (object) - `tokens.token` (string) - `tokens.expiresIn` (integer) - `tokens.refreshToken` (string) - `tokens.refreshExpiresIn` (integer) - `ABHAProfile` (object) - `ABHAProfile.firstName` (string) - `ABHAProfile.middleName` (string) - `ABHAProfile.lastName` (string) - `ABHAProfile.dob` (string) - `ABHAProfile.gender` (string) - `ABHAProfile.mobile` (string) - `ABHAProfile.phrAddress` (string[]) - `ABHAProfile.districtCode` (string) - `ABHAProfile.stateCode` (string) - `ABHAProfile.abhaType` (string) - `ABHAProfile.stateName` (string) - `ABHAProfile.districtName` (string) - `ABHAProfile.ABHANumber` (string) - `ABHAProfile.abhaStatus` (string) - `isNew` (boolean) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): CHILD ABHA-Invalid Benefit Name; CHILD ABHA-Access Issue; CHILD ABHA - X-token expired See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `message` (string) - `timestamp` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure): CHILD ABHA-CHILD LIMIT See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "message": "Account created successfully", "tokens": { "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000 }, "ABHAProfile": { "firstName": "Username", "middleName": "", "lastName": "", "dob": "", "gender": "F", "photo": "", "mobile": "******0903", "districtCode": "490", "stateCode": "27", "abhaType": "CHILD", "stateName": "Maharashtra", "districtName": "
", "ABHANumber": "", "abhaStatus": "ACTIVE" }, "isNew": true } ``` --- # Get Child ABHA list of the parent `GET /abha/api/v3/enrollment/profile/children` **Endpoint:** `GET /abha/api/v3/enrollment/profile/children` **Flow:** **Child ABHA** - step 2 of 5 - Previous: *Create Child ABHA* - Next: *Update Child ABHA profile* --- This API endpoint retrieves the ABHA (Ayushman Bharat Health Account) profile of a child, making it especially useful for managing minors’ health records and information. It provides essential details such as the child’s ABHA number, date of birth, name, and gender. Additionally, this endpoint allows users to access all child records linked to a parent’s ABHA number. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/profile/children \ --header 'Authorization: Bearer ' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'Content-Type: application/json' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'X-token: Bearer {{X-token}}' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `REQUEST-ID` (string, required): Unique UUID for every request. - `Content-Type` (string, required): `application/json`. - `BENEFIT_NAME` (string, required): Benefit / program name approved by NHA for the integrator. - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. ## Responses - `200`: Indicates a successful request. The response includes the updated child ABHA profile details - `parentAbhaNumber` (string) - `mobileNumber` (string) - `childrenCount` (integer) - `children` (object[]) - `children.dateOfBirth` (string) - `children.name` (string) - `children.gender` (string) - `children.phrAddress` (string) - `children.ABHANumber` (string) - `401`: Indicates an unauthorized request due to invalid credentials See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "parentAbhaNumber": "", "mobileNumber": "******0903", "childrenCount": 2, "children": [ { "dateOfBirth": "", "name": "", "gender": "M", "phrAddress": "", "ABHANumber": "" }, { "dateOfBirth": "", "name": "", "gender": "F", "phrAddress": "", "ABHANumber": "" } ] } ``` --- # Update Child ABHA profile `PATCH /abha/api/v3/profile/account` Updates the demographic details (name, DOB, gender) of a Child ABHA. Send `Benefit-Name` and the `X-token` from the Child ABHA creation response. A non-KYC Child ABHA can be updated only once. **Endpoint:** `PATCH /abha/api/v3/profile/account` **Flow:** **Child ABHA** - step 3 of 5 - Previous: *Get Child ABHA list of the parent* - Next: *Child ABHA KYC - send Aadhaar OTP* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | REQUEST-ID | yes | Unique UUID for every request. | | Benefit-Name | yes | Benefit / programme name approved by NHA for the integrator. | | X-token | yes | User token (`Bearer `) received after verification / login. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `abhaNumber` | string | yes | 14 digit ABHA number (xx-xxxx-xxxx-xxxx). | | `dob` | string | yes | Date of birth (d-M-yyyy). | | `name` | string | yes | Full name. | | `gender` | string | yes | Gender (M / F / O). | ```bash curl --request PATCH \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account \ --header 'Authorization: Bearer ' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'X-token: Bearer {{X-token}}' \ --header 'Content-Type: application/json' \ --data '{ "abhaNumber": "", "dob": "", "name": "", "gender": "F" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `REQUEST-ID` (string, required): Unique UUID for every request. - `BENEFIT_NAME` (string, required): Benefit / program name approved by NHA for the integrator. - `X-token` (string, required): User token (`Bearer `) received after verification / login. ## Body - `abhaNumber` (string, required): 14 digit ABHA number (xx-xxxx-xxxx-xxxx). - `dob` (string, required): Date of birth (d-M-yyyy). - `name` (string, required): Full name. - `gender` (string, required): Gender (M / F / O). ## Responses - `200`: Success: CHILD ABHA-Child Details - `ABHANumber` (string) - `preferredAbhaAddress` (string) - `mobile` (string) - `firstName` (string) - `middleName` (string) - `lastName` (string) - `yearOfBirth` (integer) - `monthOfBirth` (integer) - `dayOfBirth` (integer) - `gender` (string) - `status` (string) - `stateCode` (integer) - `districtCode` (integer) - `stateName` (string) - `districtName` (string) - `subdistrictName` (string) - `authMethods` (string[]) - `tags` (object) - `kycVerified` (boolean) - `verificationStatus` (string) - `verificationType` (string) - `createdDate` (string) - `400`: Bad Request (request validation failed): CHILD ABHA-Access Issue See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.message` (string) - `error.timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): CHILD ABHA-Access Issue See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `error` (object) - `error.code` (string) - `error.message` (string) - `404`: Not Found: CHILD ABHA-Access Issue See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure): CHILD ABHA-Access Issue See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "ABHANumber": "", "preferredAbhaAddress": "", "mobile": "******0903", "firstName": "", "middleName": "", "lastName": "", "yearOfBirth": "", "monthOfBirth": "", "dayOfBirth": "", "gender": "F", "status": "ACTIVE", "stateCode": 27, "districtCode": 290, "stateName": "Maharashtra", "districtName": "
", "subdistrictName": "
", "authMethods": [ "MOBILE_OTP" ], "tags": {}, "kycVerified": false, "verificationStatus": "VERIFIED", "verificationType": "CHILD_ABHA", "createdDate": "10-05-2024" } ``` --- # Child ABHA KYC - send Aadhaar OTP `POST /abha/api/v3/profile/account/request/otp` Starts KYC of a non-KYC Child ABHA. UIDAI sends an OTP to the mobile linked with the child's Aadhaar number. Send the child's `X-token`. **Endpoint:** `POST /abha/api/v3/profile/account/request/otp` **Flow:** **Child ABHA** - step 4 of 5 - Previous: *Update Child ABHA profile* - Next: *Child ABHA KYC - verify Aadhaar OTP* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | X-token | yes | User token (`Bearer `) received after ABHA creation / login. | | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-profile", "re-KYC"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"Aadhaar"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"Aadhaar"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/request/otp \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{X-token}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-profile", "re-kyc" ], "loginHint": "aadhaar", "loginId": "{{encrypted aadhaar number}}", "otpSystem": "aadhaar" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: aadhaar. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: aadhaar. ## Responses - `200`: Success: KYC Child ABHA -Send OTP - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `Invalid Scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "c2095ea0-52ed-44ee-b8fc-02375b874e7a", "message": "OTP is sent to Aadhaar registered mobile number ending with *******0903" } ``` --- # Child ABHA KYC - verify Aadhaar OTP `POST /abha/api/v3/profile/account/verify` Verifies the Aadhaar OTP sent by *Child ABHA KYC - send Aadhaar OTP* and marks the Child ABHA as KYC verified. **Endpoint:** `POST /abha/api/v3/profile/account/verify` **Flow:** **Child ABHA** - step 5 of 5 - Previous: *Child ABHA KYC - send Aadhaar OTP* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | X-token | yes | User token (`Bearer `) received after ABHA creation / login. | | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-profile", "re-KYC"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/verify \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{X-token}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-profile", "re-kyc" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted otp value}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: CHILD ABHA KYC- Positive Flow - `txnId` (string) - `authResult` (string) - `message` (string) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `Invalid Scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `message` (string) - `timestamp` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "bb548986-e96d-4b48-be1b-1e36741e867d", "authResult": "success", "message": "KYC verification has been done", "accounts": [ { "ABHANumber": "" }, { "mobileVerified": "true" } ] } ``` --- # Send Aadhaar OTP for ABHA enrolment `POST /abha/api/v3/enrollment/request/otp` Starts ABHA creation with Aadhaar OTP. UIDAI sends an OTP to the mobile number linked with the Aadhaar number. Use the `txnId` from the response in *Create ABHA - verify Aadhaar OTP*. **Endpoint:** `POST /abha/api/v3/enrollment/request/otp` **Flow:** **Create ABHA - Aadhaar OTP** - step 1 of 8 - Previous: none (first call of this flow) - Next: *Create ABHA - verify Aadhaar OTP* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `txnId` | string | no | Transaction ID returned by the previous step of this flow. | | `scope` | `["ABHA-enrol"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"Aadhaar"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"Aadhaar"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | > **Note:** `txnId` is optional here. Leave it empty on the first call, or send a previous `txnId` to resend the OTP. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "txnId": "{{txnId}}", "scope": [ "abha-enrol" ], "loginHint": "aadhaar", "loginId": "{{encrypted aadhaar number}}", "otpSystem": "aadhaar" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `txnId` (string): Transaction ID returned by the previous step of this flow. - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: aadhaar. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: aadhaar. ## Responses - `200`: Success: ABHA enrolment via Aadhaar-positive flow; ABHA Creation via Aadhaar OTP-REQUEST OTP FOR AADHAAR AUTHENTICATION - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): ABHA enrolment via Aadhaar-Invalid scope; ABHA enrolment via Aadhaar-Invalid LoginId; ABHA enrolment via Aadhaar-Invalid Login Hint; ABHA Creation via Aadhaar OTP-Invalid scope; ABHA Creation via Aadhaar OTP-Invalid Login Hint See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): ABHA enrolment via Aadhaar-Invalid access token; ABHA Creation via Aadhaar OTP-Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-1074eb18a5fa", "message": "OTP sent to Aadhaar registered mobile number ending with ******0903" } ``` --- # Create ABHA - verify Aadhaar OTP `POST /abha/api/v3/enrollment/enrol/byAadhaar` Verifies the Aadhaar OTP and creates the ABHA number, or returns the existing ABHA if one is already linked to the Aadhaar. The response contains the ABHA profile, `tokens.token` (user X-token) and a refresh token. `mobile` is the number to link with the ABHA. If it is not the Aadhaar-linked mobile, verify it next with *After ABHA creation - send OTP to verify mobile (optional)*. **Endpoint:** `POST /abha/api/v3/enrollment/enrol/byAadhaar` **Flow:** **Create ABHA - Aadhaar OTP** - step 2 of 8 - Previous: *Send Aadhaar OTP for ABHA enrolment* - Next: *After ABHA creation - send OTP to verify mobile (optional)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | REQUEST-ID | yes | Unique UUID for every request. | | Benefit-Name | no | **Applicable for user who is enrolling via Benefit Program.** | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | | `authData.otp.mobile` | string | no | Mobile number to be linked with the ABHA (plain, 10 digits). | | `consent` | object | yes | Consent captured from the user for ABHA enrolment. | | `consent.code` | string | yes | Consent code. Use `ABHA-enrollment`. | | `consent.version` | string | yes | Consent version. Use `1.4`. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/byAadhaar \ --header 'Authorization: Bearer ' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'Content-Type: application/json' \ --data '{ "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted otp}}", "mobile": "{{mobile number}}" } }, "consent": { "code": "abha-enrollment", "version": "1.4" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `REQUEST-ID` (string, required): Unique UUID for every request. - `BENEFIT_NAME` (string): **Applicable for user who is enrolling via Benefit Program.** ## Body - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. - `authData.otp.mobile` (string): Mobile number to be linked with the ABHA (plain, 10 digits). - `consent` (object, required): Consent captured from the user for ABHA enrolment. - `consent.code` (string, required): Consent code. Use `abha-enrollment`. - `consent.version` (string, required): Consent version. Use `1.4`. ## Responses - `200`: Success: Create ABHA by verifying OTP - Positive flow - `message` (string) - `tokens` (object) - `tokens.token` (string) - `tokens.expiresIn` (integer) - `tokens.refreshToken` (string) - `tokens.refreshExpiresIn` (integer) - `ABHAProfile` (object) - `ABHAProfile.firstName` (string) - `ABHAProfile.middleName` (string) - `ABHAProfile.lastName` (string) - `ABHAProfile.dob` (string) - `ABHAProfile.gender` (string) - `ABHAProfile.mobile` (string) - `ABHAProfile.phrAddress` (string[]) - `ABHAProfile.districtCode` (string) - `ABHAProfile.stateCode` (string) - `ABHAProfile.abhaType` (string) - `ABHAProfile.stateName` (string) - `ABHAProfile.districtName` (string) - `ABHAProfile.ABHANumber` (string) - `ABHAProfile.abhaStatus` (string) - `isNew` (boolean) - `400`: Bad Request (request validation failed): Create ABHA by verifying OTP-Invalid Transaction Id; Create ABHA by verifying OTP-Invalid authMethod; Create ABHA by verifying OTP-Invalid Mobile Number See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Benefit Name (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `message` (string) - `timestamp` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure): Create ABHA by verifying OTP- Invalid OTP value See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "message": "This account already exist", "txnId": "b89ec10d-71fa-4280-83b3-1fedad66b5f5", "tokens": { "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000 }, "ABHAProfile": { "firstName": "Username", "middleName": "", "lastName": "", "dob": "", "gender": "M", "photo": "", "mobile": "******0903", "phrAddress": [ "" ], "address": "
", "districtCode": "478", "stateCode": "27", "pinCode": "", "abhaType": "STANDARD", "stateName": "MAHARASHTRA", "districtName": "
", "ABHANumber": "", "abhaStatus": "ACTIVE" }, "isNew": false } ``` --- # After ABHA creation - send OTP to verify mobile (optional) `POST /abha/api/v3/enrollment/request/otp` Optional, called after the ABHA is created. Needed only when the `mobile` sent in the create-ABHA call is **not** the Aadhaar-linked mobile. ABDM sends an OTP to that mobile number so it can be linked to the ABHA. Send the `txnId` from the ABHA creation response. **Endpoint:** `POST /abha/api/v3/enrollment/request/otp` **Flow:** **Create ABHA - Aadhaar OTP** - step 3 of 8 - Previous: *Create ABHA - verify Aadhaar OTP* - Next: *After ABHA creation - verify mobile OTP (optional)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `scope` | `["ABHA-enrol", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"mobile"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"ABDM"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "txnId": "{{txnId}}", "scope": [ "abha-enrol", "mobile-verify" ], "loginHint": "mobile", "loginId": "{{encrypted mobileNumber}}", "otpSystem": "abdm" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `txnId` (string, required): Transaction ID returned by the previous step of this flow. - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: mobile. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: abdm. ## Responses - `200`: Success: Mobile Update - Send OTP- positive flow - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): Mobile Update - Send OTP-Invalid Scope; Mobile Update - Send OTP-Invalid LoginId; Mobile Update - Send OTP-Invalid Login Hint See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Mobile Update - Send OTP-Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-107h6b18a5fa", "message": "OTP sent to mobile number ending with ******0903" } ``` --- # After ABHA creation - verify mobile OTP (optional) `POST /abha/api/v3/enrollment/auth/byAbdm` Verifies the OTP sent by *After ABHA creation - send OTP to verify mobile (optional)* and links the mobile number to the newly created ABHA. **Endpoint:** `POST /abha/api/v3/enrollment/auth/byAbdm` **Flow:** **Create ABHA - Aadhaar OTP** - step 4 of 8 - Previous: *After ABHA creation - send OTP to verify mobile (optional)* - Next: *After ABHA creation - send OTP to verify email (optional)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-enrol", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/auth/byAbdm \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-enrol", "mobile-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted otp}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Mobile Update - Verify OTP-positive flow; Mobile Update - Verify OTP-OTP EXPIRED - `txnId` (string) - `authResult` (string) - `message` (string) - `accounts` (object[]) - `400`: Bad Request (request validation failed): Mobile Update - Verify OTP; Invalid Transaction Id; Invalid Scope; Invalid AuthMethod See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error: Mobile Update - Verify OTP-Invalid access token See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "authResult": "success", "message": "Mobile number is now successfully linked to your Account", "accounts": [ { "ABHANumber": "" } ] } ``` --- # After ABHA creation - send OTP to verify email (optional) `POST /abha/api/v3/enrollment/request/otp` Optional. Sends an ABDM OTP to an email address so it can be linked to the newly created ABHA. Send the `txnId` from the previous enrolment step. **Endpoint:** `POST /abha/api/v3/enrollment/request/otp` **Flow:** **Create ABHA - Aadhaar OTP** - step 5 of 8 - Previous: *After ABHA creation - verify mobile OTP (optional)* - Next: *After ABHA creation - verify email OTP (optional)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `scope` | `["ABHA-enrol", "email-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"email"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"ABDM"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "txnId": "{{txnId}}", "scope": [ "abha-enrol", "email-verify" ], "loginHint": "email", "loginId": "{{encrypted email}}", "otpSystem": "abdm" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `txnId` (string, required): Transaction ID returned by the previous step of this flow. - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: email. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: abdm. ## Responses - `200`: Success: Email Verify via OTP-positive flow - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): ABHA Verify via Email-Invalid scope; ABHA Verify via Email-Invalid LoginId; ABHA Verify via Email-Invalid Login Hint See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Email verify via OTP-Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-1074eb18a5fa", "message": "OTP sent to email address ending with *************" } ``` --- # After ABHA creation - verify email OTP (optional) `POST /abha/api/v3/enrollment/auth/byAbdm` Verifies the OTP sent by *After ABHA creation - send OTP to verify email (optional)* and links the email address to the newly created ABHA. **Endpoint:** `POST /abha/api/v3/enrollment/auth/byAbdm` **Flow:** **Create ABHA - Aadhaar OTP** - step 6 of 8 - Previous: *After ABHA creation - send OTP to verify email (optional)* - Next: *After ABHA creation - get ABHA address suggestions* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-enrol", "email-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/auth/byAbdm \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-enrol", "email-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted otp}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Email Update - Verify OTP-positive flow; Email Update - Verify OTP-OTP EXPIRED - `txnId` (string) - `authResult` (string) - `message` (string) - `accounts` (object[]) - `400`: Bad Request (request validation failed): Invalid Transaction Id; Invalid Scope; Invalid AuthMethod See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error: Unclassified Authentication Failure (generic) See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "authResult": "success", "message": "Email address is now successfully linked to your Account", "accounts": [ { "ABHANumber": "" } ] } ``` --- # After ABHA creation - get ABHA address suggestions `GET /abha/api/v3/enrollment/enrol/suggestion` **Endpoint:** `GET /abha/api/v3/enrollment/enrol/suggestion` **Flow:** **Create ABHA - Aadhaar OTP** - step 7 of 8 - Previous: *After ABHA creation - verify email OTP (optional)* - Next: *After ABHA creation - create ABHA address* --- This API endpoint is used to provide suggestions for ABHA addresses based on the user’s personal information. It helps users find suitable ABHA addresses by generating a list of suggestions. This is particularly useful during the ABHA enrolment process to ensure that users can choose an appropriate and unique ABHA address. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/suggestion \ --header 'Authorization: Bearer ' \ --header 'TRANSACTION_ID: {{txnId}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TRANSACTION_ID` (string, required): Transaction ID from the ABHA creation response. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `200`: The 200 response code indicates a successful request. In this context, it refers to the successful operation of the Suggestion API, suggestions for ABHA addresses based on the user’s personal information. - `txnId` (string) - `abhaAddressList` (string[]) - `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:** **Abha Address - Invalid Transaction Id:** 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.. **Abha Address - Invalid Preferred Flag:** 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. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: The 401 response code indicates an unauthorized request. In this context, 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 generating ABHA address suggestions. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "abhaAddressList": [ "", "", "... 11 more of the same shape" ] } ``` --- # After ABHA creation - create ABHA address `POST /abha/api/v3/enrollment/enrol/abha-address` **Endpoint:** `POST /abha/api/v3/enrollment/enrol/abha-address` **Flow:** **Create ABHA - Aadhaar OTP** - step 8 of 8 - 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.. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/abha-address \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "txnId": "{{txnId}}", "abhaAddress": "{{ABHA Address}}", "preferred": 1 }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `txnId` (string, required): The transaction ID returned by the previous call in this flow. - `abhaAddress` (string, required): The ABHA address chosen for the account, without the @ suffix. - `preferred` (integer, required): 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. - `txnId` (string) - `abhaAddress` (string) - `preferred` (integer) - `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. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `preferred` (string) - `timestamp` (string) - `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. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "healthIdNumber": "", "preferredAbhaAddress": "" } ``` --- # Create ABHA - Demographic authentication (Demo Auth) `POST /abha/api/v3/enrollment/enrol/byAadhaar` Creates an ABHA number from Aadhaar demographic details (name, DOB, gender, state/district, mobile), without OTP or biometric. If an ABHA already exists for the Aadhaar, it is returned. **Only for integrators approved by NHA**, who must send the `Benefit-Name` header. **Endpoint:** `POST /abha/api/v3/enrollment/enrol/byAadhaar` **Flow:** **Create ABHA - Demo Auth** - step 1 of 1 - Previous: none (first call of this flow) - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | REQUEST-ID | yes | Unique UUID for every request. | | Benefit-Name | yes | **Applicable for user who is enrolling via Benefit Program.** | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["demo_auth"]` | yes | Authentication method used in this step. | | `authData.demo_auth` | object | yes | Demographic authentication block (Aadhaar demographic match). | | `authData.demo_auth.aadhaarNumber` | string | yes | Aadhaar number, RSA-encrypted. | | `authData.demo_auth.districtCode` | string | yes | LGD district code. | | `authData.demo_auth.stateCode` | string | yes | LGD state code. | | `authData.demo_auth.dateOfBirth` | string | yes | Date of birth as per Aadhaar (dd-MM-yyyy). | | `authData.demo_auth.gender` | string | yes | Gender (M / F / O). | | `authData.demo_auth.name` | string | yes | Full name. | | `authData.demo_auth.mobile` | string | no | Mobile number to be linked with the ABHA (plain, 10 digits). | | `authData.demo_auth.profilePhoto` | string | no | Base64 encoded profile photo. | | `authData.demo_auth.pinCode` | string | no | PIN code of the address. | | `authData.demo_auth.address` | string | no | Address as per Aadhaar. | | `consent` | object | yes | Consent captured from the user for ABHA enrolment. | | `consent.code` | string | yes | Consent code. Use `ABHA-enrollment`. | | `consent.version` | string | yes | Consent version. Use `1.4`. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/byAadhaar \ --header 'Authorization: Bearer ' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'Content-Type: application/json' \ --data '{ "authData": { "authMethods": [ "demo_auth" ], "demo_auth": { "aadhaarNumber": "{{encrypted aadhaar number}}", "districtCode": "{{District code}}", "stateCode": "{{State code}}", "dateOfBirth": "{{DOB}}", "gender": "{{Gender}}", "name": "{{Full name}}", "mobile": "{{Mobile number}}", "profilePhoto": "{{Base64 plain String}}", "pinCode": "", "address": "
" } }, "consent": { "code": "abha-enrollment", "version": "1.4" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `REQUEST-ID` (string, required): Unique UUID for every request. - `BENEFIT_NAME` (string, required): **Applicable for user who is enrolling via Benefit Program.** ## Body - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.demo_auth` (object, required): Demographic authentication block (Aadhaar demographic match). - `authData.demo_auth.aadhaarNumber` (string, required): Aadhaar number, RSA-encrypted. - `authData.demo_auth.districtCode` (string, required): LGD district code. - `authData.demo_auth.stateCode` (string, required): LGD state code. - `authData.demo_auth.dateOfBirth` (string, required): Date of birth as per Aadhaar (dd-MM-yyyy). - `authData.demo_auth.gender` (string, required): Gender (M / F / O). - `authData.demo_auth.name` (string, required): Full name. - `authData.demo_auth.mobile` (string): Mobile number to be linked with the ABHA (plain, 10 digits). - `authData.demo_auth.profilePhoto` (string): Base64 encoded profile photo. - `authData.demo_auth.pinCode` (string): PIN code of the address. - `authData.demo_auth.address` (string): Address as per Aadhaar. - `consent` (object, required): Consent captured from the user for ABHA enrolment. - `consent.code` (string, required): Consent code. Use `abha-enrollment`. - `consent.version` (string, required): Consent version. Use `1.4`. ## Responses - `200`: Success: DemoAuth API - New ABHA creation; DemoAuth API - In case of Existing ABHA Number - `message` (string) - `tokens` (object) - `tokens.token` (string) - `tokens.expiresIn` (integer) - `tokens.refreshToken` (string) - `tokens.refreshExpiresIn` (integer) - `ABHAProfile` (object) - `ABHAProfile.firstName` (string) - `ABHAProfile.middleName` (string) - `ABHAProfile.lastName` (string) - `ABHAProfile.dob` (string) - `ABHAProfile.gender` (string) - `ABHAProfile.mobile` (string) - `ABHAProfile.phrAddress` (string[]) - `ABHAProfile.districtCode` (string) - `ABHAProfile.stateCode` (string) - `ABHAProfile.abhaType` (string) - `ABHAProfile.stateName` (string) - `ABHAProfile.districtName` (string) - `ABHAProfile.ABHANumber` (string) - `ABHAProfile.abhaStatus` (string) - `isNew` (boolean) - `400`: Bad Request (request validation failed): DemoAuth API-State District not matching See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): DemoAuth API-Invalid Benefit Name See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `message` (string) - `timestamp` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure): DemoAuth API-6 ABHA linked to Mobile; DemoAuth API-Details not matches against Aadhaar See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "healthIdNumber": "", "healthId": "", "mobile": "******0903", "firstName": "Username", "middleName": "", "lastName": "", "name": "", "yearOfBirth": "", "dayOfBirth": "", "monthOfBirth": "", "gender": "F", "stateCode": "27", "districtCode": "490", "stateName": "MAHARASHTRA", "districtName": "
", "kycVerified": true, "token": "", "jwtResponse": { "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000 }, "status": "ACTIVE", "new": true } ``` --- # Face auth - generate transaction ID (init) `POST /abha/api/v3/enrollment/enrol/auth/init` **Endpoint:** `POST /abha/api/v3/enrollment/enrol/auth/init` **Flow:** **Create ABHA - Face Authentication** - step 1 of 9 - Previous: none (first call of this flow) - Next: *Face auth - capture PID / track status* --- This API will help to generate transaction ID. This transaction ID will be used for whole face authentication process. The user can submit this transaction ID to the **ABHA** app using either intent-based sharing or by generating a QR code. User can use this transaction ID to generate QR code using any QR generator tool. Open ABHA app and scan this QR code on ABHA App to start and complete the face capture process. The data format of the QR code should follow this pattern: https:///face-auth?txnId=. **For example:** https://phrsbx.abdm.gov.in/face-auth?txnId=bac7251b-cd25-44d5-9707-f3d2ba181c1c For Sandbox- PHR-env-base-URL - https://phrsbx.abdm.gov.in For Production - PHR-env-base-URL - https://phr.abdm.gov.in ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/auth/init \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-enrol", "face-auth" ] }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): The scopes of the request, which name the flow this call belongs to. ## Responses - `200`: The 200 response code indicates a successful request. In this context, it refers to the successful generation of Transaction Id. - `txnId` (string) - `message` (string) - `400`: The 400 response code indicates a bad request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `scope` (string) - `timestamp` (string) - `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 See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "message": "Transaction Id generated Successfully" } ``` --- # Face auth - capture PID / track status `POST /abha/api/v3/enrollment/enrol/capturePID` **Endpoint:** `POST /abha/api/v3/enrollment/enrol/capturePID` **Flow:** **Create ABHA - Face Authentication** - step 2 of 9 - Previous: *Face auth - generate transaction ID (init)* - Next: *Create ABHA - Aadhaar face authentication* --- This API is designed to verify the status of a transaction ID that was generated during the invocation of the `auth/init` API. It serves as a follow-up mechanism to ensure that the transaction is still valid, active, and has not expired or been invalidated. Wait for PID capture and submission confirmation from the ABHA App. The response of the API will return status of that transactionId. It can be either **PENDING,VERIFIED,FAILED,COMPLETE.** Once the status in the response of this API is returned as **COMPLETE**, it indicates that the face authentication process has been successfully completed. At this stage, the next step is to invoke the `/enrollment/enrol/byAadhaar` (You can find this API in ABHA ENROLLMENT Via Aadhaar section) API to proceed further. User can poll the `/capturePID` API in every 5 - 10 seconds interval to check the status of face capture process or alternatively skip this step and call the `/enrollment/enrol/byAadhaar` API once they see the PID submission success message in the ABHA app. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/capturePID \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-enrol", "face-verify" ], "txnId": "ea1dc7aa-d7c3-40ab-bee8-84c6f1eb90fa" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): The scopes of the request, which name the flow this call belongs to. - `txnId` (string, required): The transaction ID returned by the previous call in this flow. ## Responses - `200`: The 200 response code indicates a successful request. The reponse of the API will return status of that transactionId. It can be either **PENDING,VERIFIED,FAILED,COMPLETE.** - `status` (string) - `message` (string) - `400`: The 400 response code indicates a bad request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `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 See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "status": "PENDING", "message": "Awaiting PID capture" } ``` --- # Create ABHA - Aadhaar face authentication `POST /abha/api/v3/enrollment/enrol/byAadhaar` Creates an ABHA number with Aadhaar face authentication. First call *Face auth - generate transaction ID (init)*, then poll *Face auth - capture PID / track status* until the status is `COMPLETE`. Then send the same `txnId` here. **Endpoint:** `POST /abha/api/v3/enrollment/enrol/byAadhaar` **Flow:** **Create ABHA - Face Authentication** - step 3 of 9 - Previous: *Face auth - capture PID / track status* - Next: *After ABHA creation - send OTP to verify mobile (optional)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | REQUEST-ID | yes | Unique UUID for every request. | | Benefit-Name | no | **Applicable for user who is enrolling via Benefit Program.** | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["face_auth"]` | yes | Authentication method used in this step. | | `authData.face` | object | yes | Face authentication block. | | `authData.face.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.face.aadhaar` | string | yes | Aadhaar number, RSA-encrypted. | | `authData.face.mobile` | string | no | Mobile number to be linked with the ABHA (plain, 10 digits). | | `consent` | object | yes | Consent captured from the user for ABHA enrolment. | | `consent.code` | string | yes | Consent code. Use `ABHA-enrollment`. | | `consent.version` | string | yes | Consent version. Use `1.4`. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/byAadhaar \ --header 'Authorization: Bearer ' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'Content-Type: application/json' \ --data '{ "authData": { "authMethods": [ "face_auth" ], "face": { "txnId": "881f2bf5-7377-4067-b50e-1e6ff100b3cc", "aadhaar": "{{encrypted aadhaar number}}", "mobile": "{{mobile number}}" } }, "consent": { "code": "abha-enrollment", "version": "1.4" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `REQUEST-ID` (string, required): Unique UUID for every request. - `BENEFIT_NAME` (string): **Applicable for user who is enrolling via Benefit Program.** ## Body - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.face` (object, required): Face authentication block. - `authData.face.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.face.aadhaar` (string, required): Aadhaar number, RSA-encrypted. - `authData.face.mobile` (string): Mobile number to be linked with the ABHA (plain, 10 digits). - `consent` (object, required): Consent captured from the user for ABHA enrolment. - `consent.code` (string, required): Consent code. Use `abha-enrollment`. - `consent.version` (string, required): Consent version. Use `1.4`. ## Responses - `200`: Success: Create ABHA via Face - Positive Flow - `message` (string) - `tokens` (object) - `tokens.token` (string) - `tokens.expiresIn` (integer) - `tokens.refreshToken` (string) - `tokens.refreshExpiresIn` (integer) - `ABHAProfile` (object) - `ABHAProfile.firstName` (string) - `ABHAProfile.middleName` (string) - `ABHAProfile.lastName` (string) - `ABHAProfile.dob` (string) - `ABHAProfile.gender` (string) - `ABHAProfile.mobile` (string) - `ABHAProfile.phrAddress` (string[]) - `ABHAProfile.districtCode` (string) - `ABHAProfile.stateCode` (string) - `ABHAProfile.abhaType` (string) - `ABHAProfile.stateName` (string) - `ABHAProfile.districtName` (string) - `ABHAProfile.ABHANumber` (string) - `ABHAProfile.abhaStatus` (string) - `isNew` (boolean) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Benefit Name (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `message` (string) - `timestamp` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "message": "Account created successfully", "txnId": "b764e218-72b7-4bd7-a11e-2c9f2880fd61", "tokens": { "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000 }, "ABHAProfile": { "firstName": "Username", "middleName": "", "lastName": "", "dob": "", "gender": "F", "photo": "", "mobile": "******0903", "email": null, "phrAddress": [ "" ], "districtCode": "490", "stateCode": "27", "abhaType": "CHILD", "stateName": "Maharashtra", "districtName": "
", "ABHANumber": "", "abhaStatus": "ACTIVE" }, "isNew": true } ``` --- # After ABHA creation - send OTP to verify mobile (optional) `POST /abha/api/v3/enrollment/request/otp` Optional, called after the ABHA is created. Needed only when the `mobile` sent in the create-ABHA call is **not** the Aadhaar-linked mobile. ABDM sends an OTP to that mobile number so it can be linked to the ABHA. Send the `txnId` from the ABHA creation response. **Endpoint:** `POST /abha/api/v3/enrollment/request/otp` **Flow:** **Create ABHA - Face Authentication** - step 4 of 9 - Previous: *Create ABHA - Aadhaar face authentication* - Next: *After ABHA creation - verify mobile OTP (optional)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `scope` | `["ABHA-enrol", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"mobile"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"ABDM"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "txnId": "{{txnId}}", "scope": [ "abha-enrol", "mobile-verify" ], "loginHint": "mobile", "loginId": "{{encrypted mobileNumber}}", "otpSystem": "abdm" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `txnId` (string, required): Transaction ID returned by the previous step of this flow. - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: mobile. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: abdm. ## Responses - `200`: Success: Mobile Update - Send OTP- positive flow - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): Mobile Update - Send OTP-Invalid Scope; Mobile Update - Send OTP-Invalid LoginId; Mobile Update - Send OTP-Invalid Login Hint See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Mobile Update - Send OTP-Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-107h6b18a5fa", "message": "OTP sent to mobile number ending with ******0903" } ``` --- # After ABHA creation - verify mobile OTP (optional) `POST /abha/api/v3/enrollment/auth/byAbdm` Verifies the OTP sent by *After ABHA creation - send OTP to verify mobile (optional)* and links the mobile number to the newly created ABHA. **Endpoint:** `POST /abha/api/v3/enrollment/auth/byAbdm` **Flow:** **Create ABHA - Face Authentication** - step 5 of 9 - Previous: *After ABHA creation - send OTP to verify mobile (optional)* - Next: *After ABHA creation - send OTP to verify email (optional)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-enrol", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/auth/byAbdm \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-enrol", "mobile-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted otp}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Mobile Update - Verify OTP-positive flow; Mobile Update - Verify OTP-OTP EXPIRED - `txnId` (string) - `authResult` (string) - `message` (string) - `accounts` (object[]) - `400`: Bad Request (request validation failed): Mobile Update - Verify OTP; Invalid Transaction Id; Invalid Scope; Invalid AuthMethod See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error: Mobile Update - Verify OTP-Invalid access token See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "authResult": "success", "message": "Mobile number is now successfully linked to your Account", "accounts": [ { "ABHANumber": "" } ] } ``` --- # After ABHA creation - send OTP to verify email (optional) `POST /abha/api/v3/enrollment/request/otp` Optional. Sends an ABDM OTP to an email address so it can be linked to the newly created ABHA. Send the `txnId` from the previous enrolment step. **Endpoint:** `POST /abha/api/v3/enrollment/request/otp` **Flow:** **Create ABHA - Face Authentication** - step 6 of 9 - Previous: *After ABHA creation - verify mobile OTP (optional)* - Next: *After ABHA creation - verify email OTP (optional)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `scope` | `["ABHA-enrol", "email-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"email"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"ABDM"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "txnId": "{{txnId}}", "scope": [ "abha-enrol", "email-verify" ], "loginHint": "email", "loginId": "{{encrypted email}}", "otpSystem": "abdm" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `txnId` (string, required): Transaction ID returned by the previous step of this flow. - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: email. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: abdm. ## Responses - `200`: Success: Email Verify via OTP-positive flow - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): ABHA Verify via Email-Invalid scope; ABHA Verify via Email-Invalid LoginId; ABHA Verify via Email-Invalid Login Hint See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Email verify via OTP-Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-1074eb18a5fa", "message": "OTP sent to email address ending with *************" } ``` --- # After ABHA creation - verify email OTP (optional) `POST /abha/api/v3/enrollment/auth/byAbdm` Verifies the OTP sent by *After ABHA creation - send OTP to verify email (optional)* and links the email address to the newly created ABHA. **Endpoint:** `POST /abha/api/v3/enrollment/auth/byAbdm` **Flow:** **Create ABHA - Face Authentication** - step 7 of 9 - Previous: *After ABHA creation - send OTP to verify email (optional)* - Next: *After ABHA creation - get ABHA address suggestions* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-enrol", "email-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/auth/byAbdm \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-enrol", "email-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted otp}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Email Update - Verify OTP-positive flow; Email Update - Verify OTP-OTP EXPIRED - `txnId` (string) - `authResult` (string) - `message` (string) - `accounts` (object[]) - `400`: Bad Request (request validation failed): Invalid Transaction Id; Invalid Scope; Invalid AuthMethod See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error: Unclassified Authentication Failure (generic) See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "authResult": "success", "message": "Email address is now successfully linked to your Account", "accounts": [ { "ABHANumber": "" } ] } ``` --- # After ABHA creation - get ABHA address suggestions `GET /abha/api/v3/enrollment/enrol/suggestion` **Endpoint:** `GET /abha/api/v3/enrollment/enrol/suggestion` **Flow:** **Create ABHA - Face Authentication** - step 8 of 9 - Previous: *After ABHA creation - verify email OTP (optional)* - Next: *After ABHA creation - create ABHA address* --- This API endpoint is used to provide suggestions for ABHA addresses based on the user’s personal information. It helps users find suitable ABHA addresses by generating a list of suggestions. This is particularly useful during the ABHA enrolment process to ensure that users can choose an appropriate and unique ABHA address. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/suggestion \ --header 'Authorization: Bearer ' \ --header 'TRANSACTION_ID: {{txnId}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TRANSACTION_ID` (string, required): Transaction ID from the ABHA creation response. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `200`: The 200 response code indicates a successful request. In this context, it refers to the successful operation of the Suggestion API, suggestions for ABHA addresses based on the user’s personal information. - `txnId` (string) - `abhaAddressList` (string[]) - `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:** **Abha Address - Invalid Transaction Id:** 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.. **Abha Address - Invalid Preferred Flag:** 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. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: The 401 response code indicates an unauthorized request. In this context, 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 generating ABHA address suggestions. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "abhaAddressList": [ "", "", "... 11 more of the same shape" ] } ``` --- # After ABHA creation - create ABHA address `POST /abha/api/v3/enrollment/enrol/abha-address` **Endpoint:** `POST /abha/api/v3/enrollment/enrol/abha-address` **Flow:** **Create ABHA - Face Authentication** - step 9 of 9 - 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.. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/abha-address \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "txnId": "{{txnId}}", "abhaAddress": "{{ABHA Address}}", "preferred": 1 }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `txnId` (string, required): The transaction ID returned by the previous call in this flow. - `abhaAddress` (string, required): The ABHA address chosen for the account, without the @ suffix. - `preferred` (integer, required): 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. - `txnId` (string) - `abhaAddress` (string) - `preferred` (integer) - `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. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `preferred` (string) - `timestamp` (string) - `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. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "healthIdNumber": "", "preferredAbhaAddress": "" } ``` --- # Create ABHA - Aadhaar fingerprint (bio) `POST /abha/api/v3/enrollment/enrol/byAadhaar` Creates an ABHA number by authenticating the Aadhaar holder's fingerprint. The PID block is captured with a UIDAI-registered fingerprint RD device. The response contains the ABHA profile and `tokens.token` (user X-token). **Endpoint:** `POST /abha/api/v3/enrollment/enrol/byAadhaar` **Flow:** **Create ABHA - Fingerprint** - step 1 of 7 - Previous: none (first call of this flow) - Next: *After ABHA creation - send OTP to verify mobile (optional)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | REQUEST-ID | yes | Unique UUID for every request. | | Benefit-Name | no | **Applicable for user who is enrolling via Benefit Program.** | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["bio"]` | yes | Authentication method used in this step. | | `authData.bio` | object | yes | Fingerprint authentication block. | | `authData.bio.aadhaar` | string | yes | Aadhaar number, RSA-encrypted. | | `authData.bio.fingerPrintAuthPid` | string | yes | Base64 PID block captured from a registered fingerprint RD device. | | `authData.bio.mobile` | string | no | Mobile number to be linked with the ABHA (plain, 10 digits). | | `consent` | object | yes | Consent captured from the user for ABHA enrolment. | | `consent.code` | string | yes | Consent code. Use `ABHA-enrollment`. | | `consent.version` | string | yes | Consent version. Use `1.4`. | > **Note:** The Postman collection (Create ABHA - Fingerprint 3.1) sends `authMethods: ["OTP"]`. This spec uses `["bio"]`; confirm with NHA. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/byAadhaar \ --header 'Authorization: Bearer ' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'Content-Type: application/json' \ --data '{ "authData": { "authMethods": [ "bio" ], "bio": { "aadhaar": "{{encrypted aadhaar number}}", "fingerPrintAuthPid": "{{fingerPrintAuthPid}}", "mobile": "{{mobile number}}" } }, "consent": { "code": "abha-enrollment", "version": "1.4" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `REQUEST-ID` (string, required): Unique UUID for every request. - `BENEFIT_NAME` (string): **Applicable for user who is enrolling via Benefit Program.** ## Body - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.bio` (object, required): Fingerprint authentication block. - `authData.bio.aadhaar` (string, required): Aadhaar number, RSA-encrypted. - `authData.bio.fingerPrintAuthPid` (string, required): Base64 PID block captured from a registered fingerprint RD device. - `authData.bio.mobile` (string): Mobile number to be linked with the ABHA (plain, 10 digits). - `consent` (object, required): Consent captured from the user for ABHA enrolment. - `consent.code` (string, required): Consent code. Use `abha-enrollment`. - `consent.version` (string, required): Consent version. Use `1.4`. ## Responses - `200`: Success: Create ABHA via Fingerprint - Positive Flow - `message` (string) - `tokens` (object) - `tokens.token` (string) - `tokens.expiresIn` (integer) - `tokens.refreshToken` (string) - `tokens.refreshExpiresIn` (integer) - `ABHAProfile` (object) - `ABHAProfile.firstName` (string) - `ABHAProfile.middleName` (string) - `ABHAProfile.lastName` (string) - `ABHAProfile.dob` (string) - `ABHAProfile.gender` (string) - `ABHAProfile.mobile` (string) - `ABHAProfile.phrAddress` (string[]) - `ABHAProfile.districtCode` (string) - `ABHAProfile.stateCode` (string) - `ABHAProfile.abhaType` (string) - `ABHAProfile.stateName` (string) - `ABHAProfile.districtName` (string) - `ABHAProfile.ABHANumber` (string) - `ABHAProfile.abhaStatus` (string) - `isNew` (boolean) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Aadhaar Bio-Invalid Benefit Name See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `message` (string) - `timestamp` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure): Aadhaar Bio-Invalid certificate See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "message": "Account created successfully", "txnId": "b764e218-72b7-4bd7-a11e-2c9f2880fd61", "tokens": { "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000 }, "ABHAProfile": { "firstName": "Username", "middleName": "", "lastName": "", "dob": "", "gender": "F", "photo": "", "mobile": "******0903", "email": null, "phrAddress": [ "" ], "districtCode": "490", "stateCode": "27", "abhaType": "CHILD", "stateName": "Maharashtra", "districtName": "
", "ABHANumber": "", "abhaStatus": "ACTIVE" }, "isNew": true } ``` --- # After ABHA creation - send OTP to verify mobile (optional) `POST /abha/api/v3/enrollment/request/otp` Optional, called after the ABHA is created. Needed only when the `mobile` sent in the create-ABHA call is **not** the Aadhaar-linked mobile. ABDM sends an OTP to that mobile number so it can be linked to the ABHA. Send the `txnId` from the ABHA creation response. **Endpoint:** `POST /abha/api/v3/enrollment/request/otp` **Flow:** **Create ABHA - Fingerprint** - step 2 of 7 - Previous: *Create ABHA - Aadhaar fingerprint (bio)* - Next: *After ABHA creation - verify mobile OTP (optional)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `scope` | `["ABHA-enrol", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"mobile"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"ABDM"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "txnId": "{{txnId}}", "scope": [ "abha-enrol", "mobile-verify" ], "loginHint": "mobile", "loginId": "{{encrypted mobileNumber}}", "otpSystem": "abdm" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `txnId` (string, required): Transaction ID returned by the previous step of this flow. - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: mobile. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: abdm. ## Responses - `200`: Success: Mobile Update - Send OTP- positive flow - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): Mobile Update - Send OTP-Invalid Scope; Mobile Update - Send OTP-Invalid LoginId; Mobile Update - Send OTP-Invalid Login Hint See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Mobile Update - Send OTP-Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-107h6b18a5fa", "message": "OTP sent to mobile number ending with ******0903" } ``` --- # After ABHA creation - verify mobile OTP (optional) `POST /abha/api/v3/enrollment/auth/byAbdm` Verifies the OTP sent by *After ABHA creation - send OTP to verify mobile (optional)* and links the mobile number to the newly created ABHA. **Endpoint:** `POST /abha/api/v3/enrollment/auth/byAbdm` **Flow:** **Create ABHA - Fingerprint** - step 3 of 7 - Previous: *After ABHA creation - send OTP to verify mobile (optional)* - Next: *After ABHA creation - send OTP to verify email (optional)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-enrol", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/auth/byAbdm \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-enrol", "mobile-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted otp}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Mobile Update - Verify OTP-positive flow; Mobile Update - Verify OTP-OTP EXPIRED - `txnId` (string) - `authResult` (string) - `message` (string) - `accounts` (object[]) - `400`: Bad Request (request validation failed): Mobile Update - Verify OTP; Invalid Transaction Id; Invalid Scope; Invalid AuthMethod See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error: Mobile Update - Verify OTP-Invalid access token See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "authResult": "success", "message": "Mobile number is now successfully linked to your Account", "accounts": [ { "ABHANumber": "" } ] } ``` --- # After ABHA creation - send OTP to verify email (optional) `POST /abha/api/v3/enrollment/request/otp` Optional. Sends an ABDM OTP to an email address so it can be linked to the newly created ABHA. Send the `txnId` from the previous enrolment step. **Endpoint:** `POST /abha/api/v3/enrollment/request/otp` **Flow:** **Create ABHA - Fingerprint** - step 4 of 7 - Previous: *After ABHA creation - verify mobile OTP (optional)* - Next: *After ABHA creation - verify email OTP (optional)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `scope` | `["ABHA-enrol", "email-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"email"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"ABDM"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "txnId": "{{txnId}}", "scope": [ "abha-enrol", "email-verify" ], "loginHint": "email", "loginId": "{{encrypted email}}", "otpSystem": "abdm" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `txnId` (string, required): Transaction ID returned by the previous step of this flow. - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: email. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: abdm. ## Responses - `200`: Success: Email Verify via OTP-positive flow - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): ABHA Verify via Email-Invalid scope; ABHA Verify via Email-Invalid LoginId; ABHA Verify via Email-Invalid Login Hint See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Email verify via OTP-Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-1074eb18a5fa", "message": "OTP sent to email address ending with *************" } ``` --- # After ABHA creation - verify email OTP (optional) `POST /abha/api/v3/enrollment/auth/byAbdm` Verifies the OTP sent by *After ABHA creation - send OTP to verify email (optional)* and links the email address to the newly created ABHA. **Endpoint:** `POST /abha/api/v3/enrollment/auth/byAbdm` **Flow:** **Create ABHA - Fingerprint** - step 5 of 7 - Previous: *After ABHA creation - send OTP to verify email (optional)* - Next: *After ABHA creation - get ABHA address suggestions* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-enrol", "email-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/auth/byAbdm \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-enrol", "email-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted otp}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Email Update - Verify OTP-positive flow; Email Update - Verify OTP-OTP EXPIRED - `txnId` (string) - `authResult` (string) - `message` (string) - `accounts` (object[]) - `400`: Bad Request (request validation failed): Invalid Transaction Id; Invalid Scope; Invalid AuthMethod See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error: Unclassified Authentication Failure (generic) See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "authResult": "success", "message": "Email address is now successfully linked to your Account", "accounts": [ { "ABHANumber": "" } ] } ``` --- # After ABHA creation - get ABHA address suggestions `GET /abha/api/v3/enrollment/enrol/suggestion` **Endpoint:** `GET /abha/api/v3/enrollment/enrol/suggestion` **Flow:** **Create ABHA - Fingerprint** - step 6 of 7 - Previous: *After ABHA creation - verify email OTP (optional)* - Next: *After ABHA creation - create ABHA address* --- This API endpoint is used to provide suggestions for ABHA addresses based on the user’s personal information. It helps users find suitable ABHA addresses by generating a list of suggestions. This is particularly useful during the ABHA enrolment process to ensure that users can choose an appropriate and unique ABHA address. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/suggestion \ --header 'Authorization: Bearer ' \ --header 'TRANSACTION_ID: {{txnId}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TRANSACTION_ID` (string, required): Transaction ID from the ABHA creation response. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `200`: The 200 response code indicates a successful request. In this context, it refers to the successful operation of the Suggestion API, suggestions for ABHA addresses based on the user’s personal information. - `txnId` (string) - `abhaAddressList` (string[]) - `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:** **Abha Address - Invalid Transaction Id:** 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.. **Abha Address - Invalid Preferred Flag:** 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. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: The 401 response code indicates an unauthorized request. In this context, 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 generating ABHA address suggestions. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "abhaAddressList": [ "", "", "... 11 more of the same shape" ] } ``` --- # After ABHA creation - create ABHA address `POST /abha/api/v3/enrollment/enrol/abha-address` **Endpoint:** `POST /abha/api/v3/enrollment/enrol/abha-address` **Flow:** **Create ABHA - Fingerprint** - 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.. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/abha-address \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "txnId": "{{txnId}}", "abhaAddress": "{{ABHA Address}}", "preferred": 1 }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `txnId` (string, required): The transaction ID returned by the previous call in this flow. - `abhaAddress` (string, required): The ABHA address chosen for the account, without the @ suffix. - `preferred` (integer, required): 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. - `txnId` (string) - `abhaAddress` (string) - `preferred` (integer) - `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. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `preferred` (string) - `timestamp` (string) - `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. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "healthIdNumber": "", "preferredAbhaAddress": "" } ``` --- # Create ABHA - Aadhaar IRIS `POST /abha/api/v3/enrollment/enrol/byAadhaar` Creates an ABHA number by authenticating the Aadhaar holder's IRIS. The PID block is captured with a UIDAI-registered IRIS RD device. The response contains the ABHA profile and `tokens.token` (user X-token). **Endpoint:** `POST /abha/api/v3/enrollment/enrol/byAadhaar` **Flow:** **Create ABHA - IRIS** - step 1 of 7 - Previous: none (first call of this flow) - Next: *After ABHA creation - send OTP to verify mobile (optional)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | REQUEST-ID | yes | Unique UUID for every request. | | Benefit-Name | no | **Applicable for user who is enrolling via Benefit Program.** | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["iris"]` | yes | Authentication method used in this step. | | `authData.iris` | object | yes | IRIS authentication block. | | `authData.iris.aadhaar` | string | yes | Aadhaar number, RSA-encrypted. | | `authData.iris.pid` | string | yes | Base64 PID block captured from a registered IRIS RD device. | | `authData.iris.mobile` | string | no | Mobile number to be linked with the ABHA (plain, 10 digits). | | `consent` | object | yes | Consent captured from the user for ABHA enrolment. | | `consent.code` | string | yes | Consent code. Use `ABHA-enrollment`. | | `consent.version` | string | yes | Consent version. Use `1.4`. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/byAadhaar \ --header 'Authorization: Bearer ' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'BENEFIT_NAME: {{Benefit Name}}' \ --header 'Content-Type: application/json' \ --data '{ "authData": { "authMethods": [ "iris" ], "iris": { "aadhaar": "{{encrypted aadhaar number}}", "pid": "{{PID}}", "mobile": "{{mobile number}}" } }, "consent": { "code": "abha-enrollment", "version": "1.4" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `REQUEST-ID` (string, required): Unique UUID for every request. - `BENEFIT_NAME` (string): **Applicable for user who is enrolling via Benefit Program.** ## Body - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.iris` (object, required): IRIS authentication block. - `authData.iris.aadhaar` (string, required): Aadhaar number, RSA-encrypted. - `authData.iris.pid` (string, required): Base64 PID block captured from a registered IRIS RD device. - `authData.iris.mobile` (string): Mobile number to be linked with the ABHA (plain, 10 digits). - `consent` (object, required): Consent captured from the user for ABHA enrolment. - `consent.code` (string, required): Consent code. Use `abha-enrollment`. - `consent.version` (string, required): Consent version. Use `1.4`. ## Responses - `200`: Success: Create ABHA via IRIS - Positive Flow - `message` (string) - `tokens` (object) - `tokens.token` (string) - `tokens.expiresIn` (integer) - `tokens.refreshToken` (string) - `tokens.refreshExpiresIn` (integer) - `ABHAProfile` (object) - `ABHAProfile.firstName` (string) - `ABHAProfile.middleName` (string) - `ABHAProfile.lastName` (string) - `ABHAProfile.dob` (string) - `ABHAProfile.gender` (string) - `ABHAProfile.mobile` (string) - `ABHAProfile.phrAddress` (string[]) - `ABHAProfile.districtCode` (string) - `ABHAProfile.stateCode` (string) - `ABHAProfile.abhaType` (string) - `ABHAProfile.stateName` (string) - `ABHAProfile.districtName` (string) - `ABHAProfile.ABHANumber` (string) - `ABHAProfile.abhaStatus` (string) - `isNew` (boolean) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Benefit Name (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `message` (string) - `timestamp` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "message": "Account created successfully", "txnId": "b764e218-72b7-4bd7-a11e-2c9f2880fd61", "tokens": { "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000 }, "ABHAProfile": { "firstName": "Username", "middleName": "", "lastName": "", "dob": "", "gender": "F", "photo": "", "mobile": "******0903", "email": null, "phrAddress": [ "" ], "districtCode": "490", "stateCode": "27", "abhaType": "CHILD", "stateName": "Maharashtra", "districtName": "
", "ABHANumber": "", "abhaStatus": "ACTIVE" }, "isNew": true } ``` --- # After ABHA creation - send OTP to verify mobile (optional) `POST /abha/api/v3/enrollment/request/otp` Optional, called after the ABHA is created. Needed only when the `mobile` sent in the create-ABHA call is **not** the Aadhaar-linked mobile. ABDM sends an OTP to that mobile number so it can be linked to the ABHA. Send the `txnId` from the ABHA creation response. **Endpoint:** `POST /abha/api/v3/enrollment/request/otp` **Flow:** **Create ABHA - IRIS** - step 2 of 7 - Previous: *Create ABHA - Aadhaar IRIS* - Next: *After ABHA creation - verify mobile OTP (optional)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `scope` | `["ABHA-enrol", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"mobile"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"ABDM"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "txnId": "{{txnId}}", "scope": [ "abha-enrol", "mobile-verify" ], "loginHint": "mobile", "loginId": "{{encrypted mobileNumber}}", "otpSystem": "abdm" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `txnId` (string, required): Transaction ID returned by the previous step of this flow. - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: mobile. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: abdm. ## Responses - `200`: Success: Mobile Update - Send OTP- positive flow - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): Mobile Update - Send OTP-Invalid Scope; Mobile Update - Send OTP-Invalid LoginId; Mobile Update - Send OTP-Invalid Login Hint See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Mobile Update - Send OTP-Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-107h6b18a5fa", "message": "OTP sent to mobile number ending with ******0903" } ``` --- # After ABHA creation - verify mobile OTP (optional) `POST /abha/api/v3/enrollment/auth/byAbdm` Verifies the OTP sent by *After ABHA creation - send OTP to verify mobile (optional)* and links the mobile number to the newly created ABHA. **Endpoint:** `POST /abha/api/v3/enrollment/auth/byAbdm` **Flow:** **Create ABHA - IRIS** - step 3 of 7 - Previous: *After ABHA creation - send OTP to verify mobile (optional)* - Next: *After ABHA creation - send OTP to verify email (optional)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-enrol", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/auth/byAbdm \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-enrol", "mobile-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted otp}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Mobile Update - Verify OTP-positive flow; Mobile Update - Verify OTP-OTP EXPIRED - `txnId` (string) - `authResult` (string) - `message` (string) - `accounts` (object[]) - `400`: Bad Request (request validation failed): Mobile Update - Verify OTP; Invalid Transaction Id; Invalid Scope; Invalid AuthMethod See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error: Mobile Update - Verify OTP-Invalid access token See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "authResult": "success", "message": "Mobile number is now successfully linked to your Account", "accounts": [ { "ABHANumber": "" } ] } ``` --- # After ABHA creation - send OTP to verify email (optional) `POST /abha/api/v3/enrollment/request/otp` Optional. Sends an ABDM OTP to an email address so it can be linked to the newly created ABHA. Send the `txnId` from the previous enrolment step. **Endpoint:** `POST /abha/api/v3/enrollment/request/otp` **Flow:** **Create ABHA - IRIS** - step 4 of 7 - Previous: *After ABHA creation - verify mobile OTP (optional)* - Next: *After ABHA creation - verify email OTP (optional)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `scope` | `["ABHA-enrol", "email-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"email"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"ABDM"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "txnId": "{{txnId}}", "scope": [ "abha-enrol", "email-verify" ], "loginHint": "email", "loginId": "{{encrypted email}}", "otpSystem": "abdm" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `txnId` (string, required): Transaction ID returned by the previous step of this flow. - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: email. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: abdm. ## Responses - `200`: Success: Email Verify via OTP-positive flow - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): ABHA Verify via Email-Invalid scope; ABHA Verify via Email-Invalid LoginId; ABHA Verify via Email-Invalid Login Hint See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Email verify via OTP-Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-1074eb18a5fa", "message": "OTP sent to email address ending with *************" } ``` --- # After ABHA creation - verify email OTP (optional) `POST /abha/api/v3/enrollment/auth/byAbdm` Verifies the OTP sent by *After ABHA creation - send OTP to verify email (optional)* and links the email address to the newly created ABHA. **Endpoint:** `POST /abha/api/v3/enrollment/auth/byAbdm` **Flow:** **Create ABHA - IRIS** - step 5 of 7 - Previous: *After ABHA creation - send OTP to verify email (optional)* - Next: *After ABHA creation - get ABHA address suggestions* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-enrol", "email-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/auth/byAbdm \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-enrol", "email-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted otp}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Email Update - Verify OTP-positive flow; Email Update - Verify OTP-OTP EXPIRED - `txnId` (string) - `authResult` (string) - `message` (string) - `accounts` (object[]) - `400`: Bad Request (request validation failed): Invalid Transaction Id; Invalid Scope; Invalid AuthMethod See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error: Unclassified Authentication Failure (generic) See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `code` (string) - `message` (string) - `description` (string) Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "authResult": "success", "message": "Email address is now successfully linked to your Account", "accounts": [ { "ABHANumber": "" } ] } ``` --- # After ABHA creation - get ABHA address suggestions `GET /abha/api/v3/enrollment/enrol/suggestion` **Endpoint:** `GET /abha/api/v3/enrollment/enrol/suggestion` **Flow:** **Create ABHA - IRIS** - step 6 of 7 - Previous: *After ABHA creation - verify email OTP (optional)* - Next: *After ABHA creation - create ABHA address* --- This API endpoint is used to provide suggestions for ABHA addresses based on the user’s personal information. It helps users find suitable ABHA addresses by generating a list of suggestions. This is particularly useful during the ABHA enrolment process to ensure that users can choose an appropriate and unique ABHA address. ```bash curl --request GET \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/suggestion \ --header 'Authorization: Bearer ' \ --header 'TRANSACTION_ID: {{txnId}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TRANSACTION_ID` (string, required): Transaction ID from the ABHA creation response. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Responses - `200`: The 200 response code indicates a successful request. In this context, it refers to the successful operation of the Suggestion API, suggestions for ABHA addresses based on the user’s personal information. - `txnId` (string) - `abhaAddressList` (string[]) - `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:** **Abha Address - Invalid Transaction Id:** 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.. **Abha Address - Invalid Preferred Flag:** 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. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: The 401 response code indicates an unauthorized request. In this context, 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 generating ABHA address suggestions. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "abhaAddressList": [ "", "", "... 11 more of the same shape" ] } ``` --- # After ABHA creation - create ABHA address `POST /abha/api/v3/enrollment/enrol/abha-address` **Endpoint:** `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.. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/abha-address \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "txnId": "{{txnId}}", "abhaAddress": "{{ABHA Address}}", "preferred": 1 }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `txnId` (string, required): The transaction ID returned by the previous call in this flow. - `abhaAddress` (string, required): The ABHA address chosen for the account, without the @ suffix. - `preferred` (integer, required): 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. - `txnId` (string) - `abhaAddress` (string) - `preferred` (integer) - `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. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `preferred` (string) - `timestamp` (string) - `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. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "healthIdNumber": "", "preferredAbhaAddress": "" } ``` --- # Search ABHA by mobile `POST /abha/api/v3/profile/account/abha/search` **Endpoint:** `POST /abha/api/v3/profile/account/abha/search` **Flow:** **Find ABHA - Aadhaar OTP** - step 1 of 3 - Previous: none (first call of this flow) - Next: *Find ABHA via Aadhaar OTP - send OTP* --- This API endpoint is used to search for ABHA (Ayushman Bharat Health Account) profiles. It allows users to retrieve information about their ABHA profiles using mobile numbers. This is essential for verifying the user’s identity and ensuring secure access to their ABHA profile. **Note:** You need to use the Encryption API first. Only an RSA-encrypted mobile number should be in the request body. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/abha/search \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "search-abha" ], "mobile": "{{rsaMobileEncryptionOutput}}" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): The scope of the request. Use search-abha. - `mobile` (string, required): The mobile number, encrypted with the public key from GET /abha/api/v3/profile/public/certificate. ## Responses - `200`: Successfully retrieved ABHA details. - `400`: Invalid mobile number. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `mobile` (string) - `timestamp` (string) - `401`: Missing Credentials. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: User not found. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json [ { "txnId": "d5b1fb36-e0be-401d-b4cf-cc71c5aca98a", "ABHA": [ { "index": 1, "ABHANumber": "xx-xxxx-xxxx-XX31", "name": "", "gender": "F", "kycVerified": "true", "authMethods": [ "AADHAAR_OTP", "MOBILE_OTP", "... 2 more of the same shape" ] } ] } ] ``` --- # Find ABHA via Aadhaar OTP - send OTP `POST /abha/api/v3/profile/login/request/otp` Sends an Aadhaar OTP for the ABHA account picked from *Search ABHA by mobile*. Send `loginHint: index`, the RSA-encrypted `index` of the chosen account, and the `txnId` returned by the search. **Endpoint:** `POST /abha/api/v3/profile/login/request/otp` **Flow:** **Find ABHA - Aadhaar OTP** - step 2 of 3 - Previous: *Search ABHA by mobile* - Next: *Find ABHA via Aadhaar OTP - verify OTP* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "search-ABHA", "Aadhaar-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"index"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"Aadhaar"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | | `txnId` | string | yes | Transaction ID returned by the previous step of this flow. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "search-abha", "aadhaar-verify" ], "loginHint": "index", "loginId": "{{rsaIndexEncryptionOutput}}", "otpSystem": "aadhaar", "txnId": "{{searchTxnId}}" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: index. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: aadhaar. - `txnId` (string, required): Transaction ID returned by the previous step of this flow. ## Responses - `200`: Success: Find ABHA via Aadhaar OTP - Send OTP - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: Not Found: Resource not found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `timestamp` (string) - `path` (string) - `description` (string) - `error` (string) - `requestId` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "86b3d4c8-114e-4fd1-8604-93a684730827", "message": "OTP sent to Aadhaar registered mobile number ending with ******0903" } ``` --- # Find ABHA via Aadhaar OTP - verify OTP `POST /abha/api/v3/profile/login/verify` Verifies the Aadhaar OTP for the chosen account. Returns the ABHA details and the user token. **Endpoint:** `POST /abha/api/v3/profile/login/verify` **Flow:** **Find ABHA - Aadhaar OTP** - step 3 of 3 - Previous: *Find ABHA via Aadhaar OTP - send OTP* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted OTP}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Find ABHA via Aadhaar OTP - Positive flow - `authResult` (string) - `message` (string) - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `accounts.preferredAbhaAddress` (string) - `accounts.name` (string) - `accounts.status` (string) - `accounts.profilePhoto` (string) - `400`: Bad Request (request validation failed): Invalid Transaction Id See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `404`: Not Found: User Not Found; Resource Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "dcc22def-8102-4c9a-a36e-15743556fdc4", "authResult": "success", "message": "OTP verified successfully", "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000, "accounts": [ { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "status": "ACTIVE", "profilePhoto": "" } ] } ``` --- # Search ABHA by mobile `POST /abha/api/v3/profile/account/abha/search` **Endpoint:** `POST /abha/api/v3/profile/account/abha/search` **Flow:** **Find ABHA - Face** - step 1 of 4 - Previous: none (first call of this flow) - Next: *Find ABHA via Face - send authentication request* --- This API endpoint is used to search for ABHA (Ayushman Bharat Health Account) profiles. It allows users to retrieve information about their ABHA profiles using mobile numbers. This is essential for verifying the user’s identity and ensuring secure access to their ABHA profile. **Note:** You need to use the Encryption API first. Only an RSA-encrypted mobile number should be in the request body. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/abha/search \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "search-abha" ], "mobile": "{{rsaMobileEncryptionOutput}}" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): The scope of the request. Use search-abha. - `mobile` (string, required): The mobile number, encrypted with the public key from GET /abha/api/v3/profile/public/certificate. ## Responses - `200`: Successfully retrieved ABHA details. - `400`: Invalid mobile number. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `mobile` (string) - `timestamp` (string) - `401`: Missing Credentials. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: User not found. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json [ { "txnId": "d5b1fb36-e0be-401d-b4cf-cc71c5aca98a", "ABHA": [ { "index": 1, "ABHANumber": "xx-xxxx-xxxx-XX31", "name": "", "gender": "F", "kycVerified": "true", "authMethods": [ "AADHAAR_OTP", "MOBILE_OTP", "... 2 more of the same shape" ] } ] } ] ``` --- # Find ABHA via Face - send authentication request `POST /abha/api/v3/profile/login/request/otp` Starts face authentication for the ABHA account picked from *Search ABHA by mobile*. Send `loginHint: index`, the RSA-encrypted `index` of the chosen account, and the `txnId` returned by the search. Then poll *Face auth - capture PID / track status* until `COMPLETE`. **Endpoint:** `POST /abha/api/v3/profile/login/request/otp` **Flow:** **Find ABHA - Face** - step 2 of 4 - Previous: *Search ABHA by mobile* - Next: *Face auth - capture PID / track status* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "search-ABHA", "Aadhaar-face-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"index"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"Aadhaar"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | | `txnId` | string | yes | Transaction ID returned by the previous step of this flow. | > **Note:** The Postman collection sends scope `["ABHA-login","search-ABHA","face-auth"]` for this step. This spec uses `Aadhaar-face-verify`; confirm with NHA. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "search-abha", "aadhaar-face-verify" ], "loginHint": "index", "loginId": "{{rsaIndexEncryptionOutput}}", "otpSystem": "aadhaar", "txnId": "{{searchTxnId}}" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: index. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: aadhaar. - `txnId` (string, required): Transaction ID returned by the previous step of this flow. ## Responses - `200`: Success: Find ABHA Via Biometric (Face) - Send Face Authentication Request; Positive flow - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Biometric is not allowed See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: Not Found: Resource not found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `timestamp` (string) - `path` (string) - `description` (string) - `error` (string) - `requestId` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-1074eb18a5fa", "message": "Face authentication request successfully sent." } ``` --- # Face auth - capture PID / track status `POST /abha/api/v3/enrollment/enrol/capturePID` **Endpoint:** `POST /abha/api/v3/enrollment/enrol/capturePID` **Flow:** **Find ABHA - Face** - step 3 of 4 - Previous: *Find ABHA via Face - send authentication request* - Next: *Find ABHA via Face - verify* > **Note:** The original description below says the next step is ABHA enrolment. In this flow the next step is the verify API named above. --- This API is designed to verify the status of a transaction ID that was generated during the invocation of the `auth/init` API. It serves as a follow-up mechanism to ensure that the transaction is still valid, active, and has not expired or been invalidated. Wait for PID capture and submission confirmation from the ABHA App. The response of the API will return status of that transactionId. It can be either **PENDING,VERIFIED,FAILED,COMPLETE.** Once the status in the response of this API is returned as **COMPLETE**, it indicates that the face authentication process has been successfully completed. At this stage, the next step is to invoke the `/enrollment/enrol/byAadhaar` (You can find this API in ABHA ENROLLMENT Via Aadhaar section) API to proceed further. User can poll the `/capturePID` API in every 5 - 10 seconds interval to check the status of face capture process or alternatively skip this step and call the `/enrollment/enrol/byAadhaar` API once they see the PID submission success message in the ABHA app. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/capturePID \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-enrol", "face-verify" ], "txnId": "ea1dc7aa-d7c3-40ab-bee8-84c6f1eb90fa" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): The scopes of the request, which name the flow this call belongs to. - `txnId` (string, required): The transaction ID returned by the previous call in this flow. ## Responses - `200`: The 200 response code indicates a successful request. The reponse of the API will return status of that transactionId. It can be either **PENDING,VERIFIED,FAILED,COMPLETE.** - `status` (string) - `message` (string) - `400`: The 400 response code indicates a bad request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `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 See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "status": "PENDING", "message": "Awaiting PID capture" } ``` --- # Find ABHA via Face - verify `POST /abha/api/v3/profile/login/verify` Completes face authentication for the chosen account. Once *Face auth - capture PID / track status* reports `COMPLETE`, send the same `txnId` here (the body has no PID). **Endpoint:** `POST /abha/api/v3/profile/login/verify` **Flow:** **Find ABHA - Face** - step 4 of 4 - Previous: *Face auth - capture PID / track status* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-face-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["face_auth"]` | yes | Authentication method used in this step. | | `authData.face` | object | yes | Face authentication block. | | `authData.face.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-face-verify" ], "authData": { "authMethods": [ "face_auth" ], "face": { "txnId": "{{txnId}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.face` (object, required): Face authentication block. - `authData.face.txnId` (string, required): Transaction ID returned by the previous step of this flow. ## Responses - `200`: Success: Positive flow - `authResult` (string) - `message` (string) - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `accounts.preferredAbhaAddress` (string) - `accounts.name` (string) - `accounts.status` (string) - `accounts.profilePhoto` (string) - `400`: Bad Request (request validation failed): Invalid DTO; Invalid DTO (2); Invalid PID; Empty Body; Invalid TxnId; Invalid AuthMethod; Invalid AuthMethod (2) See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Authorization See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `404`: Not Found: Invalid URL See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure): Used PID; Expired PID; Used Bio PID; Another User PID; Biometric not matched See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object, required) - `error.code` (string, required): Consent code. Use `abha-enrollment`. - `error.message` (string, required) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "d17cb533-9bfa-40f5-a7bc-b84143516787", "authResult": "success", "message": "Aadhaar Face Authentication Success", "token": "...", "expiresIn": 1800, "refreshToken": "...", "refreshExpiresIn": 1296000, "accounts": [ { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "status": "ACTIVE", "profilePhoto": "{{base64 profile photo}}", "mobileVerified": false } ] } ``` --- # Search ABHA by mobile `POST /abha/api/v3/profile/account/abha/search` **Endpoint:** `POST /abha/api/v3/profile/account/abha/search` **Flow:** **Find ABHA - Fingerprint** - step 1 of 3 - Previous: none (first call of this flow) - Next: *Find ABHA via Fingerprint - send authentication request* --- This API endpoint is used to search for ABHA (Ayushman Bharat Health Account) profiles. It allows users to retrieve information about their ABHA profiles using mobile numbers. This is essential for verifying the user’s identity and ensuring secure access to their ABHA profile. **Note:** You need to use the Encryption API first. Only an RSA-encrypted mobile number should be in the request body. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/abha/search \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "search-abha" ], "mobile": "{{rsaMobileEncryptionOutput}}" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): The scope of the request. Use search-abha. - `mobile` (string, required): The mobile number, encrypted with the public key from GET /abha/api/v3/profile/public/certificate. ## Responses - `200`: Successfully retrieved ABHA details. - `400`: Invalid mobile number. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `mobile` (string) - `timestamp` (string) - `401`: Missing Credentials. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: User not found. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json [ { "txnId": "d5b1fb36-e0be-401d-b4cf-cc71c5aca98a", "ABHA": [ { "index": 1, "ABHANumber": "xx-xxxx-xxxx-XX31", "name": "", "gender": "F", "kycVerified": "true", "authMethods": [ "AADHAAR_OTP", "MOBILE_OTP", "... 2 more of the same shape" ] } ] } ] ``` --- # Find ABHA via Fingerprint - send authentication request `POST /abha/api/v3/profile/login/request/otp` Starts fingerprint authentication for the ABHA account picked from *Search ABHA by mobile*. Send `loginHint: index`, the RSA-encrypted `index` of the chosen account, and the `txnId` returned by the search. **Endpoint:** `POST /abha/api/v3/profile/login/request/otp` **Flow:** **Find ABHA - Fingerprint** - step 2 of 3 - Previous: *Search ABHA by mobile* - Next: *Find ABHA via Fingerprint - verify* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "search-ABHA", "Aadhaar-bio-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"index"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"Aadhaar"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | | `txnId` | string | yes | Transaction ID returned by the previous step of this flow. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "search-abha", "aadhaar-bio-verify" ], "loginHint": "index", "loginId": "{{rsaIndexEncryptionOutput}}", "otpSystem": "aadhaar", "txnId": "{{searchTxnId}}" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: index. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: aadhaar. - `txnId` (string, required): Transaction ID returned by the previous step of this flow. ## Responses - `200`: Success: Find ABHA Via Biometric (Fingerprint) - Send Fingerprint Authentication Request - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: Not Found: Resource not found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `timestamp` (string) - `path` (string) - `description` (string) - `error` (string) - `requestId` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-1074eb18a5fa", "message": "FingerPrint authentication request successfully sent." } ``` --- # Find ABHA via Fingerprint - verify `POST /abha/api/v3/profile/login/verify` Completes fingerprint authentication for the chosen account. Send the `txnId` from *Find ABHA via Fingerprint - send authentication request* with the fingerprint PID. **Endpoint:** `POST /abha/api/v3/profile/login/verify` **Flow:** **Find ABHA - Fingerprint** - step 3 of 3 - Previous: *Find ABHA via Fingerprint - send authentication request* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-bio-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["bio"]` | yes | Authentication method used in this step. | | `authData.bio` | object | yes | Fingerprint authentication block. | | `authData.bio.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.bio.fingerPrintAuthPid` | string | yes | Base64 PID block captured from a registered fingerprint RD device. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-bio-verify" ], "authData": { "authMethods": [ "bio" ], "bio": { "txnId": "{{txnId}}", "fingerPrintAuthPid": "{{fingerPrintAuthPid}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.bio` (object, required): Fingerprint authentication block. - `authData.bio.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.bio.fingerPrintAuthPid` (string, required): Base64 PID block captured from a registered fingerprint RD device. ## Responses - `200`: Success: Find ABHA via Fingerprint - Positive flow - `authResult` (string) - `message` (string) - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `accounts.preferredAbhaAddress` (string) - `accounts.name` (string) - `accounts.status` (string) - `accounts.profilePhoto` (string) - `400`: Bad Request (request validation failed): Invalid Fingerprint PID See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `404`: Not Found: User Not Found; Resource Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "fe1c527e-1ab8-40c4-84d2-9eedb3378d39", "authResult": "success", "message": "BIO verified successfully", "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000, "accounts": [ { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "status": "ACTIVE", "profilePhoto": "" } ] } ``` --- # Search ABHA by mobile `POST /abha/api/v3/profile/account/abha/search` **Endpoint:** `POST /abha/api/v3/profile/account/abha/search` **Flow:** **Find ABHA - IRIS** - step 1 of 3 - Previous: none (first call of this flow) - Next: *Find ABHA via IRIS - send authentication request* --- This API endpoint is used to search for ABHA (Ayushman Bharat Health Account) profiles. It allows users to retrieve information about their ABHA profiles using mobile numbers. This is essential for verifying the user’s identity and ensuring secure access to their ABHA profile. **Note:** You need to use the Encryption API first. Only an RSA-encrypted mobile number should be in the request body. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/abha/search \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "search-abha" ], "mobile": "{{rsaMobileEncryptionOutput}}" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): The scope of the request. Use search-abha. - `mobile` (string, required): The mobile number, encrypted with the public key from GET /abha/api/v3/profile/public/certificate. ## Responses - `200`: Successfully retrieved ABHA details. - `400`: Invalid mobile number. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `mobile` (string) - `timestamp` (string) - `401`: Missing Credentials. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: User not found. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json [ { "txnId": "d5b1fb36-e0be-401d-b4cf-cc71c5aca98a", "ABHA": [ { "index": 1, "ABHANumber": "xx-xxxx-xxxx-XX31", "name": "", "gender": "F", "kycVerified": "true", "authMethods": [ "AADHAAR_OTP", "MOBILE_OTP", "... 2 more of the same shape" ] } ] } ] ``` --- # Find ABHA via IRIS - send authentication request `POST /abha/api/v3/profile/login/request/otp` Starts IRIS authentication for the ABHA account picked from *Search ABHA by mobile*. Send `loginHint: index`, the RSA-encrypted `index` of the chosen account, and the `txnId` returned by the search. **Endpoint:** `POST /abha/api/v3/profile/login/request/otp` **Flow:** **Find ABHA - IRIS** - step 2 of 3 - Previous: *Search ABHA by mobile* - Next: *Find ABHA via IRIS - verify* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "search-ABHA", "Aadhaar-iris-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"index"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"Aadhaar"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | | `txnId` | string | yes | Transaction ID returned by the previous step of this flow. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "search-abha", "aadhaar-iris-verify" ], "loginHint": "index", "loginId": "{{rsaIndexEncryptionOutput}}", "otpSystem": "aadhaar", "txnId": "{{searchTxnId}}" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: index. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: aadhaar. - `txnId` (string, required): Transaction ID returned by the previous step of this flow. ## Responses - `200`: Success: Find ABHA Via Biometric (Iris) - Send Iris Authentication Request - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: Not Found: Resource not found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `timestamp` (string) - `path` (string) - `description` (string) - `error` (string) - `requestId` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-1074eb18a5fa", "message": "Iris authentication request successfully sent." } ``` --- # Find ABHA via IRIS - verify `POST /abha/api/v3/profile/login/verify` Completes IRIS authentication for the chosen account. Send the `txnId` from *Find ABHA via IRIS - send authentication request* with the IRIS PID. **Endpoint:** `POST /abha/api/v3/profile/login/verify` **Flow:** **Find ABHA - IRIS** - step 3 of 3 - Previous: *Find ABHA via IRIS - send authentication request* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-iris-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["iris"]` | yes | Authentication method used in this step. | | `authData.iris` | object | yes | IRIS authentication block. | | `authData.iris.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.iris.irisAuthPid` | string | yes | Base64 PID block captured from a registered IRIS RD device. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-iris-verify" ], "authData": { "authMethods": [ "iris" ], "iris": { "txnId": "{{txnId}}", "irisAuthPid": "{{PID}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.iris` (object, required): IRIS authentication block. - `authData.iris.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.iris.irisAuthPid` (string, required): Base64 PID block captured from a registered IRIS RD device. ## Responses - `200`: Success: Find ABHA via IRIS - Positive flow - `authResult` (string) - `message` (string) - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `accounts.preferredAbhaAddress` (string) - `accounts.name` (string) - `accounts.status` (string) - `accounts.profilePhoto` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `404`: Not Found: User Not Found; Resource Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "a2s9f59d-dfba-4261-8ea2-16541cfd6f2a", "authResult": "success", "message": "IRIS verified successfully", "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000, "accounts": [ { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "status": "ACTIVE", "profilePhoto": "" } ] } ``` --- # Search ABHA by mobile `POST /abha/api/v3/profile/account/abha/search` **Endpoint:** `POST /abha/api/v3/profile/account/abha/search` **Flow:** **Find ABHA - Mobile OTP** - step 1 of 3 - Previous: none (first call of this flow) - Next: *Find ABHA via Mobile - send OTP* --- This API endpoint is used to search for ABHA (Ayushman Bharat Health Account) profiles. It allows users to retrieve information about their ABHA profiles using mobile numbers. This is essential for verifying the user’s identity and ensuring secure access to their ABHA profile. **Note:** You need to use the Encryption API first. Only an RSA-encrypted mobile number should be in the request body. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/abha/search \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "search-abha" ], "mobile": "{{rsaMobileEncryptionOutput}}" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): The scope of the request. Use search-abha. - `mobile` (string, required): The mobile number, encrypted with the public key from GET /abha/api/v3/profile/public/certificate. ## Responses - `200`: Successfully retrieved ABHA details. - `400`: Invalid mobile number. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `mobile` (string) - `timestamp` (string) - `401`: Missing Credentials. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: User not found. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json [ { "txnId": "d5b1fb36-e0be-401d-b4cf-cc71c5aca98a", "ABHA": [ { "index": 1, "ABHANumber": "xx-xxxx-xxxx-XX31", "name": "", "gender": "F", "kycVerified": "true", "authMethods": [ "AADHAAR_OTP", "MOBILE_OTP", "... 2 more of the same shape" ] } ] } ] ``` --- # Find ABHA via Mobile - send OTP `POST /abha/api/v3/profile/login/request/otp` Sends a mobile OTP for the ABHA account picked from *Search ABHA by mobile*. Send `loginHint: index`, the RSA-encrypted `index` of the chosen account, and the `txnId` returned by the search. **Endpoint:** `POST /abha/api/v3/profile/login/request/otp` **Flow:** **Find ABHA - Mobile OTP** - step 2 of 3 - Previous: *Search ABHA by mobile* - Next: *Find ABHA via Mobile - verify OTP* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "search-ABHA", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"index"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"ABDM"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | | `txnId` | string | yes | Transaction ID returned by the previous step of this flow. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "search-abha", "mobile-verify" ], "loginHint": "index", "loginId": "{{rsaIndexEncryptionOutput}}", "otpSystem": "abdm", "txnId": "{{searchTxnId}}" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: index. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: abdm. - `txnId` (string, required): Transaction ID returned by the previous step of this flow. ## Responses - `200`: Success: Search ABHA Via Mobile Number - Send OTP - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): Search ABHA Via Mobile Number - Invalid LoginId See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: Not Found: Resource not found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `timestamp` (string) - `path` (string) - `description` (string) - `error` (string) - `requestId` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "dcc22def-8102-4c9a-a36e-15743556fdc4", "message": "OTP sent to Aadhaar registered mobile number ending with ******7828" } ``` --- # Find ABHA via Mobile - verify OTP `POST /abha/api/v3/profile/login/verify` Verifies the mobile OTP for the chosen account. Returns the ABHA details and the user token. **Endpoint:** `POST /abha/api/v3/profile/login/verify` **Flow:** **Find ABHA - Mobile OTP** - step 3 of 3 - Previous: *Find ABHA via Mobile - send OTP* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "mobile-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted OTP}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Find ABHA - Verify Mobile OTP - `authResult` (string) - `message` (string) - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `accounts.preferredAbhaAddress` (string) - `accounts.name` (string) - `accounts.status` (string) - `accounts.profilePhoto` (string) - `400`: Bad Request (request validation failed): Find ABHA - Invalid Transaction Id See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `404`: Not Found: User Not Found; Resource Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "dcc22def-8102-4c9a-a36e-15743556fdc4", "authResult": "success", "message": "OTP verified successfully", "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000, "accounts": [ { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "status": "ACTIVE", "profilePhoto": "" } ] } ``` --- # Forgot ABHA via Aadhaar - send OTP `POST /abha/api/v3/profile/login/request/otp` Starts recovery of a forgotten ABHA number. UIDAI sends an OTP to the Aadhaar-linked mobile. **Endpoint:** `POST /abha/api/v3/profile/login/request/otp` **Flow:** **Forgot ABHA - Aadhaar OTP** - step 1 of 2 - Previous: none (first call of this flow) - Next: *Forgot ABHA via Aadhaar - verify OTP* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"Aadhaar"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"Aadhaar"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-verify" ], "loginHint": "aadhaar", "loginId": "{{encrypted Aadhaar}}", "otpSystem": "aadhaar" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: aadhaar. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: aadhaar. ## Responses - `200`: Success: Forgot ABHA via Aadhaar OTP- Positive Flow - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): Forgot ABHA via Aadhaar OTP- Invalid LoginHint; Forgot ABHA via Aadhaar OTP-Invalid scope See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Forgot ABHA via Aadhaar OTP- Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: Not Found: Resource not found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `timestamp` (string) - `path` (string) - `description` (string) - `error` (string) - `requestId` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "86b3d4c8-114e-4fd1-8604-93a684730827", "message": "OTP sent to Aadhaar registered mobile number ending with ******1670" } ``` --- # Forgot ABHA via Aadhaar - verify OTP `POST /abha/api/v3/profile/login/verify` Verifies the Aadhaar OTP. Returns the ABHA linked to the Aadhaar number, with the user token. **Endpoint:** `POST /abha/api/v3/profile/login/verify` **Flow:** **Forgot ABHA - Aadhaar OTP** - step 2 of 2 - Previous: *Forgot ABHA via Aadhaar - send OTP* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted OTP}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Forgot ABHA via Aadhaar OTP-Positive flow - `authResult` (string) - `message` (string) - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `accounts.preferredAbhaAddress` (string) - `accounts.name` (string) - `accounts.status` (string) - `accounts.profilePhoto` (string) - `400`: Bad Request (request validation failed): Forgot ABHA via Aadhaar OTP-Invalid OTP See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `404`: Not Found: User Not Found; Resource Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "725a7e53-96c3-49c2-9596-232a726f62a5", "authResult": "success", "message": "OTP verified successfully", "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000, "accounts": [ { "ABHANumber": "91-****-****-5727", "preferredAbhaAddress": "", "name": "", "status": "ACTIVE" } ] } ``` --- # Forgot ABHA via Mobile - send OTP `POST /abha/api/v3/profile/login/request/otp` Starts recovery of a forgotten ABHA number. ABDM sends an OTP to the mobile number. **Endpoint:** `POST /abha/api/v3/profile/login/request/otp` **Flow:** **Forgot ABHA - Mobile OTP** - step 1 of 2 - Previous: none (first call of this flow) - Next: *Forgot ABHA via Mobile - verify OTP* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"mobile"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"ABDM"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "mobile-verify" ], "loginHint": "mobile", "loginId": "{{encrypted mobile number}}", "otpSystem": "abdm" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: mobile. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: abdm. ## Responses - `200`: Success: Forgot ABHA via Mobile OTP- Positive flow - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): Forgot ABHA via Mobile OTP-Invalid LoginId; Forgot ABHA via Mobile OTP-Invalid LoginHint See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: Not Found: Resource not found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `timestamp` (string) - `path` (string) - `description` (string) - `error` (string) - `requestId` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "d41a143c-4751-46d4-aee5-94bf6d9c1bd6", "message": "OTP sent to Aadhaar registered mobile number ending with ******0903" } ``` --- # Forgot ABHA via Mobile - verify OTP `POST /abha/api/v3/profile/login/verify` Verifies the mobile OTP. Returns the ABHA accounts linked to the mobile number, and a short-lived token. **Endpoint:** `POST /abha/api/v3/profile/login/verify` **Flow:** **Forgot ABHA - Mobile OTP** - step 2 of 2 - Previous: *Forgot ABHA via Mobile - send OTP* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "mobile-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted OTP}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Forgot ABHA via Mobile OTP- Positive Flow - `authResult` (string) - `message` (string) - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `accounts.preferredAbhaAddress` (string) - `accounts.name` (string) - `accounts.status` (string) - `accounts.profilePhoto` (string) - `400`: Bad Request (request validation failed): Forgot ABHA via Mobile OTP-Invalid OTP Value; Forgot ABHA via Mobile OTP-Invalid Transaction Id; Forgot ABHA via Mobile OTP-Invalid scope; Forgot ABHA via Mobile OTP-Invalid authMethod See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `404`: Not Found: User Not Found; Resource Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "c837a1bd-7694-4c06-a42c-7eb36e445d1d", "authResult": "success", "message": "OTP verified successfully", "token": "", "expiresIn": 300, "accounts": [ { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "gender": "M", "dob": "", "verifiedStatus": "VERIFIED", "verificationType": "AADHAAR", "status": "ACTIVE", "profilePhoto": "" }, { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "gender": "M", "dob": "", "verifiedStatus": "VERIFIED", "verificationType": "AADHAAR", "status": "ACTIVE", "profilePhoto": "" }, "... 2 more of the same shape" ] } ``` --- # Login via Aadhaar number - send Aadhaar OTP `POST /abha/api/v3/profile/login/request/otp` Starts login with an Aadhaar number. UIDAI sends an OTP to the Aadhaar-linked mobile. **Endpoint:** `POST /abha/api/v3/profile/login/request/otp` **Flow:** **Login - Aadhaar Number** - step 1 of 2 - Previous: none (first call of this flow) - Next: *Login via Aadhaar number - verify Aadhaar OTP* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"Aadhaar"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"Aadhaar"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-verify" ], "loginHint": "aadhaar", "loginId": "{{encrypted aadhaar-number}}", "otpSystem": "aadhaar" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: aadhaar. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: aadhaar. ## Responses - `200`: Success: Login Via Aadhaar Number - Using Aadhaar OTP - Send OTP - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): Login via Aadhaar - Invalid Login Hint; Login via Aadhaar OTP - Invalid Scope; Login via Aadhaar OTP - Invalid LoginId See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Login via Aadhaar - Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: Not Found: Resource not found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `timestamp` (string) - `path` (string) - `description` (string) - `error` (string) - `requestId` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "86b3d4c8-114e-4fd1-8604-93a684730827", "message": "OTP sent to Aadhaar registered mobile number ending with ******0903" } ``` --- # Login via Aadhaar number - verify Aadhaar OTP `POST /abha/api/v3/profile/login/verify` Verifies the Aadhaar OTP for Aadhaar-number login. Returns the user X-token (`token`) of the ABHA linked to the Aadhaar. **Endpoint:** `POST /abha/api/v3/profile/login/verify` **Flow:** **Login - Aadhaar Number** - step 2 of 2 - Previous: *Login via Aadhaar number - send Aadhaar OTP* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted OTP}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Verify Login Via Aadhaar Number - Positive flow - `authResult` (string) - `message` (string) - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `accounts.preferredAbhaAddress` (string) - `accounts.name` (string) - `accounts.status` (string) - `accounts.profilePhoto` (string) - `400`: Bad Request (request validation failed): Invalid OTP Value; Invalid Transaction Id See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `404`: Not Found: ABHA user not registered See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "9fc6af6a-374f-4b6a-9cbe-791d360dfc28", "authResult": "success", "message": "OTP verified successfully", "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000, "accounts": [ { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "status": "ACTIVE", "profilePhoto": "" } ] } ``` --- # Login via ABHA number - send Aadhaar OTP `POST /abha/api/v3/profile/login/request/otp` Starts login with an ABHA number. UIDAI sends an OTP to the mobile linked with the Aadhaar of this ABHA. **Endpoint:** `POST /abha/api/v3/profile/login/request/otp` **Flow:** **Login - ABHA Number (Aadhaar OTP)** - step 1 of 2 - Previous: none (first call of this flow) - Next: *Login via ABHA number - verify Aadhaar OTP* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"ABHA-number"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"Aadhaar"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-verify" ], "loginHint": "abha-number", "loginId": "{{encrypted abha-number}}", "otpSystem": "aadhaar" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: abha-number. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: aadhaar. ## Responses - `200`: Success: Login Via ABHA Number - Using Aadhaar OTP - Send OTP - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): Login Via ABHA Number - Using Aadhaar OTP - Invalid Login Hint See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Login Via ABHA Number -Using Aadhaar OTP-Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: Not Found: Resource not found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `timestamp` (string) - `path` (string) - `description` (string) - `error` (string) - `requestId` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-1074eb18a5fa", "message": "OTP sent to Aadhaar registered mobile number ending with ******0903" } ``` --- # Login via ABHA number - verify Aadhaar OTP `POST /abha/api/v3/profile/login/verify` Verifies the Aadhaar OTP for ABHA-number login. Returns the user X-token (`token`) and a refresh token. **Endpoint:** `POST /abha/api/v3/profile/login/verify` **Flow:** **Login - ABHA Number (Aadhaar OTP)** - step 2 of 2 - Previous: *Login via ABHA number - send Aadhaar OTP* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted OTP}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Verify Login Via ABHA Number - Using Aadhaar OTP - `authResult` (string) - `message` (string) - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `accounts.preferredAbhaAddress` (string) - `accounts.name` (string) - `accounts.status` (string) - `accounts.profilePhoto` (string) - `400`: Bad Request (request validation failed): Verify Login via ABHA Number using Aadhaar OTP - Invalid OTP Value See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `404`: Not Found: User Not Found; Resource Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "9fc6af6a-374f-4b6a-9cbe-791d360dfc28", "authResult": "success", "message": "OTP verified successfully", "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000, "accounts": [ { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "status": "ACTIVE", "profilePhoto": "" } ] } ``` --- # Login via ABHA number - send ABHA (mobile) OTP `POST /abha/api/v3/profile/login/request/otp` Starts login with an ABHA number. ABDM sends an OTP to the mobile registered with this ABHA. **Endpoint:** `POST /abha/api/v3/profile/login/request/otp` **Flow:** **Login - ABHA Number (Mobile OTP)** - step 1 of 2 - Previous: none (first call of this flow) - Next: *Login via ABHA number - verify ABHA (mobile) OTP* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"ABHA-number"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"ABDM"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "mobile-verify" ], "loginHint": "abha-number", "loginId": "{{encrypted abha-number}}", "otpSystem": "abdm" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: abha-number. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: abdm. ## Responses - `200`: Success: Login Via ABHA Number - Using ABHA OTP - Send OTP - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): Login Via ABHA Number - Using ABHA OTP - Invalid Login Hint See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Login Via ABHA Number - Using ABHA OTP- Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: Not Found: Resource not found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `timestamp` (string) - `path` (string) - `description` (string) - `error` (string) - `requestId` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-1074eb18a5fa", "message": "OTP sent to Aadhaar registered mobile number ending with ******0903" } ``` --- # Login via ABHA number - verify ABHA (mobile) OTP `POST /abha/api/v3/profile/login/verify` Verifies the ABHA (mobile) OTP for ABHA-number login. Returns the user X-token (`token`) and a refresh token. **Endpoint:** `POST /abha/api/v3/profile/login/verify` **Flow:** **Login - ABHA Number (Mobile OTP)** - step 2 of 2 - Previous: *Login via ABHA number - send ABHA (mobile) OTP* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "mobile-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted OTP}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Verify Login Via ABHA Number - Using ABHA OTP - `authResult` (string) - `message` (string) - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `accounts.preferredAbhaAddress` (string) - `accounts.name` (string) - `accounts.status` (string) - `accounts.profilePhoto` (string) - `400`: Bad Request (request validation failed): Verify Login via ABHA Number using ABHA OTP - Invalid OTP Value See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `404`: Not Found: User Not Found; Resource Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "160ce506-4ef8-462e-ba2f-413c6f17852e", "authResult": "success", "message": "OTP verified successfully", "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000, "accounts": [ { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "status": "ACTIVE", "profilePhoto": "" } ] } ``` --- # Login via Biometric (Fingerprint) - v3.1 single step `POST /abha/api/v3.1/profile/login/verify` v3.1 fingerprint login in a single call. Send the encrypted Aadhaar number and the fingerprint PID. Returns the user X-token (`token`). No send-request step is needed. **Endpoint:** `POST /abha/api/v3.1/profile/login/verify` **Flow:** **Login - Biometric v3.1** - independent API; call the one that fits your identifier / modality. **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-bio-login-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["bio_login"]` | yes | Authentication method used in this step. | | `authData.bio_login` | object | yes | Fingerprint login block (v3.1). | | `authData.bio_login.aadhaar` | string | yes | Aadhaar number, RSA-encrypted. | | `authData.bio_login.fingerPrintAuthPid` | string | yes | Base64 PID block captured from a registered fingerprint RD device. | > **Note:** This API is only in the Postman collection (v3.1). The request/response is taken from there, and the success response shape reuses the v3 biometric verify example. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3.1/profile/login/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-bio-login-verify" ], "authData": { "authMethods": [ "bio_login" ], "bio_login": { "aadhaar": "{{encryptedAadhaar}}", "fingerPrintAuthPid": "{{fingerPrintAuthPid}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.bio_login` (object, required): Fingerprint login block (v3.1). - `authData.bio_login.aadhaar` (string, required): Aadhaar number, RSA-encrypted. - `authData.bio_login.fingerPrintAuthPid` (string, required): Base64 PID block captured from a registered fingerprint RD device. ## Responses - `200`: Success: Verify Login via Fingerprint (v3.1) - Positive flow - `authResult` (string) - `message` (string) - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `accounts.preferredAbhaAddress` (string) - `accounts.name` (string) - `accounts.status` (string) - `accounts.profilePhoto` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `404`: Not Found: User Not Found; Resource Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "fe1c527e-1ab8-40c4-84d2-9eedb3378d39", "authResult": "success", "message": "BIO verified successfully", "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000, "accounts": [ { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "status": "ACTIVE", "profilePhoto": "" } ] } ``` --- # Login via Biometric (Iris) - v3.1 single step `POST /abha/api/v3.1/profile/login/verify` v3.1 IRIS login in a single call. Send the encrypted Aadhaar number and the IRIS PID. Returns the user X-token (`token`). No send-request step is needed. **Endpoint:** `POST /abha/api/v3.1/profile/login/verify` **Flow:** **Login - Biometric v3.1** - independent API; call the one that fits your identifier / modality. **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-iris-login-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["iris_login"]` | yes | Authentication method used in this step. | | `authData.iris_login` | object | yes | IRIS login block (v3.1). | | `authData.iris_login.aadhaar` | string | yes | Aadhaar number, RSA-encrypted. | | `authData.iris_login.irisAuthPid` | string | yes | Base64 PID block captured from a registered IRIS RD device. | > **Note:** This API is only in the Postman collection (v3.1). The request/response is taken from there, and the success response shape reuses the v3 biometric verify example. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3.1/profile/login/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-iris-login-verify" ], "authData": { "authMethods": [ "iris_login" ], "iris_login": { "aadhaar": "{{encryptedAadhaar}}", "irisAuthPid": "{{irisAuthPid}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.iris_login` (object, required): IRIS login block (v3.1). - `authData.iris_login.aadhaar` (string, required): Aadhaar number, RSA-encrypted. - `authData.iris_login.irisAuthPid` (string, required): Base64 PID block captured from a registered IRIS RD device. ## Responses - `200`: Success: Verify Login via Iris (v3.1) - Positive flow - `authResult` (string) - `message` (string) - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `accounts.preferredAbhaAddress` (string) - `accounts.name` (string) - `accounts.status` (string) - `accounts.profilePhoto` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `404`: Not Found: User Not Found; Resource Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "a2s9f59d-dfba-4261-8ea2-16541cfd6f2a", "authResult": "success", "message": "IRIS verified successfully", "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000, "accounts": [ { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "status": "ACTIVE", "profilePhoto": "" } ] } ``` --- # Login via Biometric (Fingerprint) - send authentication request `POST /abha/api/v3/profile/login/request/otp` Starts fingerprint login for an ABHA number. Use the returned `txnId` in *Login via Biometric (Fingerprint) - verify*. **Endpoint:** `POST /abha/api/v3/profile/login/request/otp` **Flow:** **Login - Biometric v3 (Fingerprint)** - step 1 of 2 - Previous: none (first call of this flow) - Next: *Login via Biometric (Fingerprint) - verify* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-bio-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"ABHA-number"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"ABDM"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | > **Note:** The Postman collection does biometric login with a single call to `/abha/api/v3.1/profile/login/verify` (see tag *Login - Biometric v3.1*). Confirm which contract is current. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-bio-verify" ], "loginHint": "abha-number", "loginId": "{{encrypted abha-number}}", "otpSystem": "abdm" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: abha-number. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: abdm. ## Responses - `200`: Success: Login Via Biometric - Using Fingerprint - Send OTP - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: Not Found: Resource not found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `timestamp` (string) - `path` (string) - `description` (string) - `error` (string) - `requestId` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-1074eb18a5fa", "message": "FingerPrint authentication request successfully sent." } ``` --- # Login via Biometric (Fingerprint) - verify `POST /abha/api/v3/profile/login/verify` Completes fingerprint login. Send the `txnId` from *Login via Biometric (Fingerprint) - send authentication request* with the fingerprint PID. Returns the user X-token (`token`). **Endpoint:** `POST /abha/api/v3/profile/login/verify` **Flow:** **Login - Biometric v3 (Fingerprint)** - step 2 of 2 - Previous: *Login via Biometric (Fingerprint) - send authentication request* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-bio-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["bio"]` | yes | Authentication method used in this step. | | `authData.bio` | object | yes | Fingerprint authentication block. | | `authData.bio.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.bio.fingerPrintAuthPid` | string | yes | Base64 PID block captured from a registered fingerprint RD device. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-bio-verify" ], "authData": { "authMethods": [ "bio" ], "bio": { "txnId": "{{txnId}}", "fingerPrintAuthPid": "{{PID}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.bio` (object, required): Fingerprint authentication block. - `authData.bio.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.bio.fingerPrintAuthPid` (string, required): Base64 PID block captured from a registered fingerprint RD device. ## Responses - `200`: Success: Verify Login Via Biometric - FingerPrint - `authResult` (string) - `message` (string) - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `accounts.preferredAbhaAddress` (string) - `accounts.name` (string) - `accounts.status` (string) - `accounts.profilePhoto` (string) - `400`: Bad Request (request validation failed): Verify Login via Biometric (FingerPrint) - Invalid Pid See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `404`: Not Found: User Not Found; Resource Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "fe1c527e-1ab8-40c4-84d2-9eedb3378d39", "authResult": "success", "message": "BIO verified successfully", "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000, "accounts": [ { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "status": "ACTIVE", "profilePhoto": "" } ] } ``` --- # Login via Biometric (Iris) - send authentication request `POST /abha/api/v3/profile/login/request/otp` Starts IRIS login for an ABHA number. Use the returned `txnId` in *Login via Biometric (Iris) - verify*. **Endpoint:** `POST /abha/api/v3/profile/login/request/otp` **Flow:** **Login - Biometric v3 (Iris)** - step 1 of 2 - Previous: none (first call of this flow) - Next: *Login via Biometric (Iris) - verify* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-iris-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"ABHA-number"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"ABDM"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | > **Note:** The Postman collection does biometric login with a single call to `/abha/api/v3.1/profile/login/verify` (see tag *Login - Biometric v3.1*). Confirm which contract is current. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-iris-verify" ], "loginHint": "abha-number", "loginId": "{{encrypted abha-number}}", "otpSystem": "abdm" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: abha-number. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: abdm. ## Responses - `200`: Success: Login Via Biometric - Using Iris - Send OTP - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: Not Found: Resource not found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `timestamp` (string) - `path` (string) - `description` (string) - `error` (string) - `requestId` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "37d8d312-35a0-41e7-a6e4-1074eb18a5fa", "message": "IRIS authentication request successfully sent." } ``` --- # Login via Biometric (Iris) - verify `POST /abha/api/v3/profile/login/verify` Completes IRIS login. Send the `txnId` from *Login via Biometric (Iris) - send authentication request* with the IRIS PID. Returns the user X-token (`token`). **Endpoint:** `POST /abha/api/v3/profile/login/verify` **Flow:** **Login - Biometric v3 (Iris)** - step 2 of 2 - Previous: *Login via Biometric (Iris) - send authentication request* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-iris-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["iris"]` | yes | Authentication method used in this step. | | `authData.iris` | object | yes | IRIS authentication block. | | `authData.iris.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.iris.irisAuthPid` | string | yes | Base64 PID block captured from a registered IRIS RD device. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-iris-verify" ], "authData": { "authMethods": [ "iris" ], "iris": { "txnId": "{{txnId}}", "irisAuthPid": "{{PID}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.iris` (object, required): IRIS authentication block. - `authData.iris.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.iris.irisAuthPid` (string, required): Base64 PID block captured from a registered IRIS RD device. ## Responses - `200`: Success: Verify Login Via Biometric - IRIS - `authResult` (string) - `message` (string) - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `accounts.preferredAbhaAddress` (string) - `accounts.name` (string) - `accounts.status` (string) - `accounts.profilePhoto` (string) - `400`: Bad Request (request validation failed): Invalid Transaction Id See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `404`: Not Found: User Not Found; Resource Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "a2s9f59d-dfba-4261-8ea2-16541cfd6f2a", "authResult": "success", "message": "IRIS verified successfully", "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000, "accounts": [ { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "status": "ACTIVE", "profilePhoto": "" } ] } ``` --- # Face auth - generate transaction ID (init) `POST /abha/api/v3/enrollment/enrol/auth/init` **Endpoint:** `POST /abha/api/v3/enrollment/enrol/auth/init` **Flow:** **Login - Face Auth QR (v3.1)** - step 1 of 3 - Previous: none (first call of this flow) - Next: *Face auth - capture PID / track status* --- This API will help to generate transaction ID. This transaction ID will be used for whole face authentication process. The user can submit this transaction ID to the **ABHA** app using either intent-based sharing or by generating a QR code. User can use this transaction ID to generate QR code using any QR generator tool. Open ABHA app and scan this QR code on ABHA App to start and complete the face capture process. The data format of the QR code should follow this pattern: https:///face-auth?txnId=. **For example:** https://phrsbx.abdm.gov.in/face-auth?txnId=bac7251b-cd25-44d5-9707-f3d2ba181c1c For Sandbox- PHR-env-base-URL - https://phrsbx.abdm.gov.in For Production - PHR-env-base-URL - https://phr.abdm.gov.in ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/auth/init \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-enrol", "face-auth" ] }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): The scopes of the request, which name the flow this call belongs to. ## Responses - `200`: The 200 response code indicates a successful request. In this context, it refers to the successful generation of Transaction Id. - `txnId` (string) - `message` (string) - `400`: The 400 response code indicates a bad request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `scope` (string) - `timestamp` (string) - `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 See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "23acf181-339d-4771-b532-5c5df4a28d19", "message": "Transaction Id generated Successfully" } ``` --- # Face auth - capture PID / track status `POST /abha/api/v3/enrollment/enrol/capturePID` **Endpoint:** `POST /abha/api/v3/enrollment/enrol/capturePID` **Flow:** **Login - Face Auth QR (v3.1)** - step 2 of 3 - Previous: *Face auth - generate transaction ID (init)* - Next: *Login via Face Auth (QR) - verify* > **Note:** The original description below says the next step is ABHA enrolment. In this flow the next step is the verify API named above. --- This API is designed to verify the status of a transaction ID that was generated during the invocation of the `auth/init` API. It serves as a follow-up mechanism to ensure that the transaction is still valid, active, and has not expired or been invalidated. Wait for PID capture and submission confirmation from the ABHA App. The response of the API will return status of that transactionId. It can be either **PENDING,VERIFIED,FAILED,COMPLETE.** Once the status in the response of this API is returned as **COMPLETE**, it indicates that the face authentication process has been successfully completed. At this stage, the next step is to invoke the `/enrollment/enrol/byAadhaar` (You can find this API in ABHA ENROLLMENT Via Aadhaar section) API to proceed further. User can poll the `/capturePID` API in every 5 - 10 seconds interval to check the status of face capture process or alternatively skip this step and call the `/enrollment/enrol/byAadhaar` API once they see the PID submission success message in the ABHA app. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/capturePID \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-enrol", "face-verify" ], "txnId": "ea1dc7aa-d7c3-40ab-bee8-84c6f1eb90fa" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): The scopes of the request, which name the flow this call belongs to. - `txnId` (string, required): The transaction ID returned by the previous call in this flow. ## Responses - `200`: The 200 response code indicates a successful request. The reponse of the API will return status of that transactionId. It can be either **PENDING,VERIFIED,FAILED,COMPLETE.** - `status` (string) - `message` (string) - `400`: The 400 response code indicates a bad request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `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 See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "status": "PENDING", "message": "Awaiting PID capture" } ``` --- # Login via Face Auth (QR) - verify `POST /abha/api/v3.1/profile/login/verify` Completes login through the face-auth QR / ABHA-app flow. First call *Face auth - generate transaction ID (init)*, then poll *Face auth - capture PID / track status* until `COMPLETE`. Then send the same `txnId` here. Returns the user X-token (`token`). **Endpoint:** `POST /abha/api/v3.1/profile/login/verify` **Flow:** **Login - Face Auth QR (v3.1)** - step 3 of 3 - Previous: *Face auth - capture PID / track status* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "Aadhaar-face-login-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["face_auth"]` | yes | Authentication method used in this step. | | `authData.face_login` | object | yes | Face login block (v3.1). | | `authData.face_login.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.face_login.aadhaar` | string | yes | Aadhaar number, RSA-encrypted. | > **Note:** This API is only in the Postman collection (v3.1). ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3.1/profile/login/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "aadhaar-face-login-verify" ], "authData": { "authMethods": [ "face_auth" ], "face_login": { "txnId": "8220299c-40ad-40b6-bc52-13a7d46a69d0", "aadhaar": "{{encrypted aadhaar number}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.face_login` (object, required): Face login block (v3.1). - `authData.face_login.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.face_login.aadhaar` (string, required): Aadhaar number, RSA-encrypted. ## Responses - `200`: Success: Positive flow - `authResult` (string) - `message` (string) - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `accounts.preferredAbhaAddress` (string) - `accounts.name` (string) - `accounts.status` (string) - `accounts.profilePhoto` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `404`: Not Found: User Not Found; Resource Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "ad0aff4b-77dc-48c0-9c4a-18ac4f13af49", "authResult": "success", "message": "FACE verified successfully", "token": "...", "expiresIn": 1800, "refreshToken": "...", "refreshExpiresIn": 1296000, "accounts": [ { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "status": "ACTIVE", "profilePhoto": "{{base64 profile photo}}" } ] } ``` --- # Login via Mobile number - send OTP `POST /abha/api/v3/profile/login/request/otp` Starts login with a mobile number. ABDM sends an OTP to the mobile number. **Endpoint:** `POST /abha/api/v3/profile/login/request/otp` **Flow:** **Login - Mobile Number** - step 1 of 3 - Previous: none (first call of this flow) - Next: *Login via Mobile number - verify OTP* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"mobile"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"ABDM"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "mobile-verify" ], "loginHint": "mobile", "loginId": "{{encrypted mobile number}}", "otpSystem": "abdm" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: mobile. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: abdm. ## Responses - `200`: Success: Login Via Mobile Number - Using Mobile OTP - Send OTP - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): Login Via Mobile Number - Invalid LoginHint See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `txnId` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Login Via Mobile Number - Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `404`: Not Found: Login ABHA API's See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `timestamp` (string) - `path` (string) - `description` (string) - `error` (string) - `requestId` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "d4196ae3-f302-45bc-9460-a798a17b4c3a", "message": "OTP sent to Aadhaar registered mobile number ending with ******0903" } ``` --- # Login via Mobile number - verify OTP `POST /abha/api/v3/profile/login/verify` Verifies the mobile OTP. Returns a short-lived token (`token`, used as the `T-token` header) and the list of ABHA accounts linked to the mobile. Then call *Login via Mobile number - verify user (select ABHA)* with the chosen ABHA number to get the user X-token. **Endpoint:** `POST /abha/api/v3/profile/login/verify` **Flow:** **Login - Mobile Number** - step 2 of 3 - Previous: *Login via Mobile number - send OTP* - Next: *Login via Mobile number - verify user (select ABHA)* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-login", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-login", "mobile-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted OTP}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Verify Login Via Mobile Number - `authResult` (string) - `message` (string) - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `accounts.preferredAbhaAddress` (string) - `accounts.name` (string) - `accounts.status` (string) - `accounts.profilePhoto` (string) - `400`: Bad Request (request validation failed): Invalid OTP Value; Invalid Transaction Id See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid Credentials (generic) See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `description` (string) - `message` (string) - `404`: Not Found: User Not Found; Resource Not Found See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "588453aa-4bb0-44c0-bbdd-62ebd53c37c6", "authResult": "success", "message": "OTP verified successfully", "token": "", "expiresIn": 300, "accounts": [ { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "gender": "M", "dob": "", "verifiedStatus": "VERIFIED", "verificationType": "AADHAAR", "status": "ACTIVE", "profilePhoto": "", "kycVerified": true }, { "ABHANumber": "", "preferredAbhaAddress": "", "name": "", "gender": "M", "dob": "", "verifiedStatus": "VERIFIED", "verificationType": "CHILD_ABHA", "status": "ACTIVE", "profilePhoto": "" } ] } ``` --- # Login via Mobile number - verify user (select ABHA) `POST /abha/api/v3/profile/login/verify/user` **Endpoint:** `POST /abha/api/v3/profile/login/verify/user` **Flow:** **Login - Mobile Number** - step 3 of 3 - Previous: *Login via Mobile number - verify OTP* - Next: none (last call of this flow) --- This API is used to verify the selected ABHA user during the login journey after the user has searched or identified available ABHA accounts. It confirms that the user is proceeding with the correct ABHA number and validates the requested authentication flow. This step helps securely continue login for the chosen account and prevents access to the wrong profile. It is typically used when multiple ABHA accounts are available against the same mobile number or identifier. After successful verification, the user can proceed with the remaining authentication steps. ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify/user \ --header 'Authorization: Bearer ' \ --header 'T-token: Bearer {{jwtToken}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "ABHANumber": "{{abha-number}}", "txnId": "{{txnId}}" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `T-token` (string, required): Short-lived token (`Bearer `) returned by *Login via Mobile number - verify OTP*. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `ABHANumber` (string, required): The 14 digit ABHA number to sign in to, chosen from the accounts the previous call listed. - `txnId` (string, required): The transaction ID returned by the previous call in this flow. ## Responses - `200`: The 200 response code indicates a successful request. ** - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `400`: The 400 response code indicates a bad request. In this context, it refers to various errors encountered during the OTP (One-Time Password) verification process due to invalid inputs or parameters. **Types of OTP Verification Errors:** **Invakid T-Token:** This error occurs when the T -token. **Verify OTP - Invalid Abha Number:** This error occurs when the authentication methods provided for invalid abha number are invalid. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `message` (string) - `timestamp` (string) - `401`: **Unauthorized:** Indicates that the request requires user authentication. The server returns a 401 status code when the client has not provided valid authentication credentials. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: **Internal Server Error** An Internal Server Error (500) indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "token": "", "expiresIn": 1800, "refreshToken": "", "refreshExpiresIn": 1296000 } ``` --- # Re-KYC - send Aadhaar OTP `POST /abha/api/v3/profile/account/request/otp` Starts Re-KYC of a logged-in ABHA (`X-token`). UIDAI sends an OTP to the Aadhaar-linked mobile. **Endpoint:** `POST /abha/api/v3/profile/account/request/otp` **Flow:** **Profile - Re-KYC** - step 1 of 2 - Previous: none (first call of this flow) - Next: *Re-KYC - verify Aadhaar OTP* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | X-token | yes | User token (`Bearer `) received after ABHA creation / login. | | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-profile", "re-KYC"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"ABHA-number"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"Aadhaar"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/request/otp \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{X-token}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-profile", "re-kyc" ], "loginHint": "abha-number", "loginId": "{{encrypted abha-number}}", "otpSystem": "aadhaar" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: abha-number. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: aadhaar. ## Responses - `200`: Success: ReKYC-Send OTP - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): Re-KYC- Invalid Scope; Re-KYC- Invalid X-token; Re-KYC- Invalid LoginId; Re-KYC- Invalid Login Hint See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `Invalid Scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "c2095ea0-52ed-44ee-b8fc-02375b874e7a", "message": "OTP is sent to Aadhaar registered mobile number ending with *******0903" } ``` --- # Re-KYC - verify Aadhaar OTP `POST /abha/api/v3/profile/account/verify` Verifies the Aadhaar OTP sent by *Re-KYC - send Aadhaar OTP* and refreshes the ABHA's KYC details from Aadhaar. **Endpoint:** `POST /abha/api/v3/profile/account/verify` **Flow:** **Profile - Re-KYC** - step 2 of 2 - Previous: *Re-KYC - send Aadhaar OTP* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | X-token | yes | User token (`Bearer `) received after ABHA creation / login. | | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-profile", "re-KYC"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/verify \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{X-token}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-profile", "re-kyc" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted otp}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Re-KYC- Positive Flow - `txnId` (string) - `authResult` (string) - `message` (string) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `400`: Bad Request (request validation failed): Re-KYC- Invalid Transaction Id; Re-KYC- Invalid Scope; ReKyc- Invalid Auth Method; Re-KYC- Invalid X-token; Re-Kyc- Invalid OTP Value See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `Invalid Scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): ReKyc- Invalid access token; ReKYC- X-token expired See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure): Re-KYC-INVALID OTP See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `message` (string) - `timestamp` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "bb548986-e96d-4b48-be1b-1e36741e867d", "authResult": "success", "message": "Re-kyc done successfully", "accounts": [ { "ABHANumber": "" } ] } ``` --- # Update mobile - send OTP `POST /abha/api/v3/profile/account/request/otp` Starts a mobile number change for a logged-in ABHA user (`X-token`). ABDM sends an OTP to the **new** mobile number. **Endpoint:** `POST /abha/api/v3/profile/account/request/otp` **Flow:** **Profile - Update Mobile** - step 1 of 2 - Previous: none (first call of this flow) - Next: *Update mobile - verify OTP* **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | X-token | yes | User token (`Bearer `) received after ABHA creation / login. | | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-profile", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `loginHint` | `"mobile"` | yes | Type of identifier sent in `loginId`. | | `loginId` | string | yes | Identifier value, RSA-encrypted with the ABHA public certificate. | | `otpSystem` | `"ABDM"` | yes | System that generates and delivers the OTP (`Aadhaar` = UIDAI, `ABDM` = ABDM). | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/request/otp \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{X-token}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-profile", "mobile-verify" ], "loginHint": "mobile", "loginId": "{{encrypted mobile number}}", "otpSystem": "abdm" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `loginHint` (string, required): Type of identifier sent in `loginId`. One of: mobile. - `loginId` (string, required): Identifier value, RSA-encrypted with the ABHA public certificate. - `otpSystem` (string, required): System that generates and delivers the OTP (`aadhaar` = UIDAI, `abdm` = ABDM). One of: abdm. ## Responses - `200`: Success: Update Mobile-Positive flow - `txnId` (string) - `message` (string) - `400`: Bad Request (request validation failed): Update Mobile- Invalid Scope; Update Mobile- Invalid LoginId; Update Mobile- Invalid Login Hint; Update Mobile-Already verified mobile number See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `Invalid Scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Invalid access token See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "1c5fa806-67e1-4ad5-a848-0c4d805cd824", "message": "OTP sent to mobile number ending with ******0903" } ``` --- # Update mobile - verify OTP `POST /abha/api/v3/profile/account/verify` Verifies the OTP sent by *Update mobile - send OTP* and updates the mobile number on the ABHA profile. **Endpoint:** `POST /abha/api/v3/profile/account/verify` **Flow:** **Profile - Update Mobile** - step 2 of 2 - Previous: *Update mobile - send OTP* - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | X-token | yes | User token (`Bearer `) received after ABHA creation / login. | | REQUEST-ID | yes | Unique UUID for every request. | | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `scope` | `["ABHA-profile", "mobile-verify"]` | yes | Scope that selects this use case. Send exactly the values listed for this API. | | `authData` | object | yes | Authentication payload for this use case. | | `authData.authMethods` | `["OTP"]` | yes | Authentication method used in this step. | | `authData.otp` | object | yes | OTP authentication block. | | `authData.otp.txnId` | string | yes | Transaction ID returned by the previous step of this flow. | | `authData.otp.otpValue` | string | yes | OTP received by the user, RSA-encrypted. | ```bash curl --request POST \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/verify \ --header 'Authorization: Bearer ' \ --header 'X-token: Bearer {{X-token}}' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'Content-Type: application/json' \ --data '{ "scope": [ "abha-profile", "mobile-verify" ], "authData": { "authMethods": [ "otp" ], "otp": { "txnId": "{{txnId}}", "otpValue": "{{encrypted otp}}" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `X-token` (string, required): User token (`Bearer `) received after ABHA creation / login. - `REQUEST-ID` (string, required): Unique UUID for every request. - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. ## Body - `scope` (string[], required): Scope that selects this use case. Send exactly the values listed for this API. - `authData` (object, required): Authentication payload for this use case. - `authData.authMethods` (string[], required): Authentication method used in this step. - `authData.otp` (object, required): OTP authentication block. - `authData.otp.txnId` (string, required): Transaction ID returned by the previous step of this flow. - `authData.otp.otpValue` (string, required): OTP received by the user, RSA-encrypted. ## Responses - `200`: Success: Update Mobile- Positive Flow - `txnId` (string) - `authResult` (string) - `message` (string) - `accounts` (object[]) - `accounts.ABHANumber` (string) - `400`: Bad Request (request validation failed): Update Mobile- Invalid Transaction Id; Update Mobile- Invalid Scope; Update Mobile- Invalid Auth Methods; Update Mobile- Invalid X-token; Update Mobile- Invalid OTP Value See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `Invalid Scope` (string) - `timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access): Update Mobile- Invalid access token; Update Mobile- X-token expired See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string) - `message` (string) - `description` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `message` (string) - `timestamp` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Example 200 response. The values are placeholders: ```json { "txnId": "01bb3a4c-4588-4734-aff4-23d3978e50be", "authResult": "success", "message": "Mobile Number linked successfully", "accounts": [ { "ABHANumber": "" } ] } ``` --- # Update profile photo `PATCH /abha/api/v3/profile/account` Updates the profile photo of the logged-in ABHA user (`X-token`). Send the photo as a Base64 string. **Endpoint:** `PATCH /abha/api/v3/profile/account` **Flow:** **Profile - Update Photo** - step 1 of 1 - Previous: none (first call of this flow) - Next: none (last call of this flow) **Headers** (plus `Authorization: Bearer `): | Header | Required | Description | |---|---|---| | TIMESTAMP | yes | Current UTC timestamp in ISO-8601 format. | | REQUEST-ID | yes | Unique UUID for every request. | | X-token | yes | User token (`Bearer `) received after verification / login. | **Request body for this use case:** | Field | Value / Type | Required | Description | |---|---|---|---| | `profilePhoto` | string | no | Base64 encoded profile photo. | > **Note:** The source spec has no response example for this use case. Its only examples are for Child ABHA. ```bash curl --request PATCH \ --url https://abhasbx.abdm.gov.in/abha/api/v3/profile/account \ --header 'Authorization: Bearer ' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'X-token: Bearer {{X-token}}' \ --header 'Content-Type: application/json' \ --data '{ "profilePhoto": "{{profile photo string}}" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `TIMESTAMP` (string, required): Current UTC timestamp in ISO-8601 format. - `REQUEST-ID` (string, required): Unique UUID for every request. - `X-token` (string, required): User token (`Bearer `) received after verification / login. ## Body - `profilePhoto` (string): Base64 encoded profile photo. ## Responses - `200`: Success. - `ABHANumber` (string) - `preferredAbhaAddress` (string) - `mobile` (string) - `firstName` (string) - `middleName` (string) - `lastName` (string) - `yearOfBirth` (integer) - `monthOfBirth` (integer) - `dayOfBirth` (integer) - `gender` (string) - `status` (string) - `stateCode` (integer) - `districtCode` (integer) - `stateName` (string) - `districtName` (string) - `subdistrictName` (string) - `authMethods` (string[]) - `tags` (object) - `kycVerified` (boolean) - `verificationStatus` (string) - `verificationType` (string) - `createdDate` (string) - `400`: Bad Request (request validation failed). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.message` (string) - `error.timestamp` (string) - `401`: Unauthorized (invalid / expired gateway token, X-token or benefit access). See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `error` (object) - `error.code` (string) - `error.message` (string) - `404`: Not Found. See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `422`: Unprocessable Entity (business rule or UIDAI failure). See Error codes for this module: /docs/hiecm/v3/api/m1/errors - `error` (object) - `error.code` (string) - `error.message` (string) - `500`: Internal Server Error. See Error codes for this module: /docs/hiecm/v3/api/m1/errors Shape of the 200 response, generated from the schema. The values are placeholders, not a captured response: ```json { "ABHANumber": "", "preferredAbhaAddress": "", "mobile": "******0903", "firstName": "", "middleName": "", "lastName": "", "yearOfBirth": "", "monthOfBirth": "", "dayOfBirth": "", "gender": "F", "status": "ACTIVE", "stateCode": 27, "districtCode": 290, "stateName": "Maharashtra", "districtName": "
", "subdistrictName": "
", "authMethods": [ "MOBILE_OTP" ], "kycVerified": false, "verificationStatus": "VERIFIED", "verificationType": "CHILD_ABHA", "createdDate": "10-05-2024" } ``` --- # M1 Identity errors Seeing a symptom rather than a code? Start at [Troubleshooting](/docs/hiecm/v3/troubleshooting/). ## Codes | Code | HTTP | Message | Returned by | | ----------- | ---- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | | `404` | 404 | Runtime Error | `m1_post_v3_profile_login_verify_find_abha_face` | | `900900` | 500 | Unclassified Authentication Failure | `m1_post_v3_enrollment_auth_byabdm_mobile_verify_create_ab_091285` | | `900901` | 401 | Invalid Credentials | `m1_post_v3_enrollment_request_otp_aadhaar_otp` | | `900902` | 401 | Missing Credentials | `m1_post_v3_profile_benefit_search_xmluid` | | `ABDM-1017` | 401 | Invalid Transaction Id | `m1_get_v3_enrollment_enrol_suggestion_create_abha_aadhaar_otp` | | `ABDM-1021` | 401 | Lack of required priviledges | `m1_post_v3_enrollment_enrol_byaadhaar_child_child_abha` | | `ABDM-1094` | 401 | X-token expired | `m1_post_v3_enrollment_enrol_byaadhaar_child_child_abha` | | `ABDM-1114` | 404 | User not found | `m1_patch_v3_profile_account_child_child_abha` | | `ABDM-1124` | 422 | The mobile number provided by you is already linked to 6 ABHA Numbers. Please provide a different Mobile Number. | `m1_post_v3_enrollment_enrol_byaadhaar_demo_auth_create_ab_81107d` | | `ABDM-1138` | 400 | The benefit record has already been de-linked | `m1_post_v3_profile_benefit_linkanddelink_x_token` | | `ABDM-1140` | 400 | The benefit record has already been linked | `m1_post_v3_profile_benefit_linkanddelink_x_token` | | `ABDM-1157` | 422 | Child ABHA’s account limit has been exceeded for the requested Abha ID number ‘\ | `m1_post_v3_enrollment_enrol_byaadhaar_child_child_abha` | | `ABDM-1160` | 422 | Non KYC CHILD ABHA is allowed to update their profile only once | `m1_patch_v3_profile_account_child_child_abha` | | `ABDM-1204` | 422 | UIDAI Error code : 400 : Invalid Aadhaar OTP value. | `m1_post_v3_enrollment_enrol_byaadhaar_otp` | | `ABDM-1207` | 422 | The information you provided does not match the details on record with Aadhaar. Please verify and provide accurate information. | `m1_post_v3_enrollment_enrol_byaadhaar_demo_auth_create_ab_81107d` | | `ABDM-1211` | 400 | User not found. | `m1_post_v3_phr_web_login_abha_search_abha_address_login_m_27a20f` | | `ABDM-1224` | 401 | Login via Biometric is not allowed. | `m1_post_v3_profile_login_request_otp_find_abha_face` | Every code above is recorded in the specification that owns it. The aggregated list across modules is at [error codes](/docs/hiecm/v3/reference/error-codes). [Next Still stuck? Ask for help Where to file what you hit, so the answer lands back in these pages.](/docs/support) --- # M1 Identity: Create and verify ABHA Create an ABHA, authenticate a holder, and read or update the profile, QR code and linked mobile number. ## Base URLs | Environment | Base URL | | ----------- | ------------------------------------------ | | Sandbox | `https://abhasbx.abdm.gov.in/abha/api/v3/` | Login by fingerprint or iris uses the same base URL, through `profile/login/verify` with a `bio` or `iris` block. [See the user journeyWhat the person experiences, screen by screen, before you write any code.](/docs/hiecm/v3/milestones/m1)[When it goes wrongThe recorded error shapes and codes, and what to do about each.](/docs/hiecm/v3/api/m1/errors) New to this? Start with [M1 Identity](/docs/hiecm/v3/milestones/m1). --- # Perform HIP initiated linking `POST /api/hiecm/hip/v3/link/carecontext` **Note:** While generating the link-token the user/patient is providing both ABHA_number and ABHA_address, then at the time of linking both must be mandatory. If not one should be mandatory either 'ABHA_number' or 'ABHA_address'. This API endpoint is used by the Ayushman Bharat Digital Mission (ABDM) system to store care context or health record references. Upon successful validation of the ABHA (Ayushman Bharat Health Account) address and the associated link token, the system securely records the relevant care context information. This process ensures that health records are accurately linked and accessible, facilitating efficient and seamless health information exchange across the network. The API plays a critical role in maintaining the integrity and continuity of patient health records, thereby supporting comprehensive and coordinated care. ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/hip/v3/link/carecontext \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'X-HIP-ID: IN2810014366' \ --header 'X-LINK-TOKEN: ' \ --header 'Content-Type: application/json' \ --data '{ "abhaNumber": 12345678901234, "abhaAddress": "", "patient": [ { "referenceNumber": "TMH-PUID-001", "display": "String", "careContexts": [ { "referenceNumber": "TMH-PUID-001", "display": "display 1" } ], "hiTypes": "DiagnosticReport", "count": 1 } ] }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended - `X-HIP-ID` (string, required): Identifier of the health information provider to which the request was intended - `X-LINK-TOKEN` (string, required): JWT Authentication token which was issued by ABDM after successful validation of username and password ## Body - `abhaNumber` (number): The abha number of the patient. Should be only 14 digit and it allows numeric character like ^\\d{14}$ - `abhaAddress` (string, required): The abha address of the patient. Should start with Alphanumeric . and _ in the middle and must be ending with @abdm or @sbx also allows alpha numeric character and special characters like ^[a-zA-Z0-9][a-zA-Z0-9_.]+[a-zA-Z0-9]@(abdm|sbx)$ - `patient` (object[], required) - `patient.referenceNumber` (string, required): Patient identifier with which patient is registered in the facility/hospital or patient can also pass his abha_address in the reference number. Allows alpha numeric character and special characters like ^[a-zA-Z0-9_\-@,. "':|()/]{0,255}$ - `patient.display` (string, required): The display text for patient reference(regex:^[a-zA-Z0-9_\-@,. "':|()/]{0,255}$) - `patient.careContexts` (object[], required): List of care contexts linked at the HIP end for the identified patient. - `patient.careContexts.referenceNumber` (string, required): 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) and it should be unique for each care-context.Allows alpha numeric character and special characters like ^[a-zA-Z0-9_\-@,. ()/:\\]{0,255}$ - `patient.careContexts.display` (string, required): The display text for care context reference(regex:^[a-zA-Z0-9_\-@,. "':|()/]{0,255}$) - `patient.hiTypes` (string, required): Types of health information document. One of: DiagnosticReport, DischargeSummary, HealthDocumentRecord, ImmunizationRecord, OPConsultation, Prescription, WellnessRecord, Invoice. - `patient.count` (number, required): The count should match with the number of care contexts ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900902 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `404`: server cannot find the requested resource See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string): 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. - `message` (string) --- # Notify a change to a linked care context `POST /api/hiecm/hip/v3/link/context/notify` Notify the Consent Management (CM) system about any updates HiTypes of the already linked care context for a patient. By invoking this API, Health Information Providers (HIPs) can inform the CM system of changes or updates to the patient’s care context, ensuring that the most current and accurate health information is maintained. This process is crucial for the integrity and synchronization of patient health records across the network, supporting seamless and efficient health information exchange. ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/hip/v3/link/context/notify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'X-HIP-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "notification": { "patient": { "id": "" }, "careContext": { "patientReference": "", "careContextReference": "b009a970-8b04-4779-abd1-b50f113245bf" }, "hiTypes": [ "DiagnosticReport" ], "date": "2024-05-09T10:34:00.387Z", "hip": { "id": "ABDM_HIP" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended - `X-HIP-ID` (string, required): Identifier of the health information provider to which the request was intended ## Body - `notification` (object, required) - `notification.patient` (object, required) - `notification.patient.id` (string, required): The abha address of the patient - `notification.careContext` (object, required): A care context - one episode or record grouping at the HIP. - `notification.careContext.patientReference` (string, required): "A patient identifier with which patient is registered in the facility/hospital" - `notification.careContext.careContextReference` (string, required): 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) - `notification.hiTypes` (string[], required): Type of health data that created in the care context - `notification.date` (string, required): This should be a UTC Date & Time in ISO format - `notification.hip` (object, required): The HIP that linked the care context. Only id is required. - `notification.hip.id` (string, required): The service ID of the health information provider ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900902 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `404`: server cannot find the requested resource See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string): 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. - `message` (string) --- # Send SMS notification to patient that a care context is linked `POST /api/hiecm/hip/v3/link/patient/links/sms/notify2` Send SMS notifications to patients, informing them that a care context has been successfully linked to their ABHA (Ayushman Bharat Health Account) address. By invoking this API, HIPs can ensure that patients are promptly notified about the linkage of their health records, enhancing transparency and patient engagement. This notification process is essential for keeping patients informed and involved in the management of their health information, thereby supporting a more connected and responsive healthcare system. ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/hip/v3/link/patient/links/sms/notify2 \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'Content-Type: application/json' \ --data '{ "notification": { "phoneNo": "986543***", "hip": { "id": "ABDM_HIP", "name": "ABC Hospital" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended ## Body - `notification` (object, required) - `notification.phoneNo` (string, required): The mobile number to send SMS - `notification.hip` (object, required): Identifier and name of the health information provider. - `notification.hip.id` (string, required): The service ID of the health information provider - `notification.hip.name` (string, required): The name of the health information provider ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900902 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `404`: server cannot find the requested resource See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string): 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. - `message` (string) --- # Generate link token to link the health records `POST /api/hiecm/v3/token/generate-token` Generate a link token which will be valid for 6 months.. 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] ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/v3/token/generate-token \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'X-HIP-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "abhaNumber": 12345678901234, "abhaAddress": "", "name": "first_name + middle_name + last_name", "gender": "M", "yearOfBirth": 9999 }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended - `X-HIP-ID` (string, required): Identifier of the health information provider to which the request was intended ## Body - `abhaNumber` (number): it can be null if abhaNumber is not linked with abhaAddress. Allows numeric character like ^\d{14}$ - `abhaAddress` (string, required): 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)$ - `name` (string, required): Only alphabets and special characters like ',.- are allowed like ^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$ - `gender` (string, required): Allows M, F, O, D, T, U as a input - `yearOfBirth` (number, required): Year of birth must be 4 digit, ranging between 1900 and 2200 ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900902 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `404`: server cannot find the requested resource See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string): 900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `503`: Service Unavailable See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string, required): 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. - `message` (string, required) --- # Answer the care context discovery `POST /api/hiecm/user-initiated-linking/v3/patient/care-context/on-discover` Is invoked by the Hospital Management Information System (HMIS) or Laboratory Information Management System (LIMS) or HIP application to share the response of the /api/hiecm/user-initiated-linking/v3/patient/care-context/on-discover API. It facilitates the communication of discovered health records back to the patient or user. By using this API, the HMIS/LIMS application ensures that the patient’s health information is accurately and promptly shared, supporting efficient and transparent health information exchange. This process is crucial for maintaining the integrity and continuity of patient care, enabling patients to have comprehensive access to their health records. ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/user-initiated-linking/v3/patient/care-context/on-discover \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'X-HIU-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "transactionId": "f901b782-bfdf-4224-9f8d-da2cadc20c0d", "patient": [ { "referenceNumber": "", "display": "12345", "careContexts": [ { "referenceNumber": "abc123", "display": "12345" } ], "hiType": "Prescription", "count": 1 } ], "matchedBy": [ "MR" ], "response": { "requestId": "f29f0e59-8388-4698-9fe6-05db67aeac46" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended - `X-HIU-ID` (string, required): Identifier of the health information user to which the request was intended ## Body - `transactionId` (string, required): UUID from discover request callback to track the entire user link flow - `patient` (object[], required) - `patient.referenceNumber` (string, required): A patient identifier with which patient is registered in the facility/hospital.Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. ()/:\\\\]{0,255}$" - `patient.display` (string, required): Display text for patient reference. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \"':|()/]{0,255}$" - `patient.careContexts` (object[], required): List of care contexts linked at the HIP end for the identified patient. - `patient.careContexts.referenceNumber` (string, required): 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).Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. ()/:\\\\]{0,255}$" - `patient.careContexts.display` (string, required): Display text for care context reference. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \"':|()/]{0,255}$" - `patient.hiType` (string, required): The health information type One of: DiagnosticReport, DischargeSummary, HealthDocumentRecord, ImmunizationRecord, OPConsultation, Prescription, WellnessRecord, Invoice. - `patient.count` (integer, required): The count should match the number of care contexts in the payload - `matchedBy` (string[], required) - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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. - `error.message` (string, required): The appropriate error message. Allows alpha numeric character and special characters like ^[a-zA-Z0-9_\-@,. ":]{0,255}$ - `response` (object, required): The request id is from the /discover callback. Allows alpha numeric characters 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}" - `response.requestId` (string, required): The request id that was passed ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): ABDM-1106 - Duplicate On discovery request. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `error.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `timestamp` (number, required) - `path` (string, required) - `status` (integer, required) - `error` (string, required): The error code and message, if any occurred. - `requestId` (string, required): The request id from discover call back .Allows alpha numeric characters 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}" --- # Link care context on init `POST /api/hiecm/user-initiated-linking/v3/link/care-context/on-init` Share the response of the /api/hiecm/user-initiated-linking/v3/link/care-context/on-init API. By using this API, the HIP communicates the outcome of the care context linking process, ensuring that the system accurately reflects the status of the operation. This process is essential for maintaining the integrity and synchronization of patient health records, supporting seamless and efficient health information exchange within the healthcare ecosystem. ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/user-initiated-linking/v3/link/care-context/on-init \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'Content-Type: application/json' \ --data '{ "transactionId": "f901b782-bfdf-4224-9f8d-da2cadc20c0d", "link": { "referenceNumber": "d353b782-bfdf-4224-9f8d-da2cadc20c0d", "authenticationType": "DIRECT", "meta": { "communicationMedium": "MOBILE", "communicationHint": "OTP", "communicationExpiry": "2024-05-01T05:22:34.123Z" } }, "response": { "requestId": "f29f0e59-8388-4698-9fe6-05db67aeac46" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended ## Body - `transactionId` (string, required): UUID from discover request callback to track the entire user link flow. - `link` (object, required) - `link.referenceNumber` (string, required): The link reference number. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. ()/:\\\\]{0,255}$" - `link.authenticationType` (string, required): The type of authentication.Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \"':|()/]{0,255}$" One of: DIRECT, MEDIATED. - `link.meta` (object, required) - `link.meta.communicationMedium` (string, required): The communication medium. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \"':|()/]{0,255}$" One of: MOBILE, EMAIL. - `link.meta.communicationHint` (string, required): The communication hint. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \"':|()/]{0,255}$" - `link.meta.communicationExpiry` (string, required): The communication expiry date. Should be UTC date in ISO format. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \"':|()/]{0,255}$" - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): The appropriate error message. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \"':|()/]{0,255}$" - `response` (object, required): The request id is from the link/init callback. Allows alpha numeric characters 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}" - `response.requestId` (string, required): The request id that was passed ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): ABDM-1107 - Duplicate On init request. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `error.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `timestamp` (number, required) - `path` (string, required) - `status` (integer, required) - `error` (string, required): The error code and message, if any occurred. - `requestId` (string, required): The request id from discover call back .Allows alpha numeric characters 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}" --- # Link care context on confirm `POST /api/hiecm/user-initiated-linking/v3/link/care-context/on-confirm` Share the response of the /api/hiecm/user-initiated-linking/v3/link/care-context/on-confirm API. By using this API, the HIP communicates the outcome of the care context confirmation process, ensuring that the system accurately reflects the status of the operation. This process is essential for maintaining the integrity and synchronization of patient health records, supporting seamless and efficient health information exchange within the healthcare ecosystem. In case of success scenario, patient object is mandatory and error object is optional In case of error scenario, error object is mandatory and patient object is optional Response is mandatory in both scenarios ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/user-initiated-linking/v3/link/care-context/on-confirm \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'Content-Type: application/json' \ --data '{ "patient": [ { "referenceNumber": "", "display": "12345", "careContexts": [ { "referenceNumber": "abc123", "display": "12345" } ], "hiType": "Prescription", "count": 1 } ], "response": { "requestId": "f29f0e59-8388-4698-9fe6-05db67aeac46" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended ## Body - `patient` (object[], required) - `patient.referenceNumber` (string, required): A patient identifier with which patient is registered in the facility/hospital.Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. ()/:\\\\]{0,255}$" - `patient.display` (string, required): Display text for patient reference. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \"':|()/]{0,255}$" - `patient.careContexts` (object[], required): List of care contexts linked at the HIP end for the identified patient. - `patient.careContexts.referenceNumber` (string, required): 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).Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. ()/:\\\\]{0,255}$" - `patient.careContexts.display` (string, required): Display text for care context reference. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \"':|()/]{0,255}$" - `patient.hiType` (string, required): The health information type One of: DiagnosticReport, DischargeSummary, HealthDocumentRecord, ImmunizationRecord, OPConsultation, Prescription, WellnessRecord, Invoice. - `patient.count` (integer, required): The count should match the number of care contexts in the payload - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): The appropriate error message - `response` (object, required): The request id is from the link/confirm callback. Allows alpha numeric characters 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}" - `response.requestId` (string, required): The request id that was passed ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): ABDM-1108 - Notification DB service unavailable. May be returned either bare (`ABDM-1108`) or with a trailing ": " separator (`ABDM-1108: `); match on the code itself and tolerate the separator. - `error.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `timestamp` (number, required) - `path` (string, required) - `status` (integer, required) - `error` (string, required): The error code and message, if any occurred. - `requestId` (string, required) --- # Receive the HIP token on generate token `POST /api/v3/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. "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." ```bash curl --request POST \ --url {bridgeUrl}/api/v3/hip/token/on-generate-token \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-HIP-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "abhaAddress": "", "linkToken": "", "response": { "requestId": "6f0b4665-a915-4c92-aa36-65afb4a2cd71" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Identifier of the health information provider to which the request was intended ## Body - `abhaAddress` (string, required) - `linkToken` (string) - `response` (object, required) - `response.requestId` (string, required): 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. See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): 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. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900902 - Missing Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string): Short description of the failure. - `description` (string): Detailed description of the failure. - `403`: Forbidden. The caller is authenticated but is not permitted to perform this operation on this resource. See Error codes for this module: /docs/hiecm/v3/api/m2/errors --- # Link on carecontext `POST /api/v3/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. 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 ```bash curl --request POST \ --url {bridgeUrl}/api/v3/link/on_carecontext \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-HIP-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "abhaAddress": "", "status": "Successfully Linked care context", "response": { "requestId": "6f0b4665-a915-4c92-aa36-65afb4a2cd71" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Identifier of the health information provider to which the request was intended ## Body - `abhaAddress` (string, required) - `status` (string, required) One of: Successfully Linked care context, Failed to link care context, invalid [invalid request]. - `response` (object, required) - `response.requestId` (string, required): The requestId that was passed ## Responses - `200`: OK - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900902 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `404`: server cannot find the requested resource See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string): 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. - `message` (string) --- # Receive the links context on notify `POST /api/v3/links/context/on-notify` **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. This API endpoint is a call back API for /api/hiecm/hip/v3/link/context/notify If the notification to CM is successful, pass the successful message If the notification to CMis unsuccessful, pass the error message with the error code and message ```bash curl --request POST \ --url {bridgeUrl}/api/v3/links/context/on-notify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-HIP-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "acknowledgement": { "status": "SUCCESS" }, "error": { "code": "ABDM-1006", "message": "No links found for the patient in the given HIP" }, "response": { "requestId": "6f0b4665-a915-4c92-aa36-65afb4a2cd71" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Identifier of the health information provider to which the request was intended ## Body - `acknowledgement` (object, required) - `acknowledgement.status` (string, required) One of: SUCCESS, ERRORED. - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `response` (object, required) - `response.requestId` (string, required): The requestId that was passed ## Responses - `200`: OK - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900902 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `404`: server cannot find the requested resource See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string): 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. - `message` (string) --- # Receive the patients SMS on notify `POST /api/v3/patients/sms/on-notify` **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. This API endpoint is a call back API for /api/hiecm/hip/v3/link/patient/links/sms/notify2 If the SMS trigger is successful, pass the successful message If the SMS trigger is unsuccessful, pass the error message with the error code and message ```bash curl --request POST \ --url {bridgeUrl}/api/v3/patients/sms/on-notify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-HIP-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "acknowledgement": { "status": "SUCCESS" }, "error": { "code": "ABDM-1024", "message": "Dependent service unavailable" }, "response": { "requestId": "6f0b4665-a915-4c92-aa36-65afb4a2cd71" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Identifier of the health information provider to which the request was intended ## Body - `acknowledgement` (object, required) - `acknowledgement.status` (string, required) One of: SUCCESS, ERRORED. - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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. - `error.message` (string, required) - `response` (object, required) - `response.requestId` (string, required): The requestId that was passed ## Responses - `200`: OK - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900902 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `404`: server cannot find the requested resource See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string): 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. - `message` (string) --- # Discover care contexts associated with a patient `POST /api/v3/hip/patient/care-context/discover` **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. The discover API endpoint facilitates the discovery of care contexts linked to a specific patient. When a request is made to this endpoint, it returns detailed information about the patient, including verified and unverified identifiers, ensuring accurate patient identification and continuity of care. ```bash curl --request POST \ --url {bridgeUrl}/api/v3/hip/patient/care-context/discover \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-HIP-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "transactionId": "f901b782-bfdf-4224-9f8d-da2cadc20c0d", "patient": { "id": "", "verifiedIdentifiers": [ { "type": "MR", "value": "+919876543210" } ], "unverifiedIdentifiers": [ { "type": "MOBILE", "value": "+9198765*****" } ], "name": "", "gender": "M", "yearOfBirth": 9999 } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Identifier of the health information provider to which the request was intended ## Body - `transactionId` (string, required): UUID - `patient` (object, required) - `patient.id` (string, required): A patient identifier with which patient is registered in the facility/hospital - `patient.verifiedIdentifiers` (object[], required) - `patient.verifiedIdentifiers.type` (string, required) One of: MR, MOBILE, ABHA_NUMBER, ABHA_ADDRESS, EMAIL. - `patient.verifiedIdentifiers.value` (string, required): Allows alphanumeric characters and special characters like "^(\\+)?[a-zA-Z0-9_\\-@,. ]{0,255}$". - `patient.unverifiedIdentifiers` (object[]): Identifiers with which the HIP will search for the patient in its own records. - `patient.unverifiedIdentifiers.type` (string, required) One of: MR, MOBILE, ABHA_NUMBER, ABHA_ADDRESS, EMAIL. - `patient.unverifiedIdentifiers.value` (string, required): Allows alphanumeric characters and special characters like "^(\\+)?[a-zA-Z0-9_\\-@,. ]{0,255}$". - `patient.name` (string, required) - `patient.gender` (string, required) One of: M, F, O, D, T, U. - `patient.yearOfBirth` (number, required) ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): ABDM-1103 - Duplicate Discovery request. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `error.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `timestamp` (number, required) - `path` (string, required) - `status` (integer, required) - `error` (string, required): The error code and message, if any occurred. - `requestId` (string, required) --- # Initiate the linking of care contexts for a patient `POST /api/v3/hip/link/care-context/init` **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. The init API endpoint facilitates the initial linking of care contexts to a patient’s ABHA address. When a request is made to this endpoint, it returns a response containing the transaction ID, ABHA address, patient details, and any errors encountered. This ensures that patient care contexts are accurately linked and managed within the healthcare system. **Note:** Incase of success, HIP will get the patient details in the callback. In case of failure, HIP will get the error response in the callback. ```bash curl --request POST \ --url {bridgeUrl}/api/v3/hip/link/care-context/init \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-HIP-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "transactionId": "f901b782-bfdf-4224-9f8d-da2cadc20c0d", "abhaAddress": "", "patient": [ { "referenceNumber": "abc123", "display": "Test", "careContexts": [ { "referenceNumber": "abc123", "display": "Blood Test" } ], "hiType": "Prescription", "count": 1 } ], "error": { "code": "ABDM-1001", "message": "No data found" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Identifier of the health information provider to which the request was intended ## Body - `transactionId` (string, required) - `abhaAddress` (string, required): A patient identifier with which patient is registered in the facility/hospital.Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\-@,. ()/:\\]{0,255}$" - `patient` (object[], required) - `patient.referenceNumber` (string, required): A patient identifier with which patient is registered in the facility/hospital. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\-@,. ()/:\\]{0,255}$" - `patient.display` (string, required): The display text of patient.Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \"':|()/]{0,255}$" - `patient.careContexts` (object[], required): List of care contexts linked at the HIP end for the identified patient. - `patient.careContexts.referenceNumber` (string, required): 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).Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\-@,. ()/:\\]{0,255}$" - `patient.careContexts.display` (string, required): The display of care context.Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \"':|()/]{0,255}$" - `patient.hiType` (string, required): The health information type One of: DiagnosticReport, DischargeSummary, HealthDocumentRecord, ImmunizationRecord, OPConsultation, Prescription, WellnessRecord, Invoice. - `patient.count` (integer): The count should match the number of care contexts in the payload - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): The appropriate error message ## Responses - `200`: Ok - `transactionId` (string) - `abhaAddress` (string) - `patient` (object[]) - `patient.referenceNumber` (string): Reference number used while linking the health records of the patient. - `patient.careContexts` (object[]): List of care contexts linked at the HIP end for the identified patient. - `patient.careContexts.referenceNumber` (string): Reference number used while linking the health records of the patient. - `patient.hiType` (string) One of: DiagnosticReport, DischargeSummary, HealthDocumentRecord, ImmunizationRecord, OPConsultation, Prescription, WellnessRecord, Invoice. - `patient.count` (integer): Number of health records in the careContext object. - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): ABDM-1104 - Duplicate Init request. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `error.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `timestamp` (number, required) - `path` (string, required) - `status` (integer, required) - `error` (string, required): The error code and message, if any occurred. - `requestId` (string, required): The request id that was passed.Allows alpha numeric characters 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}" Example 200 response. The values are placeholders: ```json { "transactionId": "c1ce50dc-d1f7-4a31-987a-c6bf6d08ad5a", "abhaAddress": "", "patient": [ { "referenceNumber": "", "careContexts": [ { "referenceNumber": "New test 1" } ], "hiType": "OPConsultation", "count": 1 } ] } ``` --- # Confirm the linking of care contexts for a patient `POST /api/v3/hip/link/care-context/confirm` **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. The confirm API endpoint facilitates the confirmation of care context linking for a patient. When a request is made to this endpoint, it verifies the linking process using a provided token and reference number. This ensures that the care contexts are accurately linked to the patient’s ABHA (Ayushman Bharat Health Account) address. ```bash curl --request POST \ --url {bridgeUrl}/api/v3/hip/link/care-context/confirm \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-HIP-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "confirmation": { "token": 123456, "linkRefNumber": "d353b782-bfdf-4224-9f8d-da2cadc20c0d" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Identifier of the health information provider to which the request was intended ## Body - `confirmation` (object, required) - `confirmation.token` (integer, required): The token number. Must be 6 digit and contain only 0-9 - `confirmation.linkRefNumber` (string, required): The link reference number random uuid. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \"':|()/]{0,255}$" ## Responses - `200`: OK - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): ABDM-1105 - Duplicate Confirm request. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `error.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `timestamp` (number, required) - `path` (string, required) - `status` (integer, required) - `error` (string, required): The error code and message, if any occurred. - `requestId` (string, required): The request id that was passed.Allows alpha numeric characters 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}" --- # Receive the consent decision `POST /api/v3/consent/request/hip/notify` **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. Notification of consents to health information providers consent request granted, consent revoked, consent expired. Only the GRANTED, REVOKED and EXPIRED status notifications will be sent to HIP. If consent is granted, status=GRANTED, then consentDetail contains the consent artefact details and signature is available. If consent is revoked, then status=REVOKED, and consentId specifes which consent artefact is revoked. If the consent has expired, then status=EXPIRED, and consentId specifies which consent artefact has expired. Note, this is also responsibility of the HIP to keep track of consent expiry. Any data request on expired consent artefact must not be done. ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/v3/consent/request/hip/notify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-HIP-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "notification": { "status": "GRANTED", "consentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "consentDetail": { "schemaVersion": "v3", "consentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "createdAt": "2024-05-01T05:10:20.123Z", "patient": { "id": "" }, "careContexts": [ { "patientReference": "batman@tmh", "careContextReference": "Episode1" } ], "purpose": { "text": "Care Management", "code": "CAREMGT", "refUri": "www.abc.com" }, "hip": { "id": "cowin_hip_01", "name": "Cowin", "type": "HIP" }, "hiu": { "id": "cowin_hiu_01", "name": "Cowin", "type": "HIU" }, "consentManager": { "id": "abdm" }, "requester": { "name": "", "identifier": { "value": "REG1", "type": "MH1001", "system": "https://www.sample.com" } }, "hiTypes": [ "Prescription" ], "permission": { "accessMode": "VIEW", "dateRange": { "from": "2021-09-28T12:30:08.573Z", "to": "2021-09-28T12:30:08.573Z" }, "dataEraseAt": "2021-09-28T12:30:08.573Z", "frequency": { "unit": "HOUR", "value": 1, "repeats": 0 } } }, "signature": "e8nY601CYDsC0FKoDjSp+7GeQ2s2R8oZncLCz5ce+pEuDOr5bZV0aaHjwJg4b9S9V+twjt4hbojx3fl7egrt8+0c+lfPTi5/bBUAQXCABTfFmtFU7jn65HlTt8kgkiONx26ZBhJ0wX3xjYI72PPtzYIiT5Q08YtDoILA62KceioV7lwuKssw7wC4ECbBAvRuXT121TmtrPhf+0myJATSnaajS06S6OthrKfZLNTUFf3pFiJzqouSTrjNblOX6DT2+JuO3rom1Szz/03c0HQG+wWASv+PO3J6uRs0UI4JvKmM/4tP+Z+/HPKM15K5U5K+4pqf6czKrbIDpkT/kP8bGg==", "grantAcknowledgement": false } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Identifier of the health information provider to which the request was intended ## Body - `notification` (object, required) - `notification.status` (string, required) One of: GRANTED, EXPIRED, DENIED, REQUESTED, REVOKED. - `notification.consentId` (string, required): 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}$"; - `notification.consentDetail` (object, required) - `notification.consentDetail.schemaVersion` (string, required) - `notification.consentDetail.consentId` (string, required): 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}$"; - `notification.consentDetail.createdAt` (string, required): Allows alpha numeric character and special characters like "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$" - `notification.consentDetail.patient` (object, required) - `notification.consentDetail.patient.id` (string, required): The abha address of the patient. Allows alpha numeric character and special characters like ^[a-zA-Z0-9][a-zA-Z0-9_.]+[a-zA-Z0-9]@(abdm|sbx)$ - `notification.consentDetail.careContexts` (object[], required): List of care contexts linked at the HIP end for the identified patient. - `notification.consentDetail.careContexts.patientReference` (string, required): A patient identifier with which patient is registered in the facility/hospital. Allows alpha numeric and special characters like "^[a-zA-Z0-9_\\-@,().\"/: ]{0,255}$" - `notification.consentDetail.careContexts.careContextReference` (string, required): 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). Allows alpha numeric and special characters like "^[a-zA-Z0-9_\\-@,().\"/:| ]{0,255}$" - `notification.consentDetail.purpose` (object, required) - `notification.consentDetail.purpose.text` (string, required) One of: Care Management, Break the Glass, Public Health, Healthcare Payment, Disease Specific Healthcare Research, Self Requested. - `notification.consentDetail.purpose.code` (string, required) One of: CAREMGT, BTG, PUBHLTH, HPAYMT, DSRCH, PATRQT. - `notification.consentDetail.purpose.refUri` (string, required): The reference URL. Should be a valid URL. Allows alpha numeric character and special characters like ^[a-zA-Z0-9_\\-@,. \":/]{0,255}$ - `notification.consentDetail.hip` (object, required): Identifier and name of the health information provider. - `notification.consentDetail.hip.id` (string, required): 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]$ - `notification.consentDetail.hip.name` (string, required): The name of the health information provider. Allows alpha numeric and special characters like ^[a-zA-Z0-9_\\-@,. \":/]{0,255}$ - `notification.consentDetail.hip.type` (string): The type of the health information provider. Allows alpha numeric and special characters like ^[a-zA-Z0-9_\\-@,. \":/]{0,255}$ - `notification.consentDetail.hiu` (object, required) - `notification.consentDetail.hiu.id` (string, required): 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]$ - `notification.consentDetail.hiu.name` (string, required): The name of the health information user. Allows alpha numeric and special characters like ^[a-zA-Z]+[A-Za-z0-9_\\-@,().\\s\\xa0:/]+ - `notification.consentDetail.hiu.type` (string): The type of the health information user. Allows alpha numeric and special characters like ^[a-zA-Z0-9_\\-@,. \":/]{0,255}$ - `notification.consentDetail.consentManager` (object, required) - `notification.consentDetail.consentManager.id` (string, required) - `notification.consentDetail.requester` (object, required) - `notification.consentDetail.requester.name` (string, required): The name of the requester - `notification.consentDetail.requester.identifier` (object, required) - `notification.consentDetail.hiTypes` (string[], required): Types of health information document. - `notification.consentDetail.permission` (object, required) - `notification.consentDetail.permission.accessMode` (string, required) One of: VIEW, STORE, STREAM, QUERY. - `notification.consentDetail.permission.dateRange` (object, required) - `notification.consentDetail.permission.dataEraseAt` (string, required): The date at which the consent expire. Should be UTC date time in ISO format.Allows alpha numeric character and special characters like "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$" - `notification.consentDetail.permission.frequency` (object, required) - `notification.signature` (string, required) - `notification.grantAcknowledgement` (boolean, required) ## 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. See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): Short description of the failure. - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `404`: Not Found See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string): 900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `503`: Service Unavailable See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string, required): 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. - `message` (string, required) --- # Receive the health information data request to HIP `POST /api/v3/hip/health-information/request` **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. Callback API to provide Health information request of HIP. CM calls this API when it has validated the Health Information request given the consent ID. Either the hiRequest or error would need to be specified. If the health info request was valid, then the hiRequest.transactionId specifies the transaction context against which HIP would send over the data. ```bash curl --request POST \ --url {bridgeUrl}/api/v3/hip/health-information/request \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-HIP-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "transactionId": "49455d89-cb13-483d-ad71-7a57d5f669a8", "hiRequest": { "consent": { "id": "18235d89-cb13-479d-ad71-7a57d5f669a8" }, "dateRange": { "from": "2022-10-06T15:10:00.587Z", "to": "2022-11-06T15:10:00.587Z" }, "dataPushUrl": "https://live.ndhm.gov.in/api-hiu/data/notification", "keyMaterial": { "cryptoAlg": "ECDH", "curve": "curve25519", "dhPublicKey": { "expiry": "2022-12-28T13:18:20.742Z", "parameters": "Ephemeral public key", "keyValue": "BFN7KTdOT0jIAExG2A8Jg+01wMPWxptiGqwHRVvtiVEsUq2FR7P2UdqZxJyPJSeR6muai21iQhasNxnhh8I5M+g=" }, "nonce": "28236d89-cb13-479d-ad71-7a57d5f669a9" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Identifier of the health information provider to which the request was intended ## Body - `transactionId` (string, required) - `hiRequest` (object, required) - `hiRequest.consent` (object, required) - `hiRequest.consent.id` (string, required): The consent artefact id for health information request. 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}$" - `hiRequest.dateRange` (object, required): Health information created between this date range is requested - `hiRequest.dateRange.from` (string, required): Should be a UTC date time in ISO Format. Allows alpha numeric character and special characters like \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$ - `hiRequest.dateRange.to` (string, required): Should be a UTC date time in ISO Format.Allows alpha numeric character and special characters like \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$ - `hiRequest.dataPushUrl` (string, required): The URL to which the Health Information Provider has to send the health information data. Allows alpha numeric character and special characters like ^[a-zA-Z0-9_\\-@,. \":/]{0,255}$ - `hiRequest.keyMaterial` (object, required): The requester's half of the ECDH key agreement. The HIP derives the shared key from it and its own key pair, and encrypts every entry it pushes with AES-GCM. - `hiRequest.keyMaterial.cryptoAlg` (string, required): The key agreement algorithm. Always ECDH. - `hiRequest.keyMaterial.curve` (string, required): The curve the key pair is generated on. Always Curve25519. - `hiRequest.keyMaterial.dhPublicKey` (object, required): The public half of the ephemeral key pair generated for this transaction. - `hiRequest.keyMaterial.dhPublicKey.expiry` (string, required): When this key stops being valid, as an ISO 8601 timestamp. - `hiRequest.keyMaterial.dhPublicKey.parameters` (string, required): The key parameters. Ephemeral public key. - `hiRequest.keyMaterial.dhPublicKey.keyValue` (string, required): The public key, Base64 encoded, in X.509 SubjectPublicKeyInfo form. - `hiRequest.keyMaterial.nonce` (string): 32 random bytes, Base64 encoded, generated for this transaction. The other side combines it with its own nonce to derive the AES-GCM key and initialisation vector. ## 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. See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): 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. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string): Short description of the failure. - `description` (string): Detailed description of the failure. - `403`: Forbidden. The caller is authenticated but is not permitted to perform this operation on this resource. See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `404`: server cannot find the requested resource See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string, required): 404 - Runtime error. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `type` (string, required) - `message` (string, required) - `description` (string, required) --- # Receive the transferred health information `POST /health-information/transfer` **NOTE:** This API is actually the callback URL that is passed as `dataPushUrl` in the data request API - `/api/v3/hip/health-information/request`. This API is directly called by HIP Data Bridge and is not mediated via CM, and hence not routed through the Gateway. This API should be implemented at HIU side. It may be implemented by the Data Bridge representing the HIU. Entry elements may be content or link, although for version 1, entry content is preferred. Entry content (or even link reference content) must be encrypted by means of Elliptic-curve Diffie–Hellman Key Exchange, using the HIU key materials that are passed through the data request API - `/api/v3/hip/health-information/request`. Media contains the mimetype of content, and for v1, it is "application/fhir+json". Checksum is MD5 checksum of the data content, before encryption. Please refer to the ABDM Sandbox Documentation for the format of FHIR bundle that is passed through content. **Authorisation token is mandatory for this API.** ```bash curl --request POST \ --url {bridgeUrl}/health-information/transfer \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "pageNumber": 0, "pageCount": 1, "transactionId": "", "entries": [ { "content": "Encrypted content of data packaged in FHIR bundle", "media": "application/fhir+json", "checksum": "string", "careContextReference": "1931-nd2" } ], "keyMaterial": { "cryptoAlg": "ECDH", "curve": "Curve25519", "dhPublicKey": { "expiry": "", "parameters": "Curve25519/32byte random key", "keyValue": "" }, "nonce": "" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Body - `pageNumber` (integer, required): Current page number. - `pageCount` (integer, required): Total number of pages. - `transactionId` (string, required): Transaction Id issued when data requested. - `entries` (object[], required) - `entries.content` (string, required): Encrypted content - `entries.media` (string, required) One of: application/fhir+json. - `entries.checksum` (string, required): Md5 checksum of the content before encryption - `entries.careContextReference` (string, required): care context reference number. - `keyMaterial` (object, required): Encryption and decryption key details. - `keyMaterial.cryptoAlg` (string, required) One of: ECDH. - `keyMaterial.curve` (string, required) One of: Curve25519. - `keyMaterial.dhPublicKey` (object, required) - `keyMaterial.dhPublicKey.expiry` (string, required) - `keyMaterial.dhPublicKey.parameters` (string, required): Parameters of the encryption and decryption key. One of: Curve25519/32byte random key. - `keyMaterial.dhPublicKey.keyValue` (string, required) - `keyMaterial.nonce` (string, required) ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 4500 - Unknown error. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `error.message` (string, required) - `401`: Unauthorized. The request carried no valid credentials, or the access token has expired. Obtain a fresh token from the session API and retry. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string): Short description of the failure. - `description` (string): Detailed description of the failure. - `403`: Forbidden. The caller is authenticated but is not permitted to perform this operation on this resource. See Error codes for this module: /docs/hiecm/v3/api/m2/errors --- # Acknowledge the consent notification `POST /api/hiecm/consent/v3/request/hip/on-notify` Notification of consents, in cases of consent approval, revocation and expiration. Notified by CM earlier via Gateway API - **/api/v3/consent/request/hip/notify** ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/consent/v3/request/hip/on-notify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'Content-Type: application/json' \ --data '{ "acknowledgement": { "status": "OK", "consentId": "e3c74829-3f82-4f94-959e-e10f57bcd57b" }, "response": { "requestId": "6f0b4665-a915-4c92-aa36-65afb4a2cd71" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended ## Body - `acknowledgement` (object, required) - `acknowledgement.status` (string, required): The status of the notification. Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `acknowledgement.consentId` (string, required): The consent artefact id. Should be valid UUID. 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}$"; - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): The appropriate error message - `response` (object, required): The request id is from the /consent/request/hip/notify callback - `response.requestId` (string, required): The requestId that was passed. it must be in Alpha numeric and - in middle and 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}" ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `404`: Not Found See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string): 900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `503`: Service Unavailable See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string, required): 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. - `message` (string, required) --- # Submit the health information data request acknowledgement from HIP `POST /api/hiecm/data-flow/v3/health-information/hip/on-request` Acknowledge the Health information request receipt. Either the hiRequest or error must be specified. hiRequest element returns the same transaction ID as before with a status indicating that the request is acknowledged. ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/data-flow/v3/health-information/hip/on-request \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'Content-Type: application/json' \ --data '{ "hiRequest": { "transactionId": "18235d89-cb13-479d-ad71-7a57d5f669a8", "sessionStatus": "ACKNOWLEDGED" }, "response": { "requestId": "6f0b4665-a915-4c92-aa36-65afb4a2cd71" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended ## Body - `hiRequest` (object, required) - `hiRequest.transactionId` (string, required): The UUID generated when the health information request was initiated.Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `hiRequest.sessionStatus` (string, required): The status of the health information request that was initiated.Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `response` (object, required): The request id from the /hip/health-information/request callback. 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}" - `response.requestId` (string, required): The requestId that was passed ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string, required): ABDM-1031 - Invalid request. May be returned either bare (`ABDM-1031`) or with a trailing ": " separator (`ABDM-1031: `); match on the code itself and tolerate the separator. - `message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string, required): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string, required) - `description` (string, required) - `403`: Access Denied See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `404`: Not Found See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string): 900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `503`: Service Unavailable See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string, required): 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. - `message` (string, required) --- # Submit the notifications corresponding to events during data flow `POST /api/hiecm/data-flow/v3/health-information/notify` HIU and HIP during data transfer. HIP on the transfer of data would send sessionStatus - one of [TRANSFERRED, FAILED] HIP would also send hiStatus for each careContextReference - on of [DELIVERED, ERRORED] HIU on receipt of data would send sessionStatus - one of [RECEIVED, FAILED]. For example, FAILED when data was not sent or if invalid data was sent HIU would also send hiStatus for each careContextReference - one of [OK, ERRORED] ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/data-flow/v3/health-information/notify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'Content-Type: application/json' \ --data '{ "notification": { "consentId": "18235d89-cb13-479d-ad71-7a57d5f669a8", "transactionId": "18235d89-cb13-479d-ad71-7a57d5f669a8", "doneAt": "2023-01-24T06:35:44.167Z", "notifier": { "type": "HIU", "id": "100005" }, "statusNotification": { "sessionStatus": "RECEIVED", "hipId": "IN2810014366", "statusResponses": [ { "careContextReference": "10004-20200001768-1", "hiStatus": "OK", "description": "Data received successfully" } ] } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended ## Body - `notification` (object, required) - `notification.consentId` (string, required): The consent artefact id with which health information was requested.Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `notification.transactionId` (string, required): The UUID generated when the health information request was initiated.Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `notification.doneAt` (string, required): The date at which the transaction was initiated. Should be a UTC date time in ISO format. Allows alpha numeric character and special characters like "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$" - `notification.notifier` (object, required) - `notification.notifier.type` (string, required): The Service ID.Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" One of: HIU, HIP. - `notification.notifier.id` (string, required): The service ID of the notifier. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `notification.statusNotification` (object, required) - `notification.statusNotification.sessionStatus` (string, required): The status of the health information request that was initiated. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `notification.statusNotification.hipId` (string, required): The service ID of the health information provider. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `notification.statusNotification.statusResponses` (object[], required) - `notification.statusNotification.statusResponses.careContextReference` (string, required): The care context reference number.Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `notification.statusNotification.statusResponses.hiStatus` (string, required): The status of the health information transfer. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `notification.statusNotification.statusResponses.description` (string, required): The brief description of the status. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string, required): ABDM-1031 - Invalid request. May be returned either bare (`ABDM-1031`) or with a trailing ": " separator (`ABDM-1031: `); match on the code itself and tolerate the separator. - `message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string, required): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string, required) - `description` (string, required) - `403`: Access Denied See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `404`: Not Found See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string): 900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `503`: Service Unavailable See Error codes for this module: /docs/hiecm/v3/api/m2/errors - `code` (string, required): 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. - `message` (string, required) --- # M2 Health Information Provider errors Seeing a symptom rather than a code? Start at [Troubleshooting](/docs/hiecm/v3/troubleshooting/). During ABDM integration, systems may encounter issues across discovery, linking, consent, encryption, and data exchange workflows. This section outlines common errors, their causes, and recommended resolutions to help ensure smooth implementation. ## Codes | Code | HTTP | Message | Returned by | | ----------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | | `ABDM-1000` | | Unable to connect the database | | | `ABDM-1001` | | No data found | | | `ABDM-1004` | | SMS Gateway is unavailable | | | `ABDM-1006` | | Bad Request, invalid request Body | | | `ABDM-1007` | | Connection failed due to timeout | | | `ABDM-1008` | | SMS service currently disabled | | | `ABDM-1010` | | Validation failed | | | `ABDM-1011` | | Gateway database unavailable | | | `ABDM-1012` | | No records found against the ABHA Address | | | `ABDM-1013` | | Invalid ABHA Number | | | `ABDM-1015` | | Invalid Response | | | `ABDM-1016` | | Invalid TimeStamp | | | `ABDM-1017` | | Invalid TransactionId | | | `ABDM-1018` | | Share Profile database unavailable | | | `ABDM-1019` | | Dependent Service Unavailable | | | `ABDM-1020` | | Unknown database | | | `ABDM-1022` | | Too many requests | | | `ABDM-1023` | | Invalid User | | | `ABDM-1024` | | Dependent service unavailable | | | `ABDM-1025` | | Invalid ServiceId | | | `ABDM-1026` | | Invalid Link Token | | | `ABDM-1027` | | You are blocked. Please try again after 24 hours. | | | `ABDM-1028` | | HIP is unavailable | | | `ABDM-1029` | | Redis server is unavailable | | | `ABDM-1030` | | Invalid request ID | | | `ABDM-1031` | | Invalid request | | | `ABDM-1032` | | Invalid header | | | `ABDM-1033` | | HIU is unavailable | | | `ABDM-1034` | | Notification service unavailable | | | `ABDM-1035` | | Invalid HIP ID | | | `ABDM-1036` | | Data does not matched | | | `ABDM-1037` | | Counter and Care context count mismatch | | | `ABDM-1038` | | ABHA address and Link token mismatch | | | `ABDM-1040` | | Invalid HIU ID | | | `ABDM-1041` | | Invalid Acknowledgement | | | `ABDM-1042` | | Provider Mandatory | | | `ABDM-1043` | | ABHA Address does not match with KYC details. | | | `ABDM-1044` | | Broadcast Failed | | | `ABDM-1045` | | Database Access is restricted | | | `ABDM-1046` | | Invalid Purpose | | | `ABDM-1047` | | Purpose does not exist | | | `ABDM-1048` | | Timeout | | | `ABDM-1049` | | Invalid Profile Share Intent Keys | | | `ABDM-1050` | | Invalid Profile Share Metadata Keys | | | `ABDM-1051` | | Invalid ABHA Number or ABHA Address | | | `ABDM-1052` | | Invalid TransactionId or response's requestId | | | `ABDM-1401` | | HIP is not available | | | `ABDM-1061` | | Consent artefact expired | | | `ABDM-1062` | | Consent Not granted | | | `ABDM-1063` | | Date Range given is invalid | | | `ABDM-1064` | | request with this request id already exists | | | `ABDM-1109` | | ABHA DB service unavailable | | | `ABDM-1108` | | Notification DB service unavailable | | | `ABDM-1201` | | IDP Gateway is unavailable | | | `ABDM-9999` | | Unknown exception | | | `ABDM-1006` | | Invalid combinations of scopes | | | `ABDM-1056` | | This care contexts has been already linked | | | `ABDM-1055` | | Invalid HIP Id or PHR Id | | | `ABDM-1056` | | Invalid Link Reference Number | | | `ABDM-1057` | | Invalid Care Contexts | | | `ABDM-1059` | | Invalid Care Contexts count | | | `ABDM-1060` | | Invalid Patient Reference Number | | | `ABDM-1061` | | Invalid Patient Display | | | `ABDM-1062` | | ABHA number mismatch with Link token | | | `ABDM-1063` | | HIP Id mismatch with Link token | | | `ABDM-1064` | | Request body was missing | | | `ABDM-1065` | | Invalid X Auth token | | | `ABDM-1066` | | Invalid JWT token | | | `ABDM-1067` | | Request body not required | | | `ABDM-1170` | | Invalid ABHA address | | | `ABDM-1084` | | ABHA address mismatch with X Auth token | | | `ABDM-1085` | | ABHA number mismatch with X Auth token | | | `ABDM-1086` | | Patient profile mismatch with X Auth token | | | `ABDM-1087` | | Duplicate patient share request | | | `ABDM-1090` | | Duplicate HIP link request | | | `ABDM-1091` | | Duplicate Get links request | | | `ABDM-1092` | | Duplicate Link token request | | | `ABDM-1093` | | Duplicate Bridge request | | | `ABDM-1094` | | Duplicate bridge patch request | | | `ABDM-1095` | | Duplicate Bridge service request | | | `ABDM-1102` | | Profile information cannot be null | | | `ABDM-1103` | | Duplicate Discovery request | | | `ABDM-1104` | | Duplicate Init request | | | `ABDM-1105` | | Duplicate Confirm request | | | `ABDM-1106` | | Duplicate On discovery request | | | `ABDM-1107` | | Duplicate On init request | | | `ABDM-1108` | | Duplicate On confirm request | | | `ABDM-1109` | | Invalid On discovery response | | | `ABDM-1110` | | Invalid On init response | | | `ABDM-1111` | | Invalid On confirm response | | | `ABDM-1112` | | Invalid or already expired consent artefact id | | | `ABDM-1113` | | Duplicate health information provider data flow response | | | `ABDM-1149` | | Intent type is not supported at HIP end | | | `ABDM-1150` | | Bridge API version cannot be null | | | `ABDM-1402` | | Acknowledgement is not received from HIP | | | `ABDM-9999` | | HIP is unable to generate a token at this time. Please try again later. | | | `ABDM-9999` | | HIP is unable to process at this time. Please try again later. | | | `ABDM-1030` | | Request id not found | | | `ABDM-2500` | | No mapping found for | | | `ABDM-2401` | | The X Auth token is invalid. | | | `ABDM-2402` | | Invalid Timestamp | | | `ABDM-2404` | | Invalid Request Id | | | `ABDM-2429` | | Too many requests found | | | `ABDM-2501` | | Payment status should be : SUCCESS,CANCELED,PENDING,FAIL,REFUND\_INITIATED,REFUND\_SUCCESS | | | `ABDM-2500` | | Authorization header is missing | | | `ABDM-2403` | | Invalid X-CM-ID | | | `ABDM-2406` | | Invalid API sequence flow, please follow logical flow | | | `ABDM-2406` | | The status is invalid. Please follow the logical status flow or transition. | | | `ABDM-9999` | | User not found | | | `ABDM-9999` | | Cannot process the request at the moment, please try later. | | | `ABDM-9001` | | No open order against ABHA. Please ensure a minimum of one open order | | | `ABDM-9002` | | No registration found at <>. Contact counter support | | | `ABDM-9003` | | Hospital services temporarily unavailable. Please try again after some time. | | | `ABDM-9004` | | Services disrupted, please try again. | | | `ABDM-9005` | | Bank server not responding. Please try again later | | | `ABDM-9006` | | Service details mismatch. Please ensure original service ID from HMIS | | | `ABDM-9007` | | The Scan and Pay functionality is not enabled at this facility. Kindly contact the hospital administration. | | | `ABDM-1006` | | Invalid count, must be 2 digit and ranges between 1 to 20 | | | `ABDM-1407` | | The ABHA Number associated with this ABHA Address is currently deactivated. Please reactivate it. | | | `ABDM-1006` | | Invalid HIType, it must be in Prescription,DiagnosticReport,OPConsultation,DischargeSummary,ImmunizationRecord,HealthDocumentRecord,WellnessRecord,Invoice | | A row with no HTTP status and no call is one NHA lists for this module (Sandbox2.0 M2 and M3 API review v2, NHA, 21 September 2026) without saying which call returns it. Every code above is recorded in the specification that owns it. The aggregated list across modules is at [error codes](/docs/hiecm/v3/reference/error-codes). [Next Still stuck? Ask for help Where to file what you hit, so the answer lands back in these pages.](/docs/support) --- # M2 Health Information Provider: Create and link records Link care contexts to a patient's ABHA address, answer discovery requests, and share encrypted health records with consent. ## Base URLs | Environment | Base URL | | ----------- | -------------------------- | | Sandbox | `https://dev.abdm.gov.in` | | Production | `https://apis.abdm.gov.in` | The full operation list is in the [M2 API reference](/reference/hiecm-m2). New to this? Start with [M2 Health Information Provider](/docs/hiecm/v3/milestones/m2). --- # Receive the consent request for patient HIU `POST /api/v3/hiu/consent/request/on-init` **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. Result of consent request creation for a patient. **consentRequest.id** represents the consentrequest ID created by CM. The result must contain either**consentRequest** or the**error** caused. Reasons for error may be Invalid references (e.g patient ID, HIU ID), purpose, hiTypes, ranges, persmission ```bash curl --request POST \ --url {bridgeUrl}/api/v3/hiu/consent/request/on-init \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-HIU-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "consentRequest": { "id": "f29f0e59-8388-4698-9fe6-05db67aeac46" }, "error": { "code": "ABDM-1001", "message": "unable to connect database" }, "response": { "requestId": "6f0b4665-a915-4c92-aa36-65afb4a2cd71" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-HIU-ID` (string, required): Identifier of the health information user to which the request was intended ## Body - `consentRequest` (object, required) - `consentRequest.id` (string, required): The consent request id from a consent. Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\-@,. ":/]{0,255}$" - `error` (object, required): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): The appropriate error message - `response` (object, required) - `response.requestId` (string, required): The requestId that was passed. 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} ## 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. See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): Short description of the failure. - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `404`: Not Found See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string): 900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `503`: Service Unavailable See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string, required): 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. - `message` (string, required) --- # Receive the consent status request `POST /api/v3/hiu/consent/request/on-status` **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. This API endpoint is used to provide the result of a previously submitted consent request. The status of the request can be one of the following: REQUESTED, DENIED, or EXPIRED. By invoking this API, the Health Information User (HIU) receives the outcome of their consent request, ensuring that they are informed about the current status. This functionality is essential for maintaining transparency and enabling HIUs to take appropriate actions based on the consent status. The API supports secure and compliant health information exchange, facilitating efficient consent management within the healthcare ecosystem. ```bash curl --request POST \ --url {bridgeUrl}/api/v3/hiu/consent/request/on-status \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-HIU-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "consentRequest": { "id": "e5ec415f-c098-40f6-a0db-faa162fc5295", "status": "REQUESTED" }, "error": { "code": "ABDM-1001", "message": "unable to connect database" }, "response": { "requestId": "6f0b4665-a915-4c92-aa36-65afb4a2cd71" }, "resp": null }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-HIU-ID` (string, required): Identifier of the health information user to which the request was intended ## Body - `consentRequest` (object, required) - `consentRequest.id` (string, required): The consent request id from a consent. Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\-@,. ":/]{0,255}$" - `consentRequest.status` (string, required) One of: REQUESTED, DENIED, EXPIRED, REVOKED. - `error` (object, required): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): The appropriate error message - `response` (object, required) - `response.requestId` (string, required): The requestId that was passed.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} - `resp` (string, required) ## 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. See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): Short description of the failure. - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `404`: Not Found See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string): 900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `503`: Service Unavailable See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string, required): 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. - `message` (string, required) --- # Notify HIU when consent is APPROVED, DENIED or REVOKED `POST /api/v3/hiu/consent/request/notify` **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. Health information user will get notified about the consent request granted or denied, consent revoked, consent expired. For consent request grant, status=GRANTED, consentRequestId=, and consentArtefacts is an array of generated consent artefact Ids. For consent request expiry, status=EXPIRED, consentRequestId= For consent request denied, status=DENIED, consentRequestId= For consent revocation, status=REVOKED, consentArtefacts is an array of revoked consent artefact ids. ```bash curl --request POST \ --url {bridgeUrl}/api/v3/hiu/consent/request/notify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-HIU-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "notification": { "consentRequestId": "e3c74829-3f82-4f94-959e-e10f57bcd57b", "status": "GRANTED", "reason": null, "consentArtefacts": [ { "id": "6f0b4665-a915-4c92-aa36-65afb4a2cd71" } ] } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-HIU-ID` (string, required): Identifier of the health information user to which the request was intended ## Body - `notification` (object, required) - `notification.consentRequestId` (string, required): The consent request id from a consent. Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\-@,. ":/]{0,255}$" - `notification.status` (string, required) One of: GRANTED, EXPIRED, DENIED, REQUESTED, REVOKED. - `notification.reason` (string, required) - `notification.consentArtefacts` (object[], required): List of consent artefact ids that were created. - `notification.consentArtefacts.id` (string, required) ## 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. See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): Short description of the failure. - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `404`: Not Found See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string): 900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `503`: Service Unavailable See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string, required): 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. - `message` (string, required) --- # Receive the provide fetched consent artefact details to HIU `POST /api/v3/hiu/consent/on-fetch` **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. This API endpoint is part of the Ayushman Bharat Digital Mission (ABDM) Health Information Exchange - Consent Management (HIE-CM) system. It is called by the Consent Management (CM) system to fetch a consent artefact. By invoking this API, the CM system retrieves the detailed information of a specific consent artefact, ensuring that the consent data is accurately and securely accessed. This functionality is essential for maintaining the integrity and synchronization of consent records, supporting secure and compliant health information exchange within the healthcare ecosystem. ```bash curl --request POST \ --url {bridgeUrl}/api/v3/hiu/consent/on-fetch \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-HIU-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "consent": { "status": "GRANTED", "consentDetail": { "consentId": "e5ec415f-c098-40f6-a0db-faa162fc5295", "hip": { "id": "cowin_hip_01", "name": "Cowin", "type": "HIP" }, "hiu": { "id": "cowin_hiu_01", "name": "Cowin", "type": "HIU" }, "hiTypes": [ "Prescription" ], "patient": { "id": "" }, "purpose": { "text": "Care Management", "code": "CAREMGT", "refUri": "www.abc.com" }, "createdAt": "2021-09-28T12:30:08.573Z", "requester": { "name": "", "identifier": { "value": "REG1", "type": "MH1001", "system": "https://www.sample.com" } }, "permission": { "accessMode": "VIEW", "dateRange": { "from": "2021-09-28T12:30:08.573Z", "to": "2021-09-28T12:30:08.573Z" } }, "dataEraseAt": "2021-09-28T12:30:08.573Z", "frequency": { "unit": "HOUR", "value": 1, "repeats": 0 }, "lastUpdated": "2021-09-28T12:30:08.573Z", "careContexts": [ { "patientReference": "batman@tmh", "careContextReference": "Episode1" } ], "schemaVersion": "v3", "consentManager": { "id": "abdm" } }, "signature": "Signature of CM as defined in W3C standards; Base64 encoded" }, "error": null, "response": { "requestId": "6f0b4665-a915-4c92-aa36-65afb4a2cd71" }, "resp": null }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-HIU-ID` (string, required): Identifier of the health information user to which the request was intended ## Body - `consent` (object, required) - `consent.status` (string, required) One of: GRANTED, DENIED, EXPIRED, REVOKED. - `consent.consentDetail` (object, required) - `consent.consentDetail.consentId` (string, required): Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `consent.consentDetail.hip` (object): Identifier and name of the health information provider. - `consent.consentDetail.hip.id` (string, required): 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]$ - `consent.consentDetail.hip.name` (string, required): The name of the health information provider. Allows alpha numeric and special characters like _\-@,():/ - `consent.consentDetail.hip.type` (string): The type of the health information provider. Allows alpha numeric and special characters like _\-@,. ":/ - `consent.consentDetail.hiu` (object, required) - `consent.consentDetail.hiu.id` (string, required): 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]$ - `consent.consentDetail.hiu.name` (string, required): The name of the health information user. Allows alpha numeric and special characters like _\-@,():/ - `consent.consentDetail.hiu.type` (string): The type of the health information user. Allows alpha numeric and special characters like _\-@,. ":/ - `consent.consentDetail.hiTypes` (string[], required): Types of health information document. - `consent.consentDetail.patient` (object, required) - `consent.consentDetail.patient.id` (string, required): The abha address of the patient. allows alpha numeric character and special characters like ^[a-zA-Z0-9][a-zA-Z0-9_.]+[a-zA-Z0-9]@(abdm|sbx)$ - `consent.consentDetail.purpose` (object, required) - `consent.consentDetail.purpose.text` (string, required) One of: Care Management, Break the Glass, Public Health, Healthcare Payment, Disease Specific Healthcare Research, Self Requested. - `consent.consentDetail.purpose.code` (string, required) One of: CAREMGT, BTG, PUBHLTH, HPAYMT, DSRCH, PATRQT. - `consent.consentDetail.purpose.refUri` (string, required): The reference URL. Should be a valid URL.Allows alpha numeric character and special characters like ^[a-zA-Z0-9_\\-@,. \":/]{0,255}$ - `consent.consentDetail.createdAt` (string, required) - `consent.consentDetail.requester` (object, required) - `consent.consentDetail.requester.name` (string, required): The name of the requester - `consent.consentDetail.requester.identifier` (object, required) - `consent.consentDetail.permission` (object, required) - `consent.consentDetail.permission.accessMode` (string, required) One of: VIEW, STORE, STREAM, QUERY. - `consent.consentDetail.permission.dateRange` (object, required) - `consent.consentDetail.dataEraseAt` (string, required): The date at which the consent expire. Should be UTC date time in ISO format. Allows alpha numeric character and special characters like ^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$ - `consent.consentDetail.frequency` (object, required) - `consent.consentDetail.frequency.unit` (string, required) One of: HOUR, DAY, WEEK, MONTH, YEAR. - `consent.consentDetail.frequency.value` (number, required): The frequency unit value. Should be be a integer. Allows numeric character like ^[a-zA-Z0-9_\\-@,. \":/]{0,255}$ - `consent.consentDetail.frequency.repeats` (number, required): Should be be a integer.Allows numeric character like ^[a-zA-Z0-9_\\-@,. \":/]{0,255}$ - `consent.consentDetail.lastUpdated` (string, required): lastUpdated of the consent. Should be UTC date time in ISO format. Allows alpha numeric character and special characters like ^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$ - `consent.consentDetail.careContexts` (object[], required): List of care contexts linked at the HIP end for the identified patient. - `consent.consentDetail.careContexts.patientReference` (string, required): A patient identifier with which patient is registered in the facility/hospital. Allows alpha numeric character and special characters like ^[a-zA-Z0-9_\-@,. "':|()/]{0,255}$ - `consent.consentDetail.careContexts.careContextReference` (string, required): 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). Allows alpha numeric character and special characters like ^[a-zA-Z0-9_\-@,. "':|()/]{0,255}$ - `consent.consentDetail.schemaVersion` (string, required) - `consent.consentDetail.consentManager` (object, required) - `consent.consentDetail.consentManager.id` (string, required) - `consent.signature` (string, required) - `error` (object, required): The error code and message, if any occurred. - `response` (object, required) - `response.requestId` (string, required): The requestId that was passed.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} - `resp` (string) ## 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. See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): Short description of the failure. - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `404`: Not Found See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string): 900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `503`: Service Unavailable See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string, required): 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. - `message` (string, required) --- # Receive the health information data request acknowledgement to HIU `POST /api/v3/hiu/health-information/on-request` **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. Callback API for acknowledgment of Health information request of HIU. CM calls this API when it has validated the Health Information request given the consent ID. Either the hiRequest or error would need to be specified. If the health info request was valid, then the hiRequest.transactionId specifies the transaction context against which HIP would send over the data. ```bash curl --request POST \ --url {bridgeUrl}/api/v3/hiu/health-information/on-request \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-HIU-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "hiRequest": { "transactionId": "18235d89-cb13-479d-ad71-7a57d5f669a8", "sessionStatus": "REQUESTED" }, "error": { "code": "ABDM-1001", "message": "unable to connect database" }, "response": { "requestId": "6f0b4665-a915-4c92-aa36-65afb4a2cd71" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-HIU-ID` (string, required): Identifier of the health information user to which the request was intended ## Body - `hiRequest` (object, required) - `hiRequest.transactionId` (string, required): The UUID generated when the health information request was initiated. - `hiRequest.sessionStatus` (string, required): The status of the health information request that was initiated. - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): The appropriate error message - `response` (object, required) - `response.requestId` (string, required): The requestId that was passed. 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} ## 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. See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): 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. See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string): Short description of the failure. - `description` (string): Detailed description of the failure. - `403`: Forbidden. The caller is authenticated but is not permitted to perform this operation on this resource. See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `404`: server cannot find the requested resource See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string, required): 404 - Runtime error. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `type` (string, required) - `message` (string, required) - `description` (string, required) --- # Initiate the consent request `POST /api/hiecm/consent/v3/request/init` Create a consent request by a Health Information User (HIU) to access a patient’s health data. By invoking this API, the HIU initiates the process of obtaining the necessary permissions from the patient to retrieve their health information. This consent request is a critical component of the health information exchange framework, ensuring that patient data is accessed in a secure, authorised, and transparent manner. The API supports the establishment of trust and compliance with privacy regulations, facilitating seamless and ethical health information exchange. ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/consent/v3/request/init \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'Content-Type: application/json' \ --data '{ "consent": { "purpose": { "text": "Care Management", "code": "CAREMGT", "refUri": "www.abc.com" }, "patient": { "id": "" }, "hip": null, "hiu": { "id": "cowin_hiu_01" }, "careContexts": [ { "patientReference": "batman@tmh", "careContextReference": "Episode1" } ], "requester": { "name": "", "identifier": { "value": "REG1", "type": "MH1001", "system": "https://www.sample.com" } }, "hiTypes": [ "Prescription" ], "permission": { "accessMode": "VIEW", "dateRange": { "from": "2021-09-28T12:30:08.573Z", "to": "2021-09-28T12:30:08.573Z" }, "dataEraseAt": "2021-09-28T12:30:08.573Z", "frequency": { "unit": "HOUR", "value": 1, "repeats": 0 } } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended ## Body - `consent` (object, required) - `consent.purpose` (object, required) - `consent.purpose.text` (string, required) One of: Care Management, Break the Glass, Public Health, Healthcare Payment, Disease Specific Healthcare Research, Self Requested. - `consent.purpose.code` (string, required) One of: CAREMGT, BTG, PUBHLTH, HPAYMT, DSRCH, PATRQT. - `consent.purpose.refUri` (string, required): The reference URL. Should be a valid URL. Allow alpha numeric characters and special charactes like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `consent.patient` (object, required) - `consent.patient.id` (string, required): The abha address of the patient. It must start with Alphanumeric . and _ in the middle and must be ending with @abdm or @sbx. Allows alpha numeric character and special characters like ^[a-zA-Z0-9][a-zA-Z0-9_.\-!]+[a-zA-Z0-9]@(abdm|sbx)$ - `consent.hip` (object): Identifier and name of the health information provider. - `consent.hip.id` (string, required): 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]$ - `consent.hip.name` (string): The name of the health information provider. Allows alpha numeric and special characters like "^[a-zA-Z]+[A-Za-z0-9_\\-@,().\\s\\xa0:/]+" - `consent.hip.type` (string): The type of the health information provider. Allows alpha numeric and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `consent.hiu` (object, required) - `consent.hiu.id` (string, required): 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]$ - `consent.hiu.name` (string): The name of the health information user. Allows alpha numeric and special characters like "^[a-zA-Z]+[A-Za-z0-9_\\-@,().\\s\\xa0:/]+" - `consent.hiu.type` (string): The type of the health information user. Allows alpha numeric and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `consent.careContexts` (object[]): List of care contexts linked at the HIP end for the identified patient. - `consent.careContexts.patientReference` (string, required): A patient identifier with which patient is registered in the facility/hospital like abhaAddress @sbx. Allows alpha numeric and special characters like "^[a-zA-Z0-9_\\-@,().\"/: ]{0,255}$" - `consent.careContexts.careContextReference` (string, required): 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). Allows alpha numeric and special characters like "^[a-zA-Z0-9_\\-@,().\"/:| ]{0,255}$" - `consent.requester` (object, required) - `consent.requester.name` (string, required): The name of the requester - `consent.requester.identifier` (object, required) - `consent.requester.identifier.value` (string, required): The type of the identification. Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `consent.requester.identifier.type` (string, required): The identification value. Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `consent.requester.identifier.system` (string, required): Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `consent.hiTypes` (string[], required): Types of health information document. - `consent.permission` (object, required) - `consent.permission.accessMode` (string, required) One of: VIEW, STORE, STREAM, QUERY. - `consent.permission.dateRange` (object, required) - `consent.permission.dateRange.from` (string, required): Should be UTC date time in ISO format. Allows alpha numeric character and special characters like "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$" - `consent.permission.dateRange.to` (string, required): Should be UTC date time in ISO format. Allows alpha numeric character and special characters like "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$" - `consent.permission.dataEraseAt` (string, required): The date at which the consent expire. Should be UTC. Allows alpha numeric character and special characters like "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$" date time in ISO format - `consent.permission.frequency` (object, required) - `consent.permission.frequency.unit` (string, required) One of: HOUR, DAY, WEEK, MONTH, YEAR. - `consent.permission.frequency.value` (number, required): The frequency unit value. Should be be a integer - `consent.permission.frequency.repeats` (number, required): Should be be a integer ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `404`: Not Found See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string): 900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `503`: Service Unavailable See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string, required): 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. - `message` (string, required) --- # Get consent request status `POST /api/hiecm/consent/v3/request/status` Retrieve the status of a previously initiated consent request. By invoking this API, users can check the current state of their consent request, whether it is pending, approved, denied, or expired. This functionality is essential for maintaining transparency and keeping users informed about the progress of their consent requests. The API supports efficient tracking and management of consent, ensuring that health information exchange processes are conducted in a secure and compliant manner. ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/consent/v3/request/status \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'X-HIU-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "consentRequestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended - `X-HIU-ID` (string, required): Identifier of the health information user to which the request was intended ## Body - `consentRequestId` (string, required): The consent request id from a consent. Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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. - `error.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `404`: Not Found See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string): 900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `503`: Service Unavailable See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string, required): 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. - `message` (string, required) --- # Acknowledge the consent notification `POST /api/hiecm/consent/v3/request/hiu/on-notify` Consent notifications, specifically for cases when consent is APPROVED, DENIED, or REVOKED or EXPIRED. Notified by CM earlier via Gateway API - **/api/v3/hiu/consent/request/notify** ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/consent/v3/request/hiu/on-notify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'Content-Type: application/json' \ --data '{ "acknowledgement": [ { "status": "OK", "consentId": "e3c74829-3f82-4f94-959e-e10f57bcd57b" } ], "error": { "code": "ABDM-1001", "message": "unable to connect database" }, "response": { "requestId": "6f0b4665-a915-4c92-aa36-65afb4a2cd71" } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended ## Body - `acknowledgement` (object[], required) - `acknowledgement.status` (string, required): The status of the notification. Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `acknowledgement.consentId` (string, required): The consent artefact id. Should be valid UUID. 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}$" - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): The appropriate error message - `response` (object, required): The request id is from the /hiu/consent/request/notify callback - `response.requestId` (string, required): The requestId that was passed. it must be in Alpha numeric and - in middle and 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}" ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `404`: Not Found See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string): 900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `503`: Service Unavailable See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string, required): 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. - `message` (string, required) --- # Fetch the consent details `POST /api/hiecm/consent/v3/fetch` Fetch the details of a consent using the consent artefact ID. By invoking this API, HIUs can retrieve comprehensive information about a specific consent, including its status, scope, and any associated conditions. This functionality is essential for ensuring that HIUs have access to accurate and up-to-date consent information, supporting secure and compliant health information exchange. The API facilitates efficient management and verification of consents, enhancing the overall integrity of the consent management process. ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/consent/v3/fetch \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'X-HIU-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "consentId": "5f7a535d-a3fd-416b-b069-c97d021fbacd" }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended - `X-HIU-ID` (string, required): Identifier of the health information user to which the request was intended ## Body - `consentId` (string, required): The id of the consent artefact that needs to be fetched. Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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. - `error.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string): 900901 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `403`: Forbidden See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `404`: Not Found See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required) - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string): 900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `503`: Service Unavailable See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string, required): 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. - `message` (string, required) --- # Submit the health information data request from HIU `POST /api/hiecm/data-flow/v3/health-information/request` Facilitates the exchange of health data between Health Information Providers (HIP) and Health Information Users (HIU) within the ABDM system. It ensures secure and efficient data transfer, enabling seamless communication and interoperability between different healthcare entities. 1. **X-HIU-ID** if the requester is HIU (SERVICE-ID). ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/data-flow/v3/health-information/request \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'X-HIU-ID: IN2810014366' \ --header 'Content-Type: application/json' \ --data '{ "hiRequest": { "consent": { "id": "18235d89-cb13-479d-ad71-7a57d5f669a8" }, "dateRange": { "from": "2022-10-06T15:10:00.587Z", "to": "2022-11-06T15:10:00.587Z" }, "dataPushUrl": "https://live.ndhm.gov.in/api-hiu/data/notification", "keyMaterial": { "cryptoAlg": "ECDH", "curve": "curve25519", "dhPublicKey": { "expiry": "2022-12-28T13:18:20.742Z", "parameters": "Ephemeral public key", "keyValue": "BFN7KTdOT0jIAExG2A8Jg+01wMPWxptiGqwHRVvtiVEsUq2FR7P2UdqZxJyPJSeR6muai21iQhasNxnhh8I5M+g=" }, "nonce": "28236d89-cb13-479d-ad71-7a57d5f669a9" } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended - `X-HIU-ID` (string, required): Identifier of the health information user to which the request was intended ## Body - `hiRequest` (object, required) - `hiRequest.consent` (object, required) - `hiRequest.consent.id` (string, required): The consent artefact id for health information request. Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `hiRequest.dateRange` (object, required): Health information created between this date range is requested - `hiRequest.dateRange.from` (string, required): Should be a UTC date time in ISO Format.Allows alpha numeric character and special characters like ^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$ - `hiRequest.dateRange.to` (string, required): Should be a UTC date time in ISO Format.Allows alpha numeric character and special characters like ^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$ - `hiRequest.dataPushUrl` (string, required): The URL to which the Health Information Provider has to send the health information data. Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\\-@,. \":=?/&]{0,255}$" - `hiRequest.keyMaterial` (object, required): The requester's half of the ECDH key agreement. The HIP derives the shared key from it and its own key pair, and encrypts every entry it pushes with AES-GCM. - `hiRequest.keyMaterial.cryptoAlg` (string, required): The key agreement algorithm. Always ECDH. - `hiRequest.keyMaterial.curve` (string, required): The curve the key pair is generated on. Always Curve25519. - `hiRequest.keyMaterial.dhPublicKey` (object, required): The public half of the ephemeral key pair generated for this transaction. - `hiRequest.keyMaterial.dhPublicKey.expiry` (string, required): When this key stops being valid, as an ISO 8601 timestamp. - `hiRequest.keyMaterial.dhPublicKey.parameters` (string, required): The key parameters. Ephemeral public key. - `hiRequest.keyMaterial.dhPublicKey.keyValue` (string, required): The public key, Base64 encoded, in X.509 SubjectPublicKeyInfo form. - `hiRequest.keyMaterial.nonce` (string): 32 random bytes, Base64 encoded, generated for this transaction. The other side combines it with its own nonce to derive the AES-GCM key and initialisation vector. ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): ABDM-1015 - Invalid Response. May be returned either bare (`ABDM-1015`) or with a trailing ": " separator (`ABDM-1015: `); match on the code itself and tolerate the separator. - `error.message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string, required): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string, required) - `description` (string, required) - `403`: Access Denied See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `404`: Not Found See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string): 900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `503`: Service Unavailable See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string, required): 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. - `message` (string, required) --- # Submit the notifications corresponding to events during data flow `POST /api/hiecm/data-flow/v3/health-information/notify` HIU and HIP during data transfer. HIP on the transfer of data would send sessionStatus - one of [TRANSFERRED, FAILED] HIP would also send hiStatus for each careContextReference - on of [DELIVERED, ERRORED] HIU on receipt of data would send sessionStatus - one of [RECEIVED, FAILED]. For example, FAILED when data was not sent or if invalid data was sent HIU would also send hiStatus for each careContextReference - one of [OK, ERRORED] ```bash curl --request POST \ --url https://dev.abdm.gov.in/api/hiecm/data-flow/v3/health-information/notify \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' \ --header 'Content-Type: application/json' \ --data '{ "notification": { "consentId": "18235d89-cb13-479d-ad71-7a57d5f669a8", "transactionId": "18235d89-cb13-479d-ad71-7a57d5f669a8", "doneAt": "2023-01-24T06:35:44.167Z", "notifier": { "type": "HIU", "id": "100005" }, "statusNotification": { "sessionStatus": "RECEIVED", "hipId": "IN2810014366", "statusResponses": [ { "careContextReference": "10004-20200001768-1", "hiStatus": "OK", "description": "Data received successfully" } ] } } }' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended ## Body - `notification` (object, required) - `notification.consentId` (string, required): The consent artefact id with which health information was requested.Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `notification.transactionId` (string, required): The UUID generated when the health information request was initiated.Allows alpha numeric character and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `notification.doneAt` (string, required): The date at which the transaction was initiated. Should be a UTC date time in ISO format. Allows alpha numeric character and special characters like "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$" - `notification.notifier` (object, required) - `notification.notifier.type` (string, required): The Service ID.Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" One of: HIU, HIP. - `notification.notifier.id` (string, required): The service ID of the notifier. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `notification.statusNotification` (object, required) - `notification.statusNotification.sessionStatus` (string, required): The status of the health information request that was initiated. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `notification.statusNotification.hipId` (string, required): The service ID of the health information provider. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `notification.statusNotification.statusResponses` (object[], required) - `notification.statusNotification.statusResponses.careContextReference` (string, required): The care context reference number.Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `notification.statusNotification.statusResponses.hiStatus` (string, required): The status of the health information transfer. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" - `notification.statusNotification.statusResponses.description` (string, required): The brief description of the status. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \":/]{0,255}$" ## Responses - `202`: Accepted See The callback never arrives: /docs/hiecm/v3/troubleshooting/callback-never-arrives - `400`: Bad Request See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string, required): ABDM-1031 - Invalid request. May be returned either bare (`ABDM-1031`) or with a trailing ": " separator (`ABDM-1031: `); match on the code itself and tolerate the separator. - `message` (string, required) - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string, required): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string, required) - `description` (string, required) - `403`: Access Denied See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `404`: Not Found See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string): 900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `503`: Service Unavailable See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string, required): 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. - `message` (string, required) --- # Get the current status of the health information request `GET /api/hiecm/data-flow/v3/health-information/request/status/{transaction-id}` Allow Health Information Users (HIU) and Health Information Providers (HIP) to retrieve the current status of a specific Health Information Request. By providing the unique transaction ID, users can query the system to obtain real-time updates on the processing state of their request. This functionality is crucial for ensuring transparency and efficient communication between stakeholders in the health information exchange ecosystem. The API supports various status checks, including pending, in-progress, completed, and failed states. ```bash curl --request GET \ --url https://dev.abdm.gov.in/api/hiecm/data-flow/v3/health-information/request/status/{transaction-id} \ --header 'Authorization: Bearer ' \ --header 'REQUEST-ID: 18235d89-cb13-479d-ad71-7a57d5f669a8' \ --header 'TIMESTAMP: 2022-10-06T15:10:00.587Z' \ --header 'X-CM-ID: sbx' ``` ## Authorization - `Authorization` (bearer token, required): The access token from POST /api/hiecm/gateway/v3/sessions, sent with a `Bearer ` prefix. ## Headers - `REQUEST-ID` (string, required): Unique UUID for track the end to end request transaction - `TIMESTAMP` (string, required): 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-ID` (string, required): Suffix of the consent manager to which the request was intended ## Path parameters - `transaction-id` (string, required): The health information request transaction id ## Responses - `200`: OK - `transactionId` (string, required) - `status` (string, required) - `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. See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `error` (object): The error code and message, if any occurred. - `error.code` (string, required): 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.message` (string, required): Short description of the failure. - `401`: Unauthorized See Everything returns 401: /docs/hiecm/v3/troubleshooting/everything-returns-401 - `code` (string, required): 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string, required) - `description` (string, required) - `403`: Access Denied See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `404`: Not Found See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `500`: Internal Server Error See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string): 900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. - `message` (string) - `description` (string) - `503`: Service Unavailable See Error codes for this module: /docs/hiecm/v3/api/m3/errors - `code` (string, required): 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. - `message` (string, required) Shape of the 200 response, generated from the schema. The values are placeholders, not a captured response: ```json { "transactionId": "18235d89-cb13-479d-ad71-7a57d5f669a8", "status": "TRANSFERRED" } ``` --- # M3 Health Information User errors Seeing a symptom rather than a code? Start at [Troubleshooting](/docs/hiecm/v3/troubleshooting/). The M3 Health Information User specification records no error code yet. That is a gap in the specification, not a promise that this module cannot fail. Every code above is recorded in the specification that owns it. The aggregated list across modules is at [error codes](/docs/hiecm/v3/reference/error-codes). [Next Still stuck? Ask for help Where to file what you hit, so the answer lands back in these pages.](/docs/support) --- # M3 Health Information User: Fetch data with consent Request patient consent, track its status, and fetch the health records a granted consent artefact covers. The full operation list is in the [M3 API reference](/reference/hiecm-m3). New to this? Start with [M3 Health Information User](/docs/hiecm/v3/milestones/m3). --- # Login via password `POST /api/v1/auth/authPassword` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/api/v1/auth/authPassword \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "idType": "", "domainName": "", "hprId": "", "password": "XXXX@992" }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `idType` (string) - `domainName` (string) - `hprId` (string) - `password` (string) ## Responses - `200`: OK - `token` (string) - `expiresIn` (integer) - `refreshToken` (string) - `refreshExpiresIn` (integer) - `404`: Not Found Example 200 response. The values are placeholders: ```json { "token": "", "expiresIn": 1733639805, "refreshToken": null, "refreshExpiresIn": 0 } ``` --- # Get public certificate `GET /api/v1/auth/cert` ```bash curl --request GET \ --url "https://apihspsbx.abdm.gov.in/v4/int/api/v1/auth/cert?publicCertificateRequestDto=" \ --header 'Authorization: Bearer ' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Query parameters - `publicCertificateRequestDto` (object, required) ## Responses - `200`: OK - `404`: Not Found --- # Verify Aadhaar OTP 1 `POST /api/v1/auth/confirmWithAadhaarOtp` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/api/v1/auth/confirmWithAadhaarOtp \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "otp": "308709", "txnId": "de4ff682-fcc6-4bcf-a978-0dbb19a288b4" }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `otp` (string) - `txnId` (string) ## Responses - `200`: OK - `404`: Not Found --- # Send via Aadhaar OTP `POST /api/v1/auth/init` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/api/v1/auth/init \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "idType": "", "domainName": "", "authMethod": "AADHAAR_OTP", "hprId": "" }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `idType` (string) - `domainName` (string) - `authMethod` (string) - `hprId` (string) ## Responses - `200`: OK - `transactionId` (string) - `mobileNumber` (string) - `404`: Not Found Example 200 response. The values are placeholders: ```json { "transactionId": "227654a1-a627-48e3-a617-f6fa7595a512", "mobileNumber": "******1234" } ``` --- # Send verify OTP `POST /api/v2/auth/loginViaMobileSendOTP` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/api/v2/auth/loginViaMobileSendOTP \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "txnId": "4c8c4b29-6d7e-4446-8f73-4574d6d14f09", "mobile": "97624XXXXX" }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `mobile` (string) - `txnId` (string) - `otp` (string) - `hpid` (string) ## Responses - `200`: OK - `txnId` (string) - `mobileLinkedHpIdDTO` (object[]) - `mobileNumber` (string) - `404`: Not Found Example 200 response. The values are placeholders: ```json { "txnId": "28b4ce41-71df-48af-8b6c-13c30402816c", "mobileNumber": "******1234" } ``` --- # Register professional `POST /apis/v1/doctors/register-professional-new` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/apis/v1/doctors/register-professional-new \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "hprToken": "", "practitioner": { "healthProfessionalType": "doctor", "profilePhoto": "", "officialMobileCode": "", "officialMobile": "97624xxxxx", "officialMobileStatus": "", "officialEmail": "", "officialEmailStatus": "", "visibleProfilePicture": "0", "profileVisibleToPublic": "1", "personalInformation": { "salutation": "1", "firstName": "Ayushman", "middleName": "", "lastName": "Mission", "nationality": "356", "fatherName": "", "motherName": "", "spouseName": "", "gender": "M", "dateOfBirth": "", "placeOfBirthState": "68", "district": "", "subDistrict": "", "city": "", "languagesSpoken": "1,2", "category": "C" }, "addressAsPerKYC": "", "communicationAddress": { "isCommunicationAddressAsPerKYC": "false", "address": "", "name": "", "country": "", "state": "", "district": "", "subDistrict": "", "city": "", "pincode": "" }, "contactInformation": { "publicMobileNumber": "", "publicMobileNumberCode": "", "publicMobileNumberStatus": "", "landLineNumber": "", "landLineNumberCode": "", "publicEmail": "", "publicEmailStatus": "" }, "registrationAcademic": { "category": "1", "registrationData": [ { "registeredWithCouncil": "47", "registrationNumber": "REG12032", "registrationDate": "2024-12-01", "registrationCertificate": { "fileType": "pdf", "data": "" }, "isPermanentOrRenewable": "Permanent", "renewableDueDate": "", "categoryId": "2", "isNameDifferentInCertificate": "false", "proofOfNameChangeCertificate": "", "qualifications": [ { "nameOfDegreeOrDiplomaObtained": "4074", "country": "356", "state": "27", "college": "1022", "university": "6372", "yearOfAwardingDegreeDiploma": "2024", "monthOfAwardingDegreeDiploma": "February", "degreeCertificate": { "fileType": "pdf", "data": "" }, "isNameDifferentInCertificate": "false", "proofOfNameChangeCertificate": "" }, { "nameOfDegreeOrDiplomaObtained": "Graduation", "country": "United States Of America", "state": "united", "college": "united School", "university": "united University", "yearOfAwardingDegreeDiploma": "2024", "monthOfAwardingDegreeDiploma": "February", "degreeCertificate": { "fileType": "pdf", "data": "" }, "isNameDifferentInCertificate": "true", "proofOfNameChangeCertificate": "" } ] } ] }, "currentWorkDetails": { "currentlyWorking": "0", "purposeOfWork": "Administrative", "chooseWorkStatus": "1", "reasonForNotWorking": "Retired", "certificateAttachment": "", "facilityDeclarationData": { "facilityId": "IN2710000059", "facilityName": "", "facilityAddress": "", "facilityPincode": "", "state": "", "district": "", "facilityType": "", "facilityDepartment": "Surgery", "facilityDesignation": "MD", "ministry": { "ministry": "MinistryMOR ( Mo Railways )" } } } } }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `practitioner` (object) - `practitioner.personalInformation` (object) - `practitioner.communicationAddress` (object) - `practitioner.contactInformation` (object) - `practitioner.registrationAcademic` (object) - `practitioner.specialities` (object[]) - `practitioner.currentWorkDetails` (object) - `practitioner.apiClientId` (string) - `practitioner.profilePhoto` (string) - `practitioner.healthProfessionalType` (string) - `practitioner.officialMobileCode` (string) - `practitioner.officialMobile` (string) - `practitioner.officialMobileStatus` (string) - `practitioner.officialEmail` (string) - `practitioner.officialEmailStatus` (string) - `practitioner.visibleProfilePicture` (string) - `practitioner.profileVisibleToPublic` (string) - `practitioner.addressAsPerKYC` (string) - `hprToken` (string) ## Responses - `200`: OK - `referenceNumber` (string) - `status` (string) - `message` (string) - `error` (object) - `hprId` (string) - `404`: Not Found Example 200 response. The values are placeholders: ```json { "referenceNumber": "9a2d25fc-6897-4645-8e78-7f12a91b4ab4", "status": "true", "message": "Congratulations! Your profile has been submitted successfully for verification.", "error": null, "hprId": "" } ``` --- # Update professional `POST /apis/v1/doctors/update-professional-new` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/apis/v1/doctors/update-professional-new \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "hprToken": "", "practitioner": { "healthProfessionalType": "doctor", "profilePhoto": "", "officialMobileCode": "", "officialMobile": "97624xxxxx", "officialMobileStatus": "", "officialEmail": "", "officialEmailStatus": "", "visibleProfilePicture": "0", "profileVisibleToPublic": "1", "personalInformation": { "salutation": "1", "firstName": "Ayushman", "middleName": "", "lastName": "Mission", "nationality": "356", "fatherName": "", "motherName": "", "spouseName": "", "gender": "M", "dateOfBirth": "", "placeOfBirthState": "68", "district": "", "subDistrict": "", "city": "", "languagesSpoken": "1,2", "category": "C" }, "addressAsPerKYC": "", "communicationAddress": { "isCommunicationAddressAsPerKYC": "false", "address": "", "name": "", "country": "", "state": "", "district": "", "subDistrict": "", "city": "", "pincode": "" }, "contactInformation": { "publicMobileNumber": "", "publicMobileNumberCode": "", "publicMobileNumberStatus": "", "landLineNumber": "", "landLineNumberCode": "", "publicEmail": "", "publicEmailStatus": "" }, "registrationAcademic": { "category": "1", "registrationData": [ { "registeredWithCouncil": "47", "registrationNumber": "REG12032", "registrationDate": "2024-12-01", "registrationCertificate": { "fileType": "pdf", "data": "" }, "isPermanentOrRenewable": "Permanent", "renewableDueDate": "", "categoryId": "2", "isNameDifferentInCertificate": "false", "proofOfNameChangeCertificate": "", "qualifications": [ { "nameOfDegreeOrDiplomaObtained": "4074", "country": "356", "state": "27", "college": "1022", "university": "6372", "yearOfAwardingDegreeDiploma": "2024", "monthOfAwardingDegreeDiploma": "February", "degreeCertificate": { "fileType": "pdf", "data": "" }, "isNameDifferentInCertificate": "false", "proofOfNameChangeCertificate": "" }, { "nameOfDegreeOrDiplomaObtained": "Graduation", "country": "United States Of America", "state": "united", "college": "united School", "university": "united University", "yearOfAwardingDegreeDiploma": "2024", "monthOfAwardingDegreeDiploma": "February", "degreeCertificate": { "fileType": "pdf", "data": "" }, "isNameDifferentInCertificate": "true", "proofOfNameChangeCertificate": "" } ] } ] }, "currentWorkDetails": { "currentlyWorking": "0", "purposeOfWork": "Administrative", "chooseWorkStatus": "1", "reasonForNotWorking": "Retired", "certificateAttachment": "", "facilityDeclarationData": { "facilityId": "IN2710000059", "facilityName": "", "facilityAddress": "", "facilityPincode": "", "state": "", "district": "", "facilityType": "", "facilityDepartment": "Surgery", "facilityDesignation": "MD", "ministry": { "ministry": "MinistryMOR ( Mo Railways )" } } } } }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `practitioner` (object) - `practitioner.personalInformation` (object) - `practitioner.communicationAddress` (object) - `practitioner.contactInformation` (object) - `practitioner.registrationAcademic` (object) - `practitioner.specialities` (object[]) - `practitioner.currentWorkDetails` (object) - `practitioner.apiClientId` (string) - `practitioner.profilePhoto` (string) - `practitioner.healthProfessionalType` (string) - `practitioner.officialMobileCode` (string) - `practitioner.officialMobile` (string) - `practitioner.officialMobileStatus` (string) - `practitioner.officialEmail` (string) - `practitioner.officialEmailStatus` (string) - `practitioner.visibleProfilePicture` (string) - `practitioner.profileVisibleToPublic` (string) - `practitioner.addressAsPerKYC` (string) - `hprToken` (string) ## Responses - `200`: OK - `referenceNumber` (string) - `status` (string) - `message` (string) - `error` (object) - `hprId` (string) - `404`: Not Found Example 200 response. The values are placeholders: ```json { "referenceNumber": "5b17ca73-f069-4018-91a0-665df0117d43", "status": "true", "message": "Congratulations! Your profile has been submitted successfully for verification.", "error": null, "hprId": "" } ``` --- # Fetch documents `POST /apis/v1/doctors/fetch-documents-list` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/apis/v1/doctors/fetch-documents-list \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "hprid": "" }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `hprid` (string) ## Responses - `200`: OK - `documentList` (object) - `documentList.profileDetails` (object) - `documentList.registrationDetails` (object[]) - `documentList.qualificationDetails` (object[]) - `documentList.qualification` (object[]) - `documentList.internationalDoctorQualificationDetails` (object[]) - `message` (string) - `Message` (string) - `404`: Not Found Example 200 response. The values are placeholders: ```json { "documentList": { "profileDetails": { "profilePhoto": { "id": 30106, "data": "" }, "proofOfWorkCertificate": { "id": 30106, "data": "JVBERi0xLjMK" } }, "registrationDetails": [ { "registrationCertificate": { "id": 21021, "systemOfMedicide": "modern_medicine", "data": "JVBERi0xLjMK" }, "proofOfNameChangeRegCertificate": { "id": 21021, "systemOfMedicide": "modern_medicine", "data": "JVBERi0xLjMK" } } ], "qualificationDetails": [ { "degreeCertificate": { "id": 9693, "courseName": "PhD Biostatistics", "qualificationYear": "2021", "data": "JVBERi0xLjMK" }, "proofOfNameChangeQualCertificate": { "id": 9693, "courseName": "PhD Biostatistics", "qualificationYear": "2021", "data": "JVBERi0xLjMK" } } ], "qualification": null }, "Message": "Data fetched successfully" } ``` --- # Upload documents `POST /apis/v1/uploads/upload-document` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/apis/v1/uploads/upload-document \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "hpr_token": "", "document": [ { "document_id": 20931, "document_type": "registrationCertificate", "fileType": "", "data": "JVBERi0xLjMK" } ] }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `hpr_token` (string) - `document` (object[]) - `document.document_id` (integer) - `document.document_type` (string) - `document.fileType` (string) - `document.data` (string) ## Responses - `200`: OK - `profilePhoto` (object) - `degreeCertificate` (object) - `registrationCertificate` (object) - `registrationCertificate.status` (string) - `registrationCertificate.msg` (string) - `proofOfWorkCertificate` (object) - `404`: Not Found Example 200 response. The values are placeholders: ```json { "profilePhoto": null, "degreeCertificate": null, "registrationCertificate": { "status": "pass", "msg": "Registration certificate updated" }, "proofOfWorkCertificate": null } ``` --- # Get professional info `POST /apis/v1/doctors/fetch-professional-info` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/apis/v1/doctors/fetch-professional-info \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "practitioner": { "id": "", "name": "", "contactNumber": "976243XXXX", "state": "UTTAR PRADESH", "registrationNumber": "" } }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `practitioner` (object) - `practitioner.id` (string) - `practitioner.name` (string) - `practitioner.contactNumber` (string) - `practitioner.state` (string) - `practitioner.registrationNumber` (string) - `practitioner.stateCouncilName` (string) ## Responses - `200`: OK - `message` (string) - `practitioners` (array[]) - `404`: Not Found Example 200 response. The values are placeholders: ```json { "practitioners": [ [ { "identifier": 38053, "active": false, "name": "Ayushman Bharat Mission", "gender": "Male", "salutation": "Mr", "communicationLanguage": " English ", "registrations": [ { "identifier": 25989, "category": "Dentistry", "nuidnumber": null, "nuidvalidtill": null, "systemOfMedicide": null, "isRenewable": "false", "dueDate": null, "councilName": "Karnataka State Dental Council", "registeredAt": null, "registrationNumber": "REG12032", "registrationDate": "2024-12-01" } ], "qualifications": [ { "identifier": 12835, "courseName": "Bds - Bachelor Of Dental Surgery", "collegeName": "A.j. Institute Of Dental Sciences, Mangalore", "universityName": "Rajiv Gandhi University Of Health Sciences (rguhs)", "qualificationYear": "2024", "qualificationMonth": "" } ], "hpr_id": "", "application_status": null, "is_council_verified": "true", "is_work_verified": null, "email": "", "mobileNumber": "******2125", "hpr_category": "doctor" } ] ], "message": "Data fetched successfully" } ``` --- # Submit the retrieval health ID by Aadhaar `POST /v1/forgot/hprId/aadhaar` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/v1/forgot/hprId/aadhaar \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "otp": "", "txnId": "4c115e27-a602-4320-b4cd-ee658539e2f0" }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `txnId` (string) ## Responses - `200`: OK - `hprId` (string) - `hprIdNumber` (string) - `token` (string) - `404`: Not Found Example 200 response. The values are placeholders: ```json { "hprId": "", "hprIdNumber": "71-1********-0212", "token": "" } ``` --- # Submit the retrieval health ID by mobile `POST /v1/forgot/hprId/mobile` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/v1/forgot/hprId/mobile \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "txnId": "5f7a4a1e-59ba-4c0c-9e0c-8e6b3b6e2f11", "name": "", "gender": "", "yearOfBirth": "", "monthOfBirth": "", "dayOfBirth": "", "firstName": "", "lastName": "", "middleName": "", "otp": "" }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `txnId` (string, required) - `name` (string, required) - `gender` (string, required) - `yearOfBirth` (string, required) - `monthOfBirth` (string) - `dayOfBirth` (string) - `firstName` (string, required) - `lastName` (string) - `middleName` (string) - `otp` (string, required) ## Responses - `200`: OK - `404`: Not Found --- # Generate mobile OTP `POST /v1/forgot/hprId/mobile/generateOtp` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/v1/forgot/hprId/mobile/generateOtp \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "mobileNumber": "VPoaDCJBNyGhJiX+sAh9yRq1WXAfRXkgcE31/0U2DMkH/+nvpspAA4GEmkbideZhKsSLYnFA1lHPkBH7PS6Bg4jz0aSdDAoovnYgVftJ/suP4mzhhg1Hrf7zQFPriHiraNlsIzsDeLl3ckGejNiCmXhfhBBw==xxxxxxxxxxxxx" }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `mobileNumber` (string) - `email` (string) - `type` (string) - `hpid` (string) ## Responses - `200`: OK - `txnId` (string) - `msg` (string) - `mobileNumber` (string) - `404`: Not Found Example 200 response. The values are placeholders: ```json { "txnId": "132dd7dd-ca5a-4ec1-a36c-093c007bf794", "msg": "Please enter OTP sent on your mobile number ******2021", "mobileNumber": "******2021" } ``` --- # Send OTP to contact `POST /v1.5/facility/sendOtpToContact` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/v1.5/facility/sendOtpToContact \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "facilityId": "IN2810002702" }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `facilityId` (string) ## Responses - `200`: OK - `facilityId` (string) - `status` (string) - `message` (string) - `transactionId` (string) - `errorStatus` (object[]) - `404`: Not Found Example 200 response. The values are placeholders: ```json { "facilityId": "IN0610089709", "status": "Success", "message": "Otp sent successfully! Please keep transaction id for future reference", "transactionId": "3cf3de44-94a4-4f77-b7f9-de6ec86785b3", "errorStatus": null } ``` --- # Validate OTP `POST /v1.5/facility/validateOtp` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/v1.5/facility/validateOtp \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "facilityId": "IN2810002702", "sourceId": "AB-PMJAY", "otp": "885210", "source": "AB-PMJAY", "transactionId": "2ddfc7ec-9a9f-412c-8c50-c2be92da5781" }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `facilityId` (string) - `sourceId` (string) - `otp` (string) - `source` (string) - `transactionId` (string) ## Responses - `200`: OK - `facilityId` (string) - `status` (string) - `message` (string) - `errorStatus` (object[]) - `404`: Not Found Example 200 response. The values are placeholders: ```json { "facilityId": "IN2810002702", "status": "success", "message": "OTP validated successfully!!! Hospital id linked to HFR", "errorStatus": null } ``` --- # Get admin token `POST /getManagementToken` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/getManagementToken \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "username": "", "password": "", "resend": false }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `username` (string) - `password` (string) - `resend` (boolean) ## Responses - `200`: OK - `404`: Not Found --- # Submit the healdthloginwithmobile `POST /healdthloginwithmobile` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/healdthloginwithmobile \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "txnId": "", "issueToken": "", "token": "" }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `txnId` (string) - `issueToken` (string) - `token` (string) ## Responses - `200`: OK - `404`: Not Found --- # Update role and category `POST /profile/updateRole` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/profile/updateRole \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "firstName": "Ayushman", "lastName": "Mission", "middleName": "Bharat", "hprId": "", "password": "Abdm@143", "email": ".com", "profilePhoto": "", "stateCode": "7", "districtCode": "71", "subdistrictCode": "1", "villageCode": "", "townCode": "", "wardCode": "", "pincode": 110001, "address": "9th Floor, Tower-l, Jeevan Bharati Building, Connaught Place, New Delhi - 110001", "yearOfBirth": "2021", "monthOfBirth": "8", "dayOfBirth": "15", "hpCategoryCode": "1", "hpSubCategoryCode": "1", "txnId": "5f7a4a1e-59ba-4c0c-9e0c-8e6b3b6e2f11", "role": "", "consentToDelete": false }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `firstName` (string): First Name of the user). - `lastName` (string): Last name of the user - `middleName` (string): Middle name of the user - `hprId` (string): Healthcare Professional ID Alias. - `password` (string): User Authentication password. - `email` (string): Email Address of the user. - `profilePhoto` (string): Profile photo of the user (Uploaded by the user). - `stateCode` (string): State Code of the user (LGD). - `districtCode` (string): District Code of the user (LGD). - `subdistrictCode` (string): Sub District Code of the user (LGD). - `villageCode` (string): Village Code of the user (LGD). - `townCode` (string): Town Code of the user (LGD). - `wardCode` (string): Ward Code of the user (LGD). - `pincode` (integer): Pincode of the user. - `address` (string): Address of the user. - `yearOfBirth` (string): Year of birth of the user. - `monthOfBirth` (string): Month of birth of the user. - `dayOfBirth` (string): Day of birth of the user. - `hpCategoryCode` (string) - `hpSubCategoryCode` (string) - `txnId` (string) - `role` (string) - `consentToDelete` (boolean) ## Responses - `200`: OK - `404`: Not Found --- # Fetch professional facility `POST /fetchProfessionalFacility` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/fetchProfessionalFacility \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "facilityId": "", "page": 0, "size": 0 }' ``` ## Authorization - `Authorization` (bearer token, required): M4 declares bearer authentication. The HPID calls publish POST /getManagementToken. ## Body - `facilityId` (string) - `page` (integer) - `size` (integer) ## Responses - `200`: OK - `404`: Not Found --- # Create facility suggestion `POST /hprFacilitySuggestions` ```bash curl --request POST \ --url https://apihspsbx.abdm.gov.in/v4/int/hprFacilitySuggestions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "name": "", "address": "
", "state": { "id": 0, "name": "", "isoCode": "", "status": false, "countryId": 0, "visibleStatus": false, "position": false, "councilLabel": "", "systemOfMedicine": false }, "district": { "id": 0, "stateId": 0, "districtName": "", "isoCode": "", "status": false }, "pincode": 0, "contactNo": 0, "email": "", "contactName": "", "status": "pending", "createdBy": 0, "updatedBy": 0, "facilityId": 0, "hprProfileId": 0, "facilityName": "", "facilityOwnership": { "label": "