Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New APIs #2

Open
ChakshuGautam opened this issue Jun 26, 2023 · 2 comments
Open

New APIs #2

ChakshuGautam opened this issue Jun 26, 2023 · 2 comments
Assignees

Comments

@ChakshuGautam
Copy link
Contributor

ChakshuGautam commented Jun 26, 2023

UserID - session (https://github.com/fingerprintjs/fingerprintjs) => Update this to benId once it gets resolved

/sendOTP/<ben ID> or <phoneNo + aadhaar last for digits> or <aadhaar> or <phoneNo>
/verifyOTP/<ben ID> or <phoneNo + aadhaar last for digits> or <aadhaar>or <phoneNo>
/getNoOfBenIDFromPhoneNo/<phoneNo>
/checkMapping/?phoneNo=&maskedAadhaar=
/udpateUserId/benId

  1. Hardware Verification (aadhaar, benId, phone)
  2. Hardware <> Ben ID Mapping Verification
@Amruth-Vamshi
Copy link
Contributor

Amruth-Vamshi commented Jun 26, 2023

APIs needed:

If OTP can be handled:
Endpoint: GET /sendOTP/<ben ID> or <phoneNo + aadhaar last for digits> or <aadhaar> or <phoneNo>

Response:

{
    status: "OK",
    error:null
}

Endpoint: POST /verifyOTP/<ben ID> or <phoneNo + aadhaar last for digits> or <aadhaar>or <phoneNo>

Body:

{
    otp: <random 4 digits>
}

Response:

{
    status: "OK",
    error:null
}

OR

{
    status: "NOT_OK",
    error: "Invalid OTP"
}

If above two API are not possible (We need an API that returns users mobile number which is linked to aadhaar or beneficiary ID)
Endpoint: GET /aadharMobileNumber/<aadhaarID> or <benID>

Response:

{
    status: OK,
    mobileNumber: <users_mobile_number>
    error:null
}

Usage:
Used in /getOtp and /verifyOtp apis to send opt via aadhaar or beneficiary Id


API to fetch number of beneficiary Ids linked to mobileNumber:
Endpoint : GET /benIDFromPhoneNo/<phoneNo>

Response:

{
    status:OK,
    beneficiary_Ids_count: <int>,
    error: null
}

Usage:
Used in /getOtp api when only mobile number is passed. To check whether the user has multiple beneficiary Ids or not.


API to check if given masked aadhaar is mapped to given mobileNumber:
Endpoint: GET /verifyAadhaarMobileNo/?phoneNo=&maskedAadhaar=

Response:

{
    aadhaar_status: true/false,
    error: null
}

Usage:
Used in /getOtp api to check if given masked aadhaar and phonenumber are linked or not.


API to get basic user details via given aadhaar/beneficiaryId/phoneNumber (or by sending just aadhaar)
Endpoints: GET /userDetails/<aadhaar/beneficiaryId/phoneNumber>

Response:

{
    status:OK,
    error:null,
    user: {
        fatherName: <string>,
        dateOfRegistration: <string/date>,
        dob: <string/data>,
        ...
    }
}

Usage:
Used at every message to get the user details while showing the status.


@ChakshuGautam
Copy link
Contributor Author

ChakshuGautam commented Jun 30, 2023

GET beneficiary status - POST
status/<aadhaar/beneficiaryId/phoneNumber/phoneNumber+Aadhaar>

Response: (error scenario)

{
    "status": false,
    "error": {
      "errorId": "1",
      "message": "Registered Professional"
    }
}

Response: (success scenario)

{
    "status": true,
    "error": null
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants