v1

latestOpenAPI 3.1.02026-07-2418201.6 MB

Document Extraction v2

post/v2/kyc/scan_extract/ocr

Headers

client_idstring required

ID/identifier that is provided by Decentro to a specific client and environment. Please note, this may change based on the environment you are on.

client_secretstring required

The confidential credential provided by Decentro that is associated with the client_id

content-typestring required

Request body

reference_idstring required

Any unique ID assigned by you for this API request.

document_typestring required

Can be PAN / DRIVING_LICENSE / VOTERID / AADHAAR / PASSPORT - Only capital letters allowed

consentstring required

Y/N based on the consent given by the customer. Mandatory as per regulation.

consent_purposestring required

The purpose of taking this consent from your customer. Mandatory as per regulation

kyc_validateinteger required

1/0 depending on whether you want us to run KYC check on the extracted ID number or not. 1 by default, if key is not present. Not applicable when document_type is aadhaar, as we need to do an offline verification of aadhaar.

documentstring binary required

The ID photo or file (can be in .pdf, .jpeg, .png). Please check for layout and clarity for higher success rates. Max. allowed file size: 6 MB. Mandatory if document_url is not present.

document_urlstring

The URL to the image of the document. Mandatory if document is not present.

document_backstring binary required

The ID photo (back image) in .pdf, .jpeg, .png format. Max. allowed file size: 6 MB. Mandatory when document is Aadhaar

document_back_urlstring

The URL to the back image of the document. Optional - to extract both side of a ID in single request.

Response

200

OR
OR
OR
OR
OR
OR
OR

Example response

{
  "ocrStatus": "SUCCESS",
  "status": "SUCCESS",
  "message": "Scan completed successfully.",
  "responseKey": "success_pan_ocr",
  "ocrResult": {
    "cardNo": "BNZPM2501F",
    "dateInfo": "16-07-1986",
    "dateType": "DOB",
    "fatherName": "DURAISAMY",
    "name": "D MANIKANDAN"
  },
  "kycStatus": "SUCCESS",
  "kycResult": {
    "idNumber": "BNZPM2501F",
    "idStatus": "VALID",
    "name": "DURAISAMY MANIKANDAN"
  },
  "responseCode": "S00000",
  "requestTimestamp": "2023-02-22 13:46:52.058236 IST (GMT +0530)",
  "responseTimestamp": "2023-02-22 13:46:54.289154 IST (GMT +0530)",
  "decentroTxnId": "DXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}