Introduction Last updated: July 2023

Profilebridge APIs detect ID cards and supporting documents, such as bank statements that are used in the Indian financial services industry for customer and onboarding.

Inbound payload content type

Content-type application/json

Inbound payload request header for authentication for all APIs

Key Type Description Example
app_id string Uniquely Identifies which application the request is being sent from DemoApp
c_id string Unique client / customer code to identify the customer U7WxxcDxyzwHkBqe
s_id string Security ID to confirm service validity f1CsUe8Wu3qvZwY5nneN

Error code messages and error messages

Error Code Erorr Message Description
0 success Transaction was successful
101 Invalid Request Input parameter not supplied
102 Invalid File Input document parameter not supplied
103 API Authentication Failure Invalid Credentials
104 Invalid File Name Invalid character in the file name
105 Invalid Transaction ID Invalid character in the transaction ID
106 File Extension Not Received If file extension parameter is not sent in the API request
107 Unsupported File Type File type other than PDF, JPG, JPEG, PNG, TIF, TIFF, BMP
108 API Processing Error File save or read error / internal server error
109 Password Protected File PDF file is encrypted with password
110 Low Detection Score API unable to confidently establish document type

APIs

Primary Page Content Classifer


The primary page content classifier identifies the core component of a given page using image classification.

The payload details for Primary Page Content Classifer

Key Type Description Example
Inputdocument string Base-64 of the file Base-64
fileextension string File extension i.e .PDF, .TIFF, .tif, .png, .jpeg,.jpg .jpeg
filename string FileName prop.jpeg
txnid string Unique client / customer code to identify the customer 63767792671

Sample Request:


{
	"inputdocument": "/9j/4AAQSkZJRgABAQEAYABgAAD/4RCcRXhpZgAATU0AKgAAAAgABAE7AAIAAAAOAAAISodpAAQAAAABAAAIWJydAAEAAAAcA...",
	"fileextension": ".jpg",
	"filename": "images23.jpg",
	"txnid": "638238475901123326"	
}

Response details for Primary Page Content Classifer

Key Description
corelationid Unique id for the response
txnid Unique client / customer code to identify the customer
totalpages No of pages in the document
statuscode 0
error error code
objtype Detected document in the image i,e ID Card / Forms / Other

Sample Response:


{
  "corelationid": "0b60f4df-71c7-4fcc-83ee-d1824c48b987",
  "txnid": "638238475901123326",
  "totalpages": 1,
  "statuscode": 0,
  "error": "",
  "pagedetail": [
    {
      "pageno": 1,
      "objtype": "idcards",
      "score": 99
    }
  ]
}
Class Description
idcards If the primary page content contains one or more ID cards such as a PAN card or Aadhaar card
forms If the primary page content contains a form based image such a bank statement, passbook image, proposal form etc.
signature If the primary content contains a signature image or electronic signature signed on an agent tab/mobile device
people If the primary content contains a passport size photo, selfie, or image of a person posing for the camera during an agent visit
places If the primary content contains a picture of a house/building that an agent would take during a verification visit

ID Card Detection


Returns specific ID Cards found in files on a pagewise basis. Limited to one ID Type per page

The payload details for ID Card Detection

Key Type Description Example
inputdocument string Base-64 of the file Base-64
FileExtension string File extension i.e .PDF, .TIFF, .tif, .png, .jpeg, .jpg .PDF
FileName string FileName Prop.PDF
txnid string Unique client / customer code to identify the customer 12776

Sample Request:


{
	"inputdocument": "JVBERi0xLjUNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0Nhd...",
	"fileextension": ".pdf",
	"filename": "MultiDoc2",
	"txnid": "638238894503483222"	
}

Response details for ID Card Detection

Key Description
corelationid Unique id for the response
TotalPages No of pages in the document
Doctype Detect document in the page i.e Aadhaar,PAN,VoterID etc
statuscode 0

Sample Response:


{
  "corelationid": "58726825-ed8e-4d11-b494-685a3153f322",
  "txnid": "638238894335851358",
  "totalpages": 2,
  "pagedetail": [
    {
      "pageno": 1,
      "docdetail": [
        {
          "doctype": "Aadhaar",
          "score": 100
        },
        {
          "doctype": "Pan Card",
          "score": 100
        }
      ]
    },
    {
      "pageno": 2,
      "docdetail": [
        {
          "doctype": "Voter ID Card",
          "score": 100
        }
      ]
    }
  ],  
  "statuscode": 0,
  "error": ""
}
Class Description
Aadhaar Includes Aadhaar Card Front, Aadhaar Card Back, e-Aadhaar Download, & Aadhaar Card (Long Format) (Various Formats including PVC Card)
Driving Licence Indian driving licences for various states
PAN Card PAN Old format (White background), Blue Background, and Blue Background with QR code (both variants)
Voter ID Voter ID Card (Hologram with white Background & Barcode with Colourful Background)
Passport Passport (Global)
Oter ID Other ID cards (front or back) not included in the above list

Form Detection


Returns specific form types on a pagewise basis

The payload details for ID Card Detection

Key Type Description Example
inputdocument string Base-64 of the file Base-64
FileExtension string File extension i.e .PDF, .TIFF, .tif, .png, .jpeg, .jpg .PDF
FileName string FileName Prop.PDF
txnid string Unique client / customer code to identify the customer 12776

Sample Request:


{
	"inputdocument": "JVBERi0xLjUNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZ...",
	"fileextension": ".pdf",
	"filename": "MultiDoc2",
	"txnid": "638238894503483222"	
}

Response details for Form Detection

Key Description
corelationid Unique id for the response
TotalPages No of pages in the document
Doctype Detect form in the page i.e taxforms,bankstatement etc
statuscode 0

Sample Response:


{
  "corelationid": "58726825-ed8e-4d11-b494-685a3153f322",
  "txnid": "638238894335851358",
  "totalpages": 2,
  "pagedetail": [
    {
      "pageno": 1,
      "docdetail": [
        {
          "formtype": "taxfroms",
          "score": 100
        }
      ]
    },
    {
      "pageno": 2,
      "docdetail": [
        {
          "doctype": "bankstatement",
          "score": 100
        }
      ]
    }
  ],  
  "statuscode": 0,
  "error": ""
}
Category Description
bankstatement Full page scans of bank statements
passbook Full / half page scans of bank passbook front page (which typically include a photo and bank branch details)
taxforms Indian ITR tax forms
Other Other forms not included in the list
Passport Passport (Global)
Custom * Custom form training for enterprise specific form types such as proposal and claims forms

Data Extraction

PAN Card Extraction


Returns cropped images of Full Name, Parents Name, PAN Number, Face and Signature in base64.

The payload details for PANCard extraction

Key Type Description Example
inputdocument string Base-64 of the file Base-64
FileExtension string File extension i.e .PDF, .TIFF, .png, .jpeg, .jpg .PDF
FileName string FileName Prop.PDF
txnid string Unique client / customer code to identify the customer 12176

Sample Requset


{
    "inputdocument": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVW...",
    "fileextension":".jpg",
    "filename":"fc72-4db1-bb00-c3035dcb4063.PDF",
    "txnid":"12176"
}

Response details for PANCard extraction

Key Description
corelationid Unique id for the response
outputdocument Base-64 Data
status Pancard /pan card not found
statuscode 0

Sample Response


{
  "corelationid": "a4370cee-c151-418e-bd05-cde34b1c9adb",
  "error": "",
  "statuscode": 0,
  "totalpages": 1,
  "txnid": "638241974255493778",
  "DateOfBirth": "/uik9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgIC..",
  "DocName": "/9j/gfhgh4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgIC..",
  "FaceImage":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgIC..",
  "FullName":"/9j/54fh4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgIC..",
  "PanNo": "/9j/piull4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgIC..",
  "ParentName": "/9j/trycvb4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgIC..",
  "Signature":"/9j/opjjl4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgIC.."
}

VoterID Extraction


Returns cropped images of Full Name, Parents Name, Voter ID Number, Gender (If available), Date/Year of Birth, and Face

The payload details for VoterID extraction

Key Type Description Example
inputdocument string Base-64 of the file Base-64
FileExtension string File extension i.e .PDF , .TIFF, .tif, .png, .jpeg, .jpg .PDF
FileName string FileName Prop.PDF
txnid string Unique client / customer code to identify the customer 12156

Sample Requset


{
 "inputdocument": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVW...",   
 "fileextension":".png",
 "filename":"fc72-4db1-bb00-c3035dcb4063.PDF",
 "txnid": "12156"
}

Response details for VoterID extraction

Key Description
corelationid Unique id for the response
outputdocument Base-64 Data
statuscode 0

Sample Response


{
  "corelationid": "f84567b7-caef-4905-b7fe-9df90f5264cb",
  "error": "",
  "statuscode": 0,
  "totalpages": 1,
  "txnid": "638241976013055113",
  "DateOfBirth": "/9j/opjjl4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgIC..",
  "DocName": "/9j/opjjl4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgIC..",
  "FaceImage": "/9j/opjjl4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgIC..",
  "FullName": "/9j/opjjl4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgIC..",
  "Gender": "/9j/opjjl4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgIC..",
  "ParentName": "/9j/opjjl4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgIC..",
  "VoterIdNo": "/9j/opjjl4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgIC.."
}

Driving License Extraction


Returns cropped images of Full Name, Parents Name, Driving License Number, Issue Date, Expiry Date, Date of Birth Face Image, Signature,

The payload details for Driving license extraction

Key Type Description Example
inputdocument string Base-64 of the file Base-64
FileExtension string File extension i.e .PDF , .png, .jpeg, .jpg .PDF
FileName string FileName Prop.PDF
txnid string Unique client / customer code to identify the customer 95856

Sample Requset


{
    "inputdocument":"iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
    "fileextension":".bmp",
    "filename":"fc72-4db1-hhgT-c3035dcb4063.PDF",
    "txnid": "95856"
}

Response details for Driving license extraction

Key Description
corelationid Unique id for the response
outputdocument Base-64 Data
statuscode 0

Sample Response


{
  "corelationid": "48084713-7c9b-4e6a-bcc7-85990c42a848",
  "error": "",
  "statuscode": 0,
  "totalpages": 1,
  "txnid": "638241976846521688",
  "BloodGroup": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
  "DLNo": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
  "DateOfBirth": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
  "DateOfExpiry": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
  "DateOfIssue": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
  "FaceImage": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
  "FullAddress": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
  "FullName": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
  "ParentName": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
  "Signature":"iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu..."
}
    

Aadhaar Extraction


Returns cropped images for Full Name, Date/Year of Birth, Gender, Aadhaar Number, Face Image ,Address (Back side)

The payload details for Aadhaar extraction

Key Type Description Example
inputdocument string Base-64 of the file Base-64
FileExtension string File extension i.e .PDF, .TIFF, .tif, .png, .jpeg, .jpg .PDF
FileName string FileName Prop.PDF
txnid string Unique client / customer code to identify the customer 22876

Sample Request


{
 "inputdocument":"iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
 "fileextension":".jpg",
 "filename":"fc72-c3035dcb4063.PDF",
 "txnid": "637677"
}

Response details for Aadhaar extraction

Key Description
corelationid Unique id for the response
outputdocument Base-64 Data
statuscode 0

Sample Response


{
  "corelationid": "aa412c07-df00-4662-bf3a-6b6092d25e09",
  "error": "",
  "statuscode": 0,
  "totalpages": 1,
  "txnid": "638241977681866593",
  "AadhaarNo": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
  "DateOfBirth": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
  "FaceImage": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
  "FullName": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
  "Gender": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu..."
}
    

Aadhaar Masking Solution

A comprehensive, integrated solution that :


  • combines multiple APIs internally including document type detection and angle detection
  • incorporates preprocessing steps such as grayscale,binarization, and dilation optimize detection quality without increasing file size post masking.
  • applies masks to the first 8 digits of the Aadhaar number
  • returns the masked file in the original format ensuring that the original filesize is maintained so that the file can be overwritten in the system of record
  • returns the masking status on a file / page level basis (can be customized)
  • is supported by a back office portal with manual masking functionality and reporting

Inbound payload content type

Content-type application/json

Single File Processing


The payload details for Aadhaar masking (single file)

Key Type Description Example
inputdocument string Base-64 of the file Base-64
FileExtension string File extension i.e .PDF, .TIFF, .tif, .png, .jpeg, .jpg .PDF
FileName string FileName Prop.PDF
txnid string Unique client / customer code to identify the customer 22876

Sample Request


{
 "inputdocument":"iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
 "fileextension":".PDF",
 "filename":"fc72-c3035dcb4063.PDF",
 "txnid": "637677"
}

Response details for Aadhaar single file processing

Key Description
corelationid Unique id for the response
outputdocument Base-64 Data
statuscode 0

Sample Response


{
  "corelationid": "ec56dd3e-c2a0-418c-b714-524d3b6393fb",
  "doctype": "Aadhaar",
  "error": "",
  "filemaskingstatus": "Aadhaar Masked",
  "outputdocument": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL1hPYmplY3QvU3VidHlwZS9JbW...",
  "processingstatus": "SUCCESS",
  "statuscode": 0,
  "txnid": "638241978470405089"
}
    

Batch Mode Processing


Batch mode processing is designed for enterprises who need to process a large number for files in a smaller time frame. To accomplish multiple parallel processes are run across multiple servers.

Callback API


Callback API is designed for failure / review cases, and files that are pending processing which are in queue and may need to be pushed to an enterprise on a given schedule.

The payload details for Aadhaar extraction

Key Type Description Example
inputdocument string Base-64 of the file Base-64
FileExtension string File extension i.e .PDF, .TIFF, .tif, .png, .jpeg, .jpg .PDF
FileName string FileName Prop.PDF
txnid string Unique client / customer code to identify the customer 22876

Sample Request


{
 "inputdocument":"iVBORw0KGgoAAAANSUhEUgAAAoAAAAG5CAYAAAAeUIXbAAEN+ElEQVR42uydeZxd8/3/n5+z3m32JbssJokkJCKxVWOLUnu...",
 "fileextension":".PDF",
 "filename":"fc72-c3035dcb4063.PDF",
 "txnid": "637677"
}

Response details for Aadhaar extraction

Key Description
corelationid Unique id for the response
outputdocument Base-64 Data
statuscode 0

Sample Response


{
  "corelationid":"i03383157-fc72-4db1-bb00-c3035dcb4063",  
  "outputdocument":"",
  "status":"success",
  "statuscode":"0"
}