Previous Next JavaScript must be enabled to correctly display this content

## 6.3.2 Driving License Extraction

This topic provides the information about the payload details for Driving License Details extraction service.

Driving License Details Extraction module extracts information present in the Driving License such as Name, First Name, Last Name, Gender, Address, License No, Date of Birth, Date of Issue and Date of expiry of the license along with the image metadata information like Image DPI, Resolution and Size. Currently, we provide support for licenses of various countries listed below:

- UNITED STATES OF AMERICA
- UNITED KINGDOM
- CANADA
- AUSTRALIA
- BANGLADESH

All the details in the license are extracted using "/extractInformation" API.

Brief of Working:

The API accepts the "country", "document type" and "Base64 encoded image" of the license as input. It internally generates processed text from the license document and extracts details like Name, First Name, Last Name, Gender, DOB, DOI and DOE, License No. and Address, etc. Along with the document details, it also gives image metadata information like Image DPI, Resolution and Size. The output is represented in JSON format.

Input Request:

"/extractInformation" API -

- For a single image: Base64 encoded image, Country, Document Type (“License" in this case).
- For multiple images: Array of the Base64 encoded images, Country, Document Type ("License" in this case).

Sample Input Request:

    {
      "country": "US",
      "docType": "license",
      "docBase64s": [
        "------base64 encoded image------"
      ]
    }

Output Response:

The output for "/extractInformation" API is the extracted details in the JSON format given below:

Sample Output Response:

    {
     "documentDetails":
       [
        {
         "ImageInfo": {
          "file_size": "579.26 KB",
          "image_dpi": "",
          "image_resolution": "736x419",
          "information": "dpi info not available. Average Image Resolution. File size is proper."
          },
        "address": "918 N ROXBURY BEVERLY HILS CA 90210",
        "dateOfBirth": "6/8/1911",
        "dateOfExpiry": "6/8/2012",
        "dateOfIssue": "2/7/2010",
        "docType": "license",
        "firstName": "LUCILLE",
        "gender": "F",
        "identificationNumber": "B2201793",
        "issuedCountry": "UNITED STATES OF AMERICA",
        "issuingAuthority": "CALIFORNIA",
        "lastName": "BALL",
        "name": "LUCILLE BALL"
       }
      ]
    }

Note:

Even if Country and DocType not provided in the input request, the service tries to extract the Country Name and Document Type automatically. In case, if it is not able to extract it returns an exception/ error. This means either the quality of the document is not enough to extract all the details or resolution is poor.
Things to be taken care of:

- Make sure the base64 encoded image string of the input image is correct.
- Document Type provided in the input should be "license" only
- Specify the country name correctly for accurate extraction of details

Parent topic: Document Verification API Details