ID Document Extraction

Overview

The ID Document Extraction Verification service is designed to extract and verify information from various types of documents, such as ID Cards, Driver licenses, International Passports, and Voter cards. The service utilizes advanced Optical Character Recognition (OCR) technology to extract text and data from documents and then uses data validation and verification algorithms to ensure the accuracy and integrity of the extracted information. This article will guide you on how to integrate into the ID Document Extraction Verification Service.

🚧

Important

Before you proceed, ensure you review the prerequisites for integrating to our APIs for a more detailed guide.

API Endpoint

https://api.verified.africa/sfx-verify/v3/id-service/

Headers

HeaderTypeDescription
userIdStringThis is your user ID retrieved from the portal. Check the getting started article to understand how to retrieve your userId
apiKeyStringThis is your apiKey retrieved from the portal. Check the getting started article to understand how to retrieve your apiKey

Request

Request ParameterStatusDescriptionTest Data
verificationTypeRequiredThis field is used to identify the service being called. Ensure to use the value provided exactly as providedID-DOCUMENT-VERIFICATION-OCR-EXTRACT
idCardRequiredThis is the government issued card.base64Image
idCardTypeRequiredPASSPORTPASSPORT
{
    "verificationType": "ID-DOCUMENT-VERIFICATION-OCR-EXTRACT",
    "idCard":"data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAsUAAAGuCAYAAAB4EHscAAAAAXNSR0IA...",
  	"idCardType":"PASSPORT"
}

Response

Response ParameterTypeDescription
responseCodeStringPlease reference Response Codes page for details on all possible responses
descriptionStringThis is a description of the response received.
verificationTypeStringThe same verificationType passed in request will be returned here
verificationStatusStringThis field lets you know if the identity verification was successful. Options are:

VERIFIED: This means that the Document Extracted is valid.
PENDING This status means that the verification could not be completed. Refer to the responseCode for the specific failure reason
transactionStatusStringThis indicates the wallet debit status. The options are successful or failed.
transactionReferenceStringIf you supplied a transactionReference, the same will be returned here. Else, we would generate a reference and return that to you in this field.
responseJsonThis is a JSON containing all the actual response as retrieved from the service provider.
{
    "responseCode": "00",
    "description": "Success",
    "verificationType": "ID-DOCUMENT-VERIFICATION-OCR-EXTRACT",
    "verificationStatus": "VERIFIED",
    "transactionStatus": "SUCCESSFUL",
    "transactionReference": "1630321373727-1702304228480-f17dc191-ea3b-4ad8-af1d-6230e64f85f8",
    "transactionDate": "1702304232263",
    "searchParameter": null,
    "callBackUrl": null,
    "livenessScore": 0.0,
    "paymentRef": null,
    "response": {
        "icaoCode": "UGA",
        "documentName": "Uganda - Id Card (2014)",
        "documentType": "IDENTITY_CARD",
        "documentCountryName": "Uganda",
        "documentDescription": "Identity Card",
        "documentYear": "2014",
        "status": {
            "detailsOptical": {
                "docType": "Valid",
                "expiry": "Compromised",
                "imageQA": "Compromised",
                "mrz": "Not Done",
                "overallStatus": "Compromised",
                "pagesCount": "Valid",
                "security": "Not Done",
                "text": "Compromised",
                "vds": "Not Done"
            },
            "detailsRFID": {
                "overallStatus": "Not Done",
                "pace": "Not Done",
                "bac": "Not Done",
                "aa": "Not Done",
                "ca": "Not Done",
                "pa": "Not Done",
                "ta": "Not Done"
            },
            "optical": "Compromised",
            "overallStatus": "Compromised",
            "portrait": "Not Done",
            "rfid": "Not Done",
            "stopList": "Not Done"
        },
        "extractedDataList": [
            {
                "fieldType": "TEXT",
                "fieldName": "Sex",
                "value": "M"
            },
            {
                "fieldType": "TEXT",
                "fieldName": "Surname",
                "value": "SPECIMEN"
            },
            {
                "fieldType": "TEXT",
                "fieldName": "Date of Expiry",
                "value": "2015-04-01"
            },
            {
                "fieldType": "TEXT",
                "fieldName": "Personal Number",
                "value": "?234567891234"
            },
            {
                "fieldType": "TEXT",
                "fieldName": "Date of Birth",
                "value": "1964-09-29"
            },
            {
                "fieldType": "TEXT",
                "fieldName": "Age",
                "value": "59"
            },
            {
                "fieldType": "TEXT",
                "fieldName": "RemainderTerm",
                "value": "0"
            },
            {
                "fieldType": "TEXT",
                "fieldName": "Surname And Given Names",
                "value": "SPECIMEN MARTIN"
            },
            {
                "fieldType": "TEXT",
                "fieldName": "Nationality Code",
                "value": "STP"
            },
            {
                "fieldType": "TEXT",
                "fieldName": "Given Names",
                "value": "MARTIN"
            },
            {
                "fieldType": "TEXT",
                "fieldName": "Document Number",
                "value": "123456789"
            },
            {
                "fieldType": "TEXT",
                "fieldName": "Issuing State Code",
                "value": "UGA"
            },
            {
                "fieldType": "TEXT",
                "fieldName": "Nationality",
                "value": "Sao Tome and Principe"
            },
            {
                "fieldType": "TEXT",
                "fieldName": "Issuing State Name",
                "value": "Uganda"
            },
            {
                "fieldType": "IMAGE",
                "fieldName": "Portrait",
                "value": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBGQEZAAD/2wBDAAUDBAQEAw..."
            },
            {
                "fieldType": "IMAGE",
                "fieldName": "Ghost portrait",
                "value": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBGQEZAAD/2wBDAAUDBAQEAwU..."
            },
            {
                "fieldType": "IMAGE",
                "fieldName": "Signature",
                "value": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBGQEZAAD/2wBDAAUDBAQEAwU..."
            },
            {
                "fieldType": "IMAGE",
                "fieldName": "Document front side",
                "value": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBGQEZAAD/2wBDAAUDBAQEAwUE..."
            }
        ]
    },
    "faceMatch": null
}

What’s Next