Additional APIs =============== Aadhaar ( Digilocker ) ---------------------- This API helps you fetch the Digilocker-verified documents for your customers. End users need not have a Digilocker account in advance to fetch the documents. If an individual does not have a Digilocker account, we will create an account on the go and fetch the documents. Experience for both types of customers will be exactly the same. The First API call creates a redirection link to go through the OTP Process. The second API call fetches the verification result using personId and requestId generated in the first step. Integration Steps +++++++++++++++++ STEP 1. INTEGRATION To integrate with this API and fetch documents from Digilocker you just need to make a single API call to fetch a particular document. Every document needs different input parameters for searching and downloading. STEP 2. REDIRECTING END USERS TO DIGILOCKER Response will include a re-direction URL that will redirect to Digilocker. This URL will need to be loaded for the end-user. Input of Aadhaar number and OTP needs to be done in the Digilocker environment and must not be handled on the client end. STEP 3. HANDLING DIGILOCKER RESPONSE Once you redirect the customers to the redirect_url, they should be prompted for the Digilocker sign-up/sign-in page, and then on successful sign-in, we will fetch the relevant docs and send the success/failure response over the catch hook whitelisted on the dashboard. Success / Failure Responses can also be fetched from the Get Verification Status Api. Although we would recommend using webhook approach to get real time updates of the verification process. Kindly make sure, your integration doesnt mask the redirection URL in any way. Get Redirection URL +++++++++++++++++++ **Method and URL** POST : https://api-dev.springscan.springverify.com/v4/databaseCheck **Headers** .. list-table:: :widths: 30 70 :header-rows: 1 * - Name - Description * - tokenKey - XXXXX ( To be generated from dashboard ) **Example Request** .. code-block:: bash curl --location 'https://api-dev.springscan.springverify.com/v4/databaseCheck' \ --header 'tokenKey: XXXXXXXXXX' \ --header 'Content-Type: application/json' \ --data '{ "docType": "ind_aadhaar", "name_match_threshold": 50, "success_parameters": [ "id_number" ], "manual_input": { "id_number": "XXXXXXX", "name": "XXXXXX", "dob": "YYYY-MM-DD", "address": "XXXXYYYYZZ" }, "sourceIsDigilocker": true }' **Example Response** .. code-block:: json { "message": "You dont have an active Digilocker token. Please use the below redirection to generate a digilocker Token", "redirection_url": "", "personId": "XXXXXXXXX", "requestId": "XXXXXXXXXXX" } This API creates a redirection link to go through the Digilocker flow which sends OTP to the registered Mobile Number and creates a new personId if not mentioned in the request. Get Verification Results +++++++++++++++++++++++++ **Method and URL** POST : https://api-dev.springscan.springverify.com/v4/databaseCheck **Headers** .. list-table:: :widths: 30 70 :header-rows: 1 * - Name - Description * - tokenKey - XXXXX ( To be generated from dashboard ) **Request Parameters** * sourceIsDigilocker Source is Digilocker to be true * personId pass from the first step ( personid should be of same instance that of request_id). * request_id pass from the first step. * success_parameter specifies the parameter that would determine whether verification based on matching of input with source was success or failure. If no parameter is specified the default parameter would be id_number which means that status will be successful if 'id_number' is matching with source. **Success Parameters** .. list-table:: :widths: 30 70 :header-rows: 1 * - Success Parameters - Values * - Default - id_number * - Supported - id_number, name **Response Description** matching_ocr_to_source: NA matching_manual_to_source: * id_number : true/false based on matching with source. * name : is a score in the range of 0-100. * address: is a score in the range of 0-100. personId and request_id are mandatory parameters. It is recommended to whitelist one catchhook at our end to get realtime updates about the verification process. The same can be done by logging onto the dashboard. Get Verification Status ++++++++++++++++++++++++ **Method and URL** GET : https://api-dev.springscan.springverify.com/v4/digilocker/getVerificationStatus/ **Headers** .. list-table:: :widths: 30 70 :header-rows: 1 * - Name - Description * - tokenKey - XXXXX ( To be generated from dashboard ) **Example Request** .. code-block:: bash curl --location 'https://api-dev.springscan.springverify.com/v4/digilocker/getVerificationStatus/XXXXXXX' \ --header 'tokenKey: XXXXXXXX' **Example Response** .. code-block:: json { "verificationStatus": "SUCCESS / USER_CANCELLED / AUTHENTICATION_FAILED / USER_DENIED_ACCESS / VERIFICATION_PENDING ", "data": "XXXXXXXXXXX" } This API is used to get current verification status of the request. RequestId is a mandatory param. Selfie Quality Detection ------------------------ **Method and URL** POST : https://api-dev.springscan.springverify.com/v4/checkFaceQuality **Headers** .. list-table:: :widths: 30 70 :header-rows: 1 * - Name - Description * - Authorization - Bearer + JWT ( Generated from Login API ) * - Token - XXXXX * - tokenKey - XXXXX ( To be generated from dashboard ) You can also run this API by passing the tokenKey (generated from Dashboard) in the headers instead of Authorization and token. **Example Request** .. code-block:: bash curl --location --request POST 'https://api-dev.springscan.springverify.com/v4/checkFaceQuality' \ --header 'tokenKey: XXXXXXXXXX' \ --header 'Content-Type: application/json' \ --data-raw '{ "selfie_image" : "", "personId": "XXXXXXXXXX" }' **Example Response** .. code-block:: json { "api_config": { "api_action": "selfie_quality", "api_doc_type": "face_image", "api_doc_face": "N/A", "api_status": "success", "api_status_code": 200, "api_status_description": "Okay", "request_id": "N/A", "created_at": "XXXXXXXXX", "completed_at": "XXXXXXXXXXXX", "person_id": "XXXXXXXXXXXXXXXXXXX" }, "success_config_matching": "N/A", "input_ocr": { "selfie_image": "" }, "input_manual": "N/A", "output_ocr": "N/A", "output_source": { "face_detected": "XXXX", "face_quality": "XXXX", "is_live": "XXXX", "face_coverage_score": "XX", "multiple_facces_detected": "XXXX", "selfie_url": "" }, "output_source_derived": "N/A", "matching_manual_to_source": "N/A", "matching_ocr_to_source": "N/A", "status": { "got_source_response": true, "status_matching": false, "status_based_on": "N/A", "status_matching_message": "Selfie Face recognition failed" } } Returns quality of selfie image **Input** * Selfie_image : url of selfie image. * Supported file type : png, jpeg, jpg, webp. **Output** * Face_detected : boolean output which represents whether was detected in the image . * Face_quality : representation regarding the quality of face in the image which can be good or bad. * Is_live : boolean output which represents whether the face detected in the image was stationary or in motion. * Face_coverage_score : contains value between 0-100 and represents extent of face in the input image. * Multiple_faces_detected : boolean output which represents whether multiple faces were detected in the image. * Selfie_url : url of the image which was provided as input.