For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
HomeAPI Reference
HomeAPI Reference
  • Overview
    • API Overview
  • Vlens API
      • POSTExtract national ID front
      • POSTExtract national ID back
      • POSTExtract passport data
      • POSTExtract car license front (owner info)
      • POSTExtract car license back (vehicle specs)
      • POSTExtract driving license data
      • POSTMatch face against ID photo
      • POSTCompare two face images
      • POSTLiveness detection (three frames)
      • POSTExtract license plate text
      • POSTClassify document type
      • POSTAML validation
Dashboard
LogoLogo
Vlens APIOCR

Extract national ID front

||View as Markdown|
POST
https://api.vlenseg.com/v1/ocr/id/front
POST
/v1/ocr/id/front
$curl -X POST https://api.vlenseg.com/v1/ocr/id/front \
> -H "ApiKey: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "image": "/9j/4AAQSkZJRgABAQAAAQABAAD...",
> "getExtractedData": true
>}'
200OCR_idFront_example
1{
2 "services": {
3 "validations": {
4 "validation_errors": [
5 {
6 "field": "string",
7 "value": "string",
8 "errors": [
9 {
10 "code": 1,
11 "message": "string"
12 }
13 ]
14 }
15 ]
16 },
17 "spoofing": {
18 "fake": true
19 },
20 "classification": {
21 "doc_type": "string"
22 },
23 "liveness": true,
24 "AML": {
25 "AML_matched": true,
26 "data": [
27 {
28 "caseNo": "string",
29 "caseYear": 1,
30 "recordDate": "2024-01-15T09:30:00Z",
31 "fullName": "string",
32 "idNumber": "string",
33 "dateOfBirth": "2024-01-15T09:30:00Z",
34 "score": "string"
35 }
36 ]
37 },
38 "SRC": {
39 "isValid": true,
40 "errorCode": 1,
41 "errorKey": "string",
42 "errorMessage": "string"
43 }
44 },
45 "data": {
46 "isVerificationProcessCompleted": true,
47 "isDigitalIdentityVerified": true,
48 "deviceInfo": "string",
49 "user": {
50 "id": 1,
51 "name": "string",
52 "surname": "string",
53 "fullName": "string",
54 "userName": "string",
55 "emailAddress": "string",
56 "phoneNumber": "string",
57 "idNumber": "string",
58 "address": "string"
59 },
60 "idFrontData": {
61 "first_name": "string",
62 "last_names": "string",
63 "name": "string",
64 "first_name_english": "string",
65 "last_names_english": "string",
66 "name_english": "string",
67 "address": "string",
68 "address_1": "string",
69 "address_2": "string",
70 "address_english": "string",
71 "govern": "string",
72 "govern_english": "string",
73 "city": "string",
74 "district": "string",
75 "idNumber": "string",
76 "idKey": "string",
77 "dateOfBirth": "2024-01-15T09:30:00Z",
78 "gender": "string",
79 "transaction_id": "string",
80 "request_id": "string",
81 "client_transaction_id": "string"
82 },
83 "idBackData": {
84 "maritalStatus": "string",
85 "marital_status_english": "string",
86 "job": "string",
87 "job_english": "string",
88 "jobTitle": "string",
89 "job_title_english": "string",
90 "religion": "string",
91 "religion_english": "string",
92 "husbandName": "string",
93 "husbandName_english": "string",
94 "releaseDate": "2024-01-15T09:30:00Z",
95 "idExpiry": "2024-01-15T09:30:00Z",
96 "idNumber": "string",
97 "gender": "string",
98 "gender_english": "string",
99 "transaction_id": "string",
100 "request_id": "string",
101 "client_transaction_id": "string"
102 }
103 },
104 "error_code": 1,
105 "error_message": "string",
106 "error_descriptions": null
107}

Extract text and data from the front of an Egyptian national ID. Returns name (Arabic + English), ID number, date of birth, address, gender, and more.

Pass the returned transaction_id to id/back and liveness/multi to group the steps.

Was this page helpful?
Previous

Download contract PDF

Next

Extract national ID back

Built with

Authentication

ApiKeystring
Static API key issued to your tenant. Obtain from the Vlens dashboard.
AuthorizationBearer

Short-lived JWT. Obtain via:

  • /api/credentials/Login for admin / service tokens
  • /api/DigitalIdentity/Register or login for end-user tokens

Request

This endpoint expects an object.
imagestringRequired

Base64-encoded JPEG/PNG image of the document side.

name_check_valuestring or nullOptional

Optional name to cross-validate against OCR-extracted data.

transaction_idstring or nullOptionalformat: "uuid"

Continue an existing transaction. Omit to start a new transaction; the ID is returned in the response.

client_transaction_idstring or nullOptional
Your own reference ID for this verification transaction.
request_idstring or nullOptional
countrystring or nullOptional

ISO 3166-1 alpha-2 country code. Defaults to EG.

getExtractedDatabooleanOptionalDefaults to false

Include OCR-extracted fields in the response.

Response

Extracted ID front data.
servicesobject
Results from the various backend verification services.
dataobject
Combined result of the Digital Identity verification process.
error_codeinteger or null
error_messagestring or null
error_descriptionsany or null