🆔National ID OCR

This API provides Data Extraction for the Egyptian National ID.

Egyptian National ID OCR

POST https://<base-url>/api/v1.5/ocr/

Headers

Name
Type
Description

Content-Type*

string

application/json

Authentication*

string

Bearer <access-token>

Request Body

Name
Type
Description

document_type*

string

egy_nid

data*

object

Request details

{
    "result": 
    {
        "first_name": '<string>',
        "full_name": '<string>',
        "street": '<string>',
        "front_nid": '<string>',
        "serial_number": '<string>',
        "back_nid":'<string>',
        "release_date": '<string>',
        "gender": '<string>',
        "marital_status": '<string>'
        "profession": '<string>',
        "religion":'<string>',
        "husband_name": '<string>',
        "date_of_birth": '<string>',
        "age":'<int>',
        "birth_governarate": '<string>',
        "police_station": '<string'>,
        "governorate": '<string>',
        "expiry_date": '<string>',
    },
    
     "advanced_confidence": 
    {
        "is_face_fraud_detected": '<boolean>'
    },
  
   "document_verification_plus": 
   {
        "expired": '<boolean>',
        "front_data_validity": '<boolean>',
        "back_data_validity": '<boolean>',
        "is_front_greyscale": '<boolean>',
        "is_back_greyscale": '<boolean>'
    },
    
   "profession_analysis": 
   {
        "workplace": '<string>',
        "profession_categorization": '<string>',
    },
    
    "transaction_id": '<string>',
    "trials_remaining": '<int>'
}

Note: The object below is one of the parameters included in the request as mentioned in the previous section

data <object>
"bundle_key": "<bundle_key>",
"extras":[
            "advanced_confidence",
            "document_verification_plus",
            "profession_analysis"
    ],
"front_img": "<base64-encoded-image",
"back_img": "<base64-encoded-image",
"lang": "<string>"

Integration

  1. Download the JSON file from here.

  1. Open Postman and click on Import.

  1. Drop the JSON file.

  1. Click on "Egy NID OCR" then click on "Authorization" and replace the <access token> field with your access token and then click on "Body".

  1. After clicking on "Body", fill in the required fields then click Send.

Please note that the front and back images should be converted to base 64 format. This can be done via an online tool; https://base64.guru/converter/encode/image/jpg

Last updated