Scan & Extract

Sub-module for scanning and extracting (OCR) the text present on the KYC documents of the consumer/partner/business.

Scan & Extract

Businesses can integrate with Decentro to extract information from a customer’s standard KYC document images as well as validate the same using the Validate APIs. The major benefit of this offering is that customers do not have to enter any information and business can just pre-fill the information from the document.

Decentro powers 2 flows here.
* Scan: This flow allows businesses to extract information from standard ID documents
* Scan & Verify: This flow allows businesses to extract information from standard ID documents as well as verify the same from the associated public repository

Documents Supported for OCR

Decentro supports the following documents for Scan & Extract.

  • PAN
  • Aadhaar
  • Driving License
  • Voter ID
  • Passport

Except for Aadhaar, all the documents mentioned above are supported in the Scan and Verify flow as well.

The platform using this API can configure the flows at an API level by setting kyc_validate = 1 in the API.

Currently, we support the following states for Driving License OCR:

  • Delhi
  • Karnataka
  • Madhya Pradesh
  • Rajasthan
  • Punjab
  • Bihar
curl --location --request POST 'https://in.staging.decentro.tech/kyc/scan_extract/ocr' \
--header 'client_id: <YOUR_CLIENT_ID>' \
--header 'client_secret: <YOUR_CLIENT_SECRET>' \
--header 'module_secret: <YOUR_KYC_AND_OB_MODULE_SECRET>' \
--header 'Content-Type: multipart/form-data' \
--form 'reference_id="eefa-abs1-0001-8914"' \
--form 'document_type="pan"' \
--form 'consent="Y"' \
--form 'consent_purpose="for bank account purpose only"' \
--form '[email protected]"/C:/Users/Dell/Downloads/pan_2.jpeg"' \
--form 'kyc_validate="1"'
{
  "ocrStatus": "SUCCESS",
  "status": "SUCCESS",
  "message": "KYC Details for PAN retrieved successfully",
  "ocrResult": {
    "cardNo": "<pan number>",
    "dateInfo": "03/04/1982",
    "dateType": "DOB",
    "fatherName": "<fathers name on pan>",
    "name": "<name on pan>"
  },
  "kycStatus": "SUCCESS",
  "kycResult": {
    "idNumber": "<pan number>",
    "idStatus": "VALID",
    "name": "<full name>"
  },
  "responseCode": "S00000",
  "requestTimestamp": "2021-07-21 22:04:54.087654 IST (GMT +0530)",
  "responseTimestamp": "2021-07-21 22:05:06.359946 IST (GMT +0530)",
  "decentroTxnId": "<decentroTxnId>"
}

Fetch OCR History

Decentro provides the feature to access the history of Scan & Extract done for a specific period and the status of the check.

curl --location --request GET 'https://in.staging.decentro.tech/kyc/scan_extract/history?from=2020-01-01&to=2020-06-03' \
--header 'client_id: <YOUR_CLIENT_ID>' \
--header 'client_secret: <YOUR_CLIENT_SECRET>' \
--header 'module_secret: <YOUR_KYC_AND_OB_MODULE_SECRET>'
{
    "status": "success",
    "count": 5,
    "searchDateRange": "2020-01-01 - 2020-06-03",
    "validations": [
        {
            "referenceId": "eefa-abs1-0001-0000",
            "validationDateTime": "2020-06-02 12:48:43",
            "entityType": "PERSON",
            "documentType": "PAN",
            "entityName": "<NAME>",
            "documentId": "<PAN_NUMBER>",
            "consentPurpose": "for bank account purpose only",
            "statusOfApiCall": "SUCCESS",
            "statusOfKycCheck": "SUCCESS"
        },
        {
            "referenceId": "eefa-abs1-0001-0001",
            "validationDateTime": "2020-06-02 12:49:26",
            "entityType": "PERSON",
            "documentType": "PAN",
            "entityName": "<NAME>",
            "documentId": "<PAN_NUMBER>",
            "consentPurpose": "for bank account purpose only",
            "statusOfApiCall": "SUCCESS",
            "statusOfKycCheck": "FAILURE"
        },
        {
            "referenceId": "eefa-abs1-0001-0002",
            "validationDateTime": "2020-06-02 12:50:27",
            "entityType": "PERSON",
            "documentType": "DRIVING_LICENSE",
            "entityName": "<NAME>",
            "documentId": "<DL_NUMBER>",
            "consentPurpose": "for bank account purpose only",
            "statusOfApiCall": "SUCCESS",
            "statusOfKycCheck": "FAILURE"
        },
        {
            "referenceId": "eefa-abs1-0001-0003",
            "validationDateTime": "2020-06-02 12:51:46",
            "entityType": "PERSON",
            "documentType": "VOTERID",
            "entityName": "<NAME>",
            "documentId": "<EPIC_NO>",
            "consentPurpose": "for bank account purpose only",
            "statusOfApiCall": "SUCCESS",
            "statusOfKycCheck": "FAILURE"
        },
        {
            "referenceId": "eefa-abs1-0001-0004",
            "validationDateTime": "2020-06-02 12:52:35",
            "entityType": "PERSON",
            "documentType": "AADHAAR",
            "entityName": "<NAME>",
            "documentId": "<AADHAAR_NUMBER>",
            "consentPurpose": "for bank account purpose only",
            "statusOfApiCall": "SUCCESS",
            "statusOfKycCheck": "SUCCESS"
        }
    ],
    "responseCode": "S00000",
    "requestTimestamp": "2020-06-02 12:55:01.136485",
    "responseTimestamp": "2020-06-02 12:55:01.201669"
    "decentroTxnId": "5296XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
}

Did this page help you?