Identity Document Classification

ID Classification API can be used to classify the type of Indian Identity Document by either uploading a valid image or by giving a valid URL of the image.

Use Cases

This API can be used for the following -

  • To identify the type of ID of the Image
  • To perform accurate OCR by knowing the correct document type

Valid & Supported Documents

This API can identify the following documents only -

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

API Requirements

Supported Formats: This API supports a limited set of image extensions or file formats -

  • JPG
  • JPEG
  • PNG
  • PDF

Maximum File Size: This API supports an image with a max size of 6MB.

Sample Request & Response

curl --location --request POST 'https://in.staging.decentro.tech/v2/kyc/document_classification' \
--header 'client_id: <your_client_id>' \
--header 'client_secret: <your_client_secret>' \
--header 'module_secret: <your_module_secret>' \
--form 'reference_id="ABCDEF12345"' \
--form 'document_type="PAN"' \
--form 'consent="true"' \
--form 'consent_purpose="for bank account purpose only"' \
--form 'document=@"/path/to/file"'
{
    "decentroTxnId": "BC5CD047DB924564AD2B378F5B876963",
    "status": "SUCCESS",
    "responseCode": "S00000",
    "message": "ID classification successful. The document type matches with the document uploaded",
    "data": {
        "documentClassificationStatus": "SUCCESS",
        "idTypeClassified": "aadhaar"
    },
    "responseKey": "success_id_classification"
}