Document fields
📄 document_info – Detailed Field Reference
The document_info
object is part of the kyc_info.document
section and contains metadata about the scanned document, the method of extraction, and the base64 images.
🧾 document_info Fields
Field | Type | Description |
---|---|---|
document_type_code | array[int] | Unique IDs representing the types of documents scanned. |
document_type | array[string] | Document category names such as "Passport", "Driving License", etc. |
document_names | array[string] | Specific names of scanned documents (e.g., "Latvia - ID Card (2012)"). |
field_sources | array[string] | Sources used for data extraction: • M : MRZ• R : RFID• B : Barcode• V : Visual |
field_locales | JSON | Mapping of locale codes (e.g., "1062" ) to names (e.g., "Latvian" ). |
field_count | int | Number of fields successfully extracted. |
field_list | array[string] | List of extracted field names. |
document_images | JSON | Base64-encoded images and sources listed below. |
🖼️ document_images Subfields
Field | Type | Description |
---|---|---|
front_page | string | Base64 image of the front page of the document. |
back_page | string | Base64 image of the back page. |
signature_image | string | Signature image extracted from the document. |
portrait_image | string | Image used for face match (from RFID or visual). |
portrait_image_source | string | Indicates the source: V (Visual) or R (RFID). |
ghostportrait_image | string | Ghost portrait image if present. |
visualportrait_image | string | Visual-only portrait (fallback if RFID not available). |
📑 API Documentation: document_status
document_status
The document_status
object is part of the KYC API request under kyc_info.document
. It contains detailed status information about the scanned identity document and the results of various checks performed during document validation.
🔗 Location in Payload
kyc_info.document.document_status
📘 Field Descriptions
Field | Type | Description |
---|---|---|
error_list | array[string] | List of critical validation errors such as field extraction failures, expired document, etc. |
warning_list | array[string] | List of non-blocking issues or observations (e.g., missing optional fields). |
is_nfc_document | boolean | true if the scanned document contains an embedded NFC/RFID chip. |
nfc_scan_status | string | Status of the NFC scan. See list of possible values below. |
nfc_scan_status_reason | string | Explanation or cause for the NFC scan status. See list of possible reasons below. |
overall_document_status | string | Consolidated result of all validation checks: OK , ERROR , WARNING , NOT DONE . |
checks_performed | array[JSON] | Array of detailed validation and authenticity checks performed. See below. |
🧾 Possible Values: nfc_scan_status
nfc_scan_status
NFC SCAN UNSUPPORTED BY CONFIG
NFC SCAN NOT APPLICABLE
NFC SCAN UNSUPPORTED BY DEVICE
NFC SCAN PERFORMED
NFC SCAN ERROR
NFC SCAN BYPASSED
NFC SCAN TIMED OUT
🧾 Possible Values : nfc_scan_status_reason
nfc_scan_status_reason
The nfc_scan_status_reason
field appears under document_status
and provides a descriptive explanation for the outcome of the NFC scan.
Below are the values defined in the REL-ID KYC API documentation:
Reason | Description |
---|---|
NFC SCAN NOT ENABLED BY CONFIGURATION | The gateway or SDK config has disabled NFC scanning. |
NFC SCAN NOT SUPPORTED BY DEVICE | The device in use does not support NFC hardware. |
DOCUMENT IS NOT NFC COMPLIANT | The scanned document does not contain an RFID chip. |
NFC SDK NOT INITIALIZED | The mobile SDK failed to initialize the NFC component. |
NFC SDK INITIALIZATION FAILED | An internal error prevented the NFC SDK from starting. |
NFC SESSION TIMED OUT | The SDK timed out waiting for NFC interaction. |
NFC SCAN SUCCESSFUL | The document was successfully read via NFC. |
NFC SCAN FAILED | The scan started but failed due to communication errors. |
NFC SESSION CLOSED ABRUPTLY | The NFC session was closed unexpectedly by the device or user. |
These reasons are vital for troubleshooting document scan failures on mobile devices and determining whether fallback mechanisms (like barcode or visual extraction) were used.
🧾Possible Values : overall_document_status
overall_document_status
The overall_document_status
field appears under document_status
and provides the final result after all validation checks on the scanned document have been performed.
This field helps backend systems understand whether the document passed validation, had issues, or was not checked.
Value | Description |
---|---|
OK | All required fields were extracted and passed validation checks. The document is considered valid. |
ERROR | One or more critical validation checks failed (e.g., expired document, missing mandatory data). |
WARNING | Non-blocking issues detected. The document is usable but may have inconsistencies or missing optional fields. |
NOT DONE | Validation was skipped or incomplete. This could occur due to configuration settings, unsupported formats, or failure in early steps. |
overall_document_status
should be used by the enterprise to determine whether to accept, flag, or reject the identity document.
🧠 How is overall_document_status
calculated?
overall_document_status
calculated?The value of overall_document_status
is derived from the individual results of the following checks:
- NFC Scan
- Mandatory Check
- Unexpired Document Check
- Date of Birth Check
- Date of Issue Check
- Data Compliance Check
- Data Consistency Check
- Barcode Check
- Hologram Check
- Image Pattern Check
Each of these validations contributes to the final status, with critical failures typically resulting in ERROR
and minor issues in WARNING
.
🔍 API Documentation: checks_performed
checks_performed
The checks_performed
array appears under kyc_info.document.document_status
and lists the validation and authenticity checks performed on the scanned identity document.
Each check evaluates a specific aspect of the document and includes sub-details explaining the result and reasoning.
🔗 Location in Payload
kyc_info.document.document_status.checks_performed
📘 Description
Each element in the checks_performed
array is a structured object with the following fields:
Field | Type | Description |
---|---|---|
check_category | string | Category of the check. One of: Data Validation , Document Authenticity |
check_name | string | Specific check being performed. See Check Name Descriptions |
check_status | int/string | Result code or label: 0 = ERROR, 1 = OK, 2 = NOT DONE, 3 = WARNING |
check_detail | array[object] | List of detailed per-element check results. See below. |
🧾 Example
{
"check_category": "Data Validation",
"check_name": "Mandatory Data",
"check_status": 1,
"check_detail": [
{
"element": "Date of birth",
"status": "OK",
"detail": "Field is present and valid",
"actual_image": "<Base64>",
"etalon_image": "<Base64>",
"match_percentage": 95.0,
"lcidName": "Latin",
"source": "MRZ",
"source1": "MRZ",
"source2": "Visual"
}
]
}
🧪 check_detail
Fields
check_detail
FieldsEach item in check_detail
explains a field or image-level outcome.
Field | Type | Description |
---|---|---|
element | string | The field or document area being checked (e.g., "Date of birth") |
status | string | OK , ERROR , NOT DONE , WARNING |
detail | string | Explanation or observation from the check |
actual_image | string | Base64-encoded image captured from the document |
etalon_image | string | Base64 image used as reference template |
match_percentage | float | Match score (0–100) between actual and etalon |
lcidName | string | Locale or language of the field |
source | string | Source used in single-source checks (e.g., MRZ , Visual ) |
source1 | string | First source in multi-source comparison |
source2 | string | Second source in multi-source comparison |
actual_image
andetalon_image
: attribute will be extracted when the check category is "Document Authenticity” and the check name is "Image Pattern” or "Hologram"
🏷️ check_name
Descriptions
check_name
Descriptions🔹 Data Validation
Check Name | Description |
---|---|
Mandatory Data | Ensures all required identity fields are present and extracted. |
Unexpired Document | Verifies that the document is still valid and not past expiry. |
Date Of Birth | Validates that the date of birth is logically correct. |
Date Of Issue | Confirms that the issuance date is not in the future. |
Data Compliance | Cross-checks consistency of data between multiple sources (e.g., MRZ vs Visual). |
🔹 Document Authenticity
Check Name | Description |
---|---|
Hologram | Image-based verification of holographic security features. |
Image Pattern | Checks the design layout and visual format against known patterns. |
Barcode | Reads and validates any barcode present on the document. |
Data Consistency | Verifies that data fields match across different scan sources. |
The
checks_performed
section provides detailed insight into the integrity and authenticity of the submitted identity document.
🧾 API Documentation: identity_data
identity_data
The identity_data
field appears under kyc_info.document
in the REL-ID KYC API request payload. It provides a simplified key-value representation of the user's identity attributes extracted from the scanned document.
🔗 Location in Payload
kyc_info.document.identity_data
📘 Description
identity_data
offers a flat JSON structure that maps each extracted identity field (like name, date of birth, etc.) to its value. It is useful for quick integrations, form pre-fill, or UI display without needing to parse complex structures.
🧾 Example
{
"Document number": "PA1234567",
"Given name": "John",
"Surname": "Doe",
"Date of birth": "1990-01-01",
"Date of issue": "2020-01-01",
"Date of expiry": "2030-01-01",
"Nationality": "IND"
}
📑 Notes
- Field names are locale-dependent and document-specific (they may differ across document types or languages).
- Values are strings and directly reflect what was extracted from the document.
- If a field was not extractable or missing, it may not appear in the object.
- This structure is a simplified output; for detailed source and validation info, refer to
identity_data_details
.
✅ Use Cases
- Quickly populate identity forms or onboarding screens
- Provide fallback if
identity_data_details
is too complex or missing - Support frontend UI flows with minimal transformation
For deeper insights (source confidence, extraction method, validation status), use the corresponding
identity_data_details
section.
🗂️ API Documentation: identity_data_details
identity_data_details
The identity_data_details
field is part of the kyc_info.document
object in the REL-ID KYC API request. It provides a structured, locale-based breakdown of each extracted identity field, including validation status and extraction source metadata.
🔗 Location in Payload
kyc_info.document.identity_data_details
📘 Description
Unlike identity_data
, which provides a flat list of values, identity_data_details
offers an in-depth structure that shows the value, status, and source-wise breakdown of each extracted field.
🧾 Example Structure
{
"0": [
{
"field_name": "Surname",
"field_details": {
"field_value": "Doe",
"field_status": "OK",
"field_source_and_values": {
"M": "Doe",
"V": "Doe"
}
}
}
]
}
🧬 Field Descriptions
➤ Locale Code ("0"
, "1062"
, etc.)
"0"
, "1062"
, etc.)Each top-level key maps to a locale/language. Use document_info.field_locales
to resolve these.
➤ Field Object
Field | Type | Description |
---|---|---|
field_name | string | Name of the identity field (e.g., "Date of birth") |
field_details | object | Contains actual extracted value, status, and source mapping |
➤ field_details
Subfields
field_details
SubfieldsField | Type | Description |
---|---|---|
field_value | string | Final value resolved across sources |
field_status | string | OK , ERROR , NOT DONE — represents confidence in extraction |
field_source_and_values | JSON | Map of source types (e.g., M , V , R ) to values extracted from each |
✅ Use Cases
- Show exact field values from each scan source
- Run source-based trust scoring logic
- Debug field inconsistencies or OCR mismatches
- Multi-language/localization-aware field processing
Use
identity_data_details
when your application needs high-confidence, explainable field-level data integrity.
Updated 3 months ago