API for suggesting ABHA Address (CRT_ABHA_112)

Hello,

I’m currently working on the creation of Health IDs, and I’ve been using the following APIs for this purpose. However, I need to address the CRT_ABHA_112 test case, which requires me to include a feature for suggesting ABHA addresses. Could you please provide information on which API healthidsbx uses for ABHA address suggestions?

Here’s the existing API flow I’ve been using:

  1. Session initiation: https://dev.abdm.gov.in/gateway/v0.5/sessions
  2. Generate OTP for Aadhaar registration: https://healthidsbx.abdm.gov.in/api/v1/registration/aadhaar/generateOtp
  3. Verify OTP for Aadhaar registration: https://healthidsbx.abdm.gov.in/api/v1/registration/aadhaar/verifyOTP
  4. Check and generate mobile OTP: https://healthidsbx.abdm.gov.in/api/v2/registration/aadhaar/checkAndGenerateMobileOTP
  5. Generate mobile OTP for Aadhaar registration: https://healthidsbx.abdm.gov.in/api/v1/registration/aadhaar/generateMobileOTP
  6. Verify mobile OTP for Aadhaar registration: https://healthidsbx.abdm.gov.in/api/v1/registration/aadhaar/verifyMobileOTP
  7. Create Health ID using Aadhaar: https://healthidsbx.abdm.gov.in/api/v2/registration/aadhaar/createHealthIdByAdhaar

I would greatly appreciate your assistance in identifying the API that facilitates ABHA address suggestions in this process.

1 Like

@PDesai Please use PHR suggestion API for the feature of suggesting ABHA address.
​/api​/v1​/phr​/registration​/phr​/suggestion
You will find this api in PHR postman collection.

System should have the provision of customized ABHA address creation with ABHA address policy as per ABDM standards.Validation rules on ABHA Address to be set at the API level. Please follow this :
Minimum length - 8 characters
Maximum length - 18 characters
Special characters allowed - 1 dot (.) and/or 1 underscore (_)
Special character dot and underscore should be in between
Special characters cannot be in the beginning or at the end
Alphanumeric - only numbers, only letters or any combination of numbers

@IntegrationSupport, I’ve encountered an issue when using the API at https://phrsbx.abdm.gov.in/api/v1/phr/registration/phr/suggestion with the transaction ID obtained from the preceding creation flow. The response I receive indicates “Transaction ID not found.”

To successfully use the same API, I have found that I need to use the transaction ID from the following flow after creating a health ID:

  1. Perform a POST request to https://healthidsbx.abdm.gov.in/api/v2/registration/mobile/login/userAuthorizedToken.
  2. Generate an OTP by sending a request to https://phrsbx.abdm.gov.in/api/v1/phr/registration/generate/otp.
  3. Verify the OTP by making a request to https://phrsbx.abdm.gov.in/api/v1/phr/registration/verify/otp.
  4. Retrieve registration details from https://phrsbx.abdm.gov.in/api/v1/phr/registration/details.
  5. Finally, use the obtained transaction ID with https://phrsbx.abdm.gov.in/api/v1/phr/registration/phr/suggestion to make it work as expected.

This sequence of steps ensures that the transaction ID is properly recognized and utilized in the API workflow.

@PDesai Wrong API sequence. Will share the postman collection for the same from where you can implement with correct api sequence.

I followed the following sequence, and now I have the results as expected:

  1. Generate Aadhaar OTP: /v2/registration/aadhaar/generateOtp
  2. Verify Aadhaar OTP: /v2/registration/aadhaar/verifyOTP
  3. Check and Generate Mobile OTP: /v2/registration/aadhaar/checkAndGenerateMobileOTP
  4. Verify Mobile OTP: /v2/registration/aadhaar/verifyMobileOTP
  5. Create Health ID with Pre-Verified Aadhaar: /v1/registration/aadhaar/createHealthIdWithPreVerified
  6. Link Profile Details: /api/v1/phr/profile/link/profileDetails
  7. Suggest PHR Registration: /api/v1/phr/registration/phr/suggestion
  8. Create PHR Address: /api/v1/phr/registration/hid/create-phr-address

This sequence allowed me to achieve the expected results.

1 Like

Hi @PDesai, @IntegrationSupport

Is this the correct flow to achieve the CRT_ABHA_112 test case?
Do we need to use the PHR APIs even if we are a HIMS platform?

If yes, @IntegrationSupport Please help us get the access to PHR APIs so that we can implement this in our system
Already raised request for PHR apis : PHR APIs access

Thanks,
Rachit Khandelwal
+91-9511878113
CliniQ360

@rachit4 If you are not developing PHR, then why you will use PHR api’s. To create abha please follow the updated test cases.

https://sandbox.abdm.gov.in/sandbox/v3/new-documentation?doc=TestCases

https://sandbox.abdm.gov.in/sandbox/v3/new-documentation?doc=CreateOfAbhaNumber

Hi @IntegrationSupport
As an HIMS, what if we are using v1 and v2 api’s?
Then what api’s should be used for suggestion of abha address and to create abha address for already existing abha number?

@IntegrationSupport

Right now we are using below set of APIs for ABHA registration using AADHAAR card

  • Generate Aadhaar OTP: /v1/registration/aadhaar/generateOtp
  • Verify Aadhaar OTP: /v1/registration/aadhaar/verifyOTP
  • Check and Generate Mobile OTP: /v2/registration/aadhaar/checkAndGenerateMobileOTP
  • Verify Mobile OTP: /v1/registration/aadhaar/verifyMobileOTP
  • Create Health ID with Pre-Verified Aadhaar: /v1/registration/aadhaar/createHealthIdWithPreVerified

According to the test case : CRT_ABHA_112 , it is required to suggest abha addresses to the user before creation. We went to the documentation and found that the below PHR APIs can be used for the test case.
As our role is HIP, we don’t have access to PHR apis.

  • Link Profile Details: /api/v1/phr/profile/link/profileDetails
  • Suggest PHR Registration: /api/v1/phr/registration/phr/suggestion
  • Create PHR Address: /api/v1/phr/registration/hid/create-phr-address

Is this test case mandatory for HIP?
If yes please provide us the APIs which we can use to complete the test case.

Hi @IntegrationSupport
In the test cases CRT_ABHA_112 its given thata ABHA address suggestion is mandatory .So as an HIMS, we have completed ABHA creation using v1 and v2 api’s
Then what api’s should be used for suggestion of abha address and to create abha address using v1 /v2 api
client id :SBX_004566