8.4.1 Passport Validation

This topic provides the information about the payload details for Passport Details validation service.

Passport Validation module extracts details in the passport like Country, Document Type, Name, First Name, Last Name, Gender, Date of Birth, Date of Issue and Date of expiry of the passport, Passport No and Issuing Authority if present in the passport along with Image metadata information like Image DPI, Resolution and Image Size. Then it calculates similarity scores for each input key value pairs with the extracted details. This module provides support for passports of various countries listed below:
  • USA passport and passport-card
  • UAE
  • INDIA
  • CANADA
  • AUSTRALIA
  • BANGLADESH

All the details in the passport/ passport-card (in case of USA) are extracted and validated using "/validateInformation" API

Brief of Working:

It takes "country", "key value pairs to be searched", "input documents" (including "document type" and "Base64 encoded image") of the passport as input. It internally generates processed text from the passport and extracts details like Name, First Name, Last Name, Gender, DOB, DOI and DOE, PP No. and Issuing Authority if present in the document. Along with the document details, it also gives image metadata information like Image DPI, Resolution and Size, etc. Then it calculates similarity scores for each input key value pairs with the extracted details. The output is represented in JSON format.

Input Request:

"/validateInformation" API -
  • Country, Array of key value pairs to be searched, Array of the documents (including Base64 encoded image and Document Type ("passport" in this case) for each document).
Sample Input Request:

{
    "country": "UAE",
    "search": [
        [
            {
              "key": "------name of key------"
             "value": "------value of key------"
            }
        ]
    ],
    "docs": [
        {
            "docType": "passport",
            "docBase64s": "------base64 encoded image string------"
        }
    ]
}

Note:

In case of USA, there are 2 types of documents: passport and passport-card. If the input document is of type passport-card, the docType should be mentioned as passport-card.

Output Response:

The output of "/validateInformation" API is the extracted details in the JSON format given below:

Sample Output Response:

{
    "documentDetails": [
        {
            "country": "UAE",
            "documents": {
                "document_1": [
                    [
                        {
                            "extractedValue": "7/11/2001",
                            "key": "dateOfBirth",
                            "similarityScore": 100.0,
                            "value": "7 Nov 2001"
                        },
                        {
                            "extractedValue": "12/6/2017",
                            "key": "dateOfissue",
                            "similarityScore": 100.0,
                            "value": "12 06 2017"
                        },
                        {
                            "extractedValue": "11/6/2022",
                            "key": "dateOfexpiry",
                            "similarityScore": 100.0,
                            "value": "11/06/2022"
                        },
                        {
                            "extractedValue": "SHAMA RASHED ABDULJALIL MOHAMED ALFAHIM",
                            "key": "nAME",
                            "similarityScore": 56.41,
                            "value": "SHAMA RASHED ABDULIALIL"
                        },
                        {
                            "extractedValue": "UNITED ARAB EMIRATES",
                            "key": "issuedCountry",
                            "similarityScore": 100.0,
                            "value": "UNITED ARAB EMIRATES"
                        }
                    ]
                ]
            }
        }
    ]
 }