Skip to content

Commit 21ccdf1

Browse files
Added docs for HPR Registration steps
1 parent 2aea3a1 commit 21ccdf1

8 files changed

+358
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# HPR Registration - Generate Aadhaar OTP
2+
3+
The first step in the HPR registration process is generating an OTP (One-Time Password) for verifying the Aadhaar number. This OTP will be sent to the mobile number linked with the Aadhaar card and will be required in the subsequent steps of the registration process.
4+
5+
## Parameters
6+
7+
- `aadhaar_number` (String, required) - The Aadhaar number for which the OTP needs to be generated.
8+
9+
10+
## Method
11+
```ruby
12+
generate_aadhaar_otp(
13+
aadhaar_number:
14+
)
15+
```
16+
17+
18+
## Request Body
19+
20+
To generate an OTP for a specific Aadhaar number:
21+
22+
```ruby
23+
@client.generate_aadhaar_otp(
24+
aadhaar_number: '123443211234'
25+
)
26+
```
27+
28+
## Response Body
29+
30+
```json
31+
{
32+
"txnId": "38022xxx-7xxx-43ba-91ff-4471a25e9xxx",
33+
"mobileNumber": "xxxxxxxx79"
34+
}
35+
```
36+
37+
38+
Once the OTP has been generated and sent to the registered mobile number, proceed to **Step 2: Verify Aadhaar OTP** to complete Aadhaar verification.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# HPR Registration - Verify Aadhaar OTP
2+
3+
Once you receive the OTP generated in **Step 1**, you can verify it using this API. The OTP will validate the Aadhaar number provided and return user information if successful.
4+
5+
## Parameters
6+
7+
- `otp_value` (String, required) - The OTP sent to the Aadhaar-registered mobile number.
8+
9+
10+
## Method
11+
```ruby
12+
verify_aadhaar_otp(
13+
otp_value:
14+
)
15+
```
16+
17+
## Request Body
18+
19+
To verify the Aadhaar OTP for a specific transaction:
20+
21+
```ruby
22+
@client.verify_aadhaar_otp(
23+
otp_value: '123456'
24+
)
25+
```
26+
27+
## Response Body
28+
```json
29+
{
30+
"txnId": "123456xx-74xx-43xx-91xx-123456exxxxx",
31+
"mobileNumber": null,
32+
"photo": "dummy_photo_data_here",
33+
"gender": "M",
34+
"name": "John Doe",
35+
"email": null,
36+
"pincode": "123456",
37+
"birthdate": "01-01-1990",
38+
"careOf": "Jane Doe",
39+
"house": "1234 Example Street",
40+
"street": null,
41+
"landmark": "Near Park",
42+
"locality": null,
43+
"villageTownCity": "Sampletown",
44+
"subDist": null,
45+
"district": "Sample District",
46+
"state": "Sample State",
47+
"postOffice": "Sample Post Office",
48+
"address": "C/O Jane Doe 1234 Example Street Near Park Sampletown"
49+
}
50+
```
51+
52+
Once the Aadhaar OTP is verified, proceed to the next step in the HPR registration process.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# HPR Registration - Check HPID Existence by Aadhaar
2+
3+
This API allows you to check if an HPID (Healthcare Professional ID) already exists for a given Aadhaar number after verifying the Aadhaar OTP in **Step 2**. The API will return the HPID if it exists.
4+
5+
6+
## Parameters
7+
8+
- No parameters are required for this API call.
9+
10+
11+
## Method
12+
```ruby
13+
check_hpi_existence()
14+
```
15+
16+
## Request Body
17+
18+
To check if an HPID exists:
19+
20+
```ruby
21+
@client.check_hpi_existence
22+
```
23+
24+
## Response Body
25+
```json
26+
{
27+
"token": "",
28+
"hprIdNumber": "71-****-*****-***8",
29+
"categoryId": 0,
30+
"subCategoryId": 0,
31+
"new": false
32+
}
33+
```
34+
35+
If the HPID exists, it will be returned, and you can proceed to the next steps in the HPR registration flow. If no HPID exists, you will need to register a new one.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# HPR Registration - Verify Mobile Number Matches Aadhaar
2+
3+
This API allows you to verify if the provided mobile number matches the one registered with Aadhaar after the OTP verification step.
4+
5+
## Parameters
6+
7+
- `mobileNumber`: (String, required) - The mobile number to be verified against the Aadhaar registered mobile number.
8+
9+
10+
## Method
11+
```ruby
12+
verify_mobile_number_matches_aadhaar(
13+
mobile_number:
14+
)
15+
```
16+
17+
## Request Body
18+
19+
```ruby
20+
@client.verify_mobile_number_matches_aadhaar(
21+
mobile_number: '1233211231'
22+
)
23+
```
24+
25+
## Response Body
26+
27+
```json
28+
{
29+
"verified": true
30+
}
31+
```
32+
33+
If the mobile number is verified as correct, you can proceed with the next step in the HPR registration process.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# HPR Registration - step 1: Generate Mobile OTP
2+
3+
This API is used to generate an OTP for mobile number verification if the demographic authentication with Aadhaar has failed. It requires the mobile number and the transaction ID from the previous OTP generation step.
4+
5+
6+
## Parameters
7+
8+
- `mobile`: (String, required) - The mobile number for which the OTP is to be generated.
9+
10+
11+
## Method
12+
```ruby
13+
generate_mobile_otp(mobile_number:)
14+
```
15+
16+
17+
## Request Body
18+
19+
```ruby
20+
@client.generate_mobile_otp(mobile_number: '1233211231')
21+
```
22+
23+
24+
## Response Body
25+
26+
```json
27+
{
28+
"txnId": "37ccfe4f-6703-4666-a6eb-25eb58909b5f",
29+
"mobileNumber": null
30+
}
31+
```
32+
33+
34+
After receiving the OTP, you can proceed to the mobile OTP verification step in the HPR registration flow.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# HPR Registration - Step 2: Verify Mobile OTP
2+
3+
This API verifies the OTP generated for a mobile number during the registration process. It requires the OTP received on the mobile number and the transaction ID from the previous OTP generation step.
4+
5+
## Parameters
6+
7+
- `otp_value`: (String, required) - The OTP received on the mobile number.
8+
9+
## Method
10+
```ruby
11+
verify_mobile_otp(
12+
otp_value:
13+
)
14+
```
15+
16+
## Request Body
17+
18+
```ruby
19+
@client.verify_mobile_otp(otp_value: 123123)
20+
```
21+
22+
## Response Body
23+
24+
```json
25+
{
26+
"txnId": "37ccfe4f-6703-4666-a6eb-25eb58909b5f",
27+
"mobileNumber": null
28+
}
29+
```
30+
31+
Once the OTP is verified, you can proceed to complete the HPR registration process.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# HPR Registration - Get Username Suggestions
2+
3+
This API provides username suggestions based on the Aadhaar information and transaction ID generated from the OTP verification step. It returns a list of suggested usernames that the user can choose from for their HPRID account.
4+
5+
## Parameters
6+
7+
- No parameter required for this step.
8+
9+
## Method
10+
11+
```ruby
12+
suggest_username()
13+
```
14+
15+
16+
## Request Body
17+
18+
```ruby
19+
@client.suggest_username
20+
```
21+
22+
## Response Body
23+
24+
```json
25+
[
26+
"bikashchoudhary",
27+
"choudhary1997",
28+
"bikashchoudhary2281997",
29+
"bikash.choudhary",
30+
"choudhary228"
31+
]
32+
```
33+
34+
Once the user selects a username from the suggested list, they can proceed with HPRID account creation.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# HPR Registration - Create HPRID
2+
3+
This API is used to generate the HPRID (Health Professional ID). The user needs to provide personal details, along with an encrypted email and password. The response will include the HPRID and access token.
4+
5+
## Parameters
6+
7+
- `email`: (String, required) - Encrypted email of the user.
8+
- `first_name`: (String, required) - User's first name.
9+
- `middle_name`: (String, optional) - User's middle name (if any).
10+
- `last_name`: (String, required) - User's last name.
11+
- `password`: (String, required) - Encrypted password of the user.
12+
- `profile_photo`: (String, optional) - Base64 encoded photo of the user.
13+
- `state_code`: (String, required) - User's state code.
14+
- `dist_code`: (String, required) - User's district code.
15+
- `pin_code`: (String, required) - User's pincode.
16+
- `hpr_id`: (String, required) - Desired HPR ID for the user.
17+
- `hp_category_code`: (Integer, required) - Health professional category code.
18+
- `hp_subcategory_code`: (Integer, required) - Health professional subcategory code.
19+
- `notify_user`: (Boolean, optional) - Whether to notify the user via email/SMS.
20+
21+
22+
## Method
23+
```ruby
24+
create_hprid(
25+
email:,
26+
first_name:,
27+
middle_name: nil,
28+
last_name:,
29+
password:,
30+
profile_photo:,
31+
state_code:,
32+
dist_code:,
33+
pin_code:,
34+
hpr_id:,
35+
hp_category_code:,
36+
hp_subcategory_code:,
37+
notify_user: true:
38+
)
39+
```
40+
41+
42+
## Request Body
43+
44+
```ruby
45+
@client.create_hprid(
46+
47+
first_name: 'John',
48+
middle_name: 'Doe',
49+
last_name: 'Smith',
50+
password: 'password123',
51+
profile_photo: '<BASE64 STRING>',
52+
state_code: '07',
53+
dist_code: '71',
54+
pin_code: '110001',
55+
hpr_id: '[email protected]',
56+
hp_category_code: 1,
57+
hp_subcategory_code: 1,
58+
notify_user: true
59+
)
60+
```
61+
62+
63+
## Response Body
64+
65+
```json
66+
{
67+
"token": "",
68+
"expiresIn": 1800,
69+
"refreshToken": "",
70+
"refreshExpiresIn": 10800,
71+
"hprIdNumber": "12-3456-7890-1234",
72+
"name": "John Smith",
73+
"gender": "M",
74+
"yearOfBirth": "1990",
75+
"monthOfBirth": "01",
76+
"dayOfBirth": "01",
77+
"firstName": "John",
78+
"hprId": "[email protected]",
79+
"lastName": "Smith",
80+
"middleName": "Doe",
81+
"stateCode": "07",
82+
"districtCode": "71",
83+
"stateName": "Delhi",
84+
"districtName": "South Delhi",
85+
"email": null,
86+
"mobile": "9012345678",
87+
"categoryId": 1,
88+
"subCategoryId": 1,
89+
"authMethods": [
90+
"AADHAAR_OTP",
91+
"DEMOGRAPHICS",
92+
"AADHAAR_BIO",
93+
"PASSWORD",
94+
"MOBILE_OTP"
95+
],
96+
"new": true,
97+
"categories": {}
98+
}
99+
```
100+
101+
Once the HPR ID is created, the user can authenticate and access other features provided by the HPRID platform.

0 commit comments

Comments
 (0)