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

FieldTypeDescription
document_type_codearray[int]Unique IDs representing the types of documents scanned.
document_typearray[string]Document category names such as "Passport", "Driving License", etc.
document_namesarray[string]Specific names of scanned documents (e.g., "Latvia - ID Card (2012)").
field_sourcesarray[string]Sources used for data extraction:
M: MRZ
R: RFID
B: Barcode
V: Visual
field_localesJSONMapping of locale codes (e.g., "1062") to names (e.g., "Latvian").
field_countintNumber of fields successfully extracted.
field_listarray[string]List of extracted field names.
document_imagesJSONBase64-encoded images and sources listed below.

🖼️ document_images Subfields

FieldTypeDescription
front_pagestringBase64 image of the front page of the document.
back_pagestringBase64 image of the back page.
signature_imagestringSignature image extracted from the document.
portrait_imagestringImage used for face match (from RFID or visual).
portrait_image_sourcestringIndicates the source: V (Visual) or R (RFID).
ghostportrait_imagestringGhost portrait image if present.
visualportrait_imagestringVisual-only portrait (fallback if RFID not available).


📑 API Documentation: 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

FieldTypeDescription
error_listarray[string]List of critical validation errors such as field extraction failures, expired document, etc.
warning_listarray[string]List of non-blocking issues or observations (e.g., missing optional fields).
is_nfc_documentbooleantrue if the scanned document contains an embedded NFC/RFID chip.
nfc_scan_statusstringStatus of the NFC scan. See list of possible values below.
nfc_scan_status_reasonstringExplanation or cause for the NFC scan status. See list of possible reasons below.
overall_document_statusstringConsolidated result of all validation checks: OK, ERROR, WARNING, NOT DONE.
checks_performedarray[JSON]Array of detailed validation and authenticity checks performed. See below.

🧾 Possible Values: 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

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:

ReasonDescription
NFC SCAN NOT ENABLED BY CONFIGURATIONThe gateway or SDK config has disabled NFC scanning.
NFC SCAN NOT SUPPORTED BY DEVICEThe device in use does not support NFC hardware.
DOCUMENT IS NOT NFC COMPLIANTThe scanned document does not contain an RFID chip.
NFC SDK NOT INITIALIZEDThe mobile SDK failed to initialize the NFC component.
NFC SDK INITIALIZATION FAILEDAn internal error prevented the NFC SDK from starting.
NFC SESSION TIMED OUTThe SDK timed out waiting for NFC interaction.
NFC SCAN SUCCESSFULThe document was successfully read via NFC.
NFC SCAN FAILEDThe scan started but failed due to communication errors.
NFC SESSION CLOSED ABRUPTLYThe 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

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.

ValueDescription
OKAll required fields were extracted and passed validation checks. The document is considered valid.
ERROROne or more critical validation checks failed (e.g., expired document, missing mandatory data).
WARNINGNon-blocking issues detected. The document is usable but may have inconsistencies or missing optional fields.
NOT DONEValidation 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_statuscalculated?

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

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:

FieldTypeDescription
check_categorystringCategory of the check. One of: Data Validation, Document Authenticity
check_namestringSpecific check being performed. See Check Name Descriptions
check_statusint/stringResult code or label: 0 = ERROR, 1 = OK, 2 = NOT DONE, 3 = WARNING
check_detailarray[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

Each item in check_detail explains a field or image-level outcome.

FieldTypeDescription
elementstringThe field or document area being checked (e.g., "Date of birth")
statusstringOK, ERROR, NOT DONE, WARNING
detailstringExplanation or observation from the check
actual_imagestringBase64-encoded image captured from the document
etalon_imagestringBase64 image used as reference template
match_percentagefloatMatch score (0–100) between actual and etalon
lcidNamestringLocale or language of the field
sourcestringSource used in single-source checks (e.g., MRZ, Visual)
source1stringFirst source in multi-source comparison
source2stringSecond source in multi-source comparison

actual_image and etalon_image : attribute will be extracted when the check category is "Document Authenticity” and the check name is "Image Pattern” or "Hologram"


🏷️ check_name Descriptions

🔹 Data Validation

Check NameDescription
Mandatory DataEnsures all required identity fields are present and extracted.
Unexpired DocumentVerifies that the document is still valid and not past expiry.
Date Of BirthValidates that the date of birth is logically correct.
Date Of IssueConfirms that the issuance date is not in the future.
Data ComplianceCross-checks consistency of data between multiple sources (e.g., MRZ vs Visual).

🔹 Document Authenticity

Check NameDescription
HologramImage-based verification of holographic security features.
Image PatternChecks the design layout and visual format against known patterns.
BarcodeReads and validates any barcode present on the document.
Data ConsistencyVerifies 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

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

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.)

Each top-level key maps to a locale/language. Use document_info.field_locales to resolve these.


➤ Field Object

FieldTypeDescription
field_namestringName of the identity field (e.g., "Date of birth")
field_detailsobjectContains actual extracted value, status, and source mapping

field_details Subfields

FieldTypeDescription
field_valuestringFinal value resolved across sources
field_statusstringOK, ERROR, NOT DONE — represents confidence in extraction
field_source_and_valuesJSONMap 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.