Skip to content

Response

You can get the response of the component in the detail.data.response field of the event object. For example:

const component = document.querySelector('document-reader');
function listener(event) {
    if (event.detail.action === 'PROCESS_FINISHED' && event.detail.data.status === 1) {
        const response = event.detail.data.response;
        console.log(response);
    }
}
component.addEventListener('document-reader', listener);

Response schema

root
└── lowLvlResponse
└── rawResponse       
└── status
└── images

lowLvlResponse and rawResponse are the processing results in the initial raw view. The result structure and parameters are described on the Response Schema.

Status

status
├── detailsOptical
│   ├── docType
│   ├── expiry
│   ├── imageQA
│   ├── mrz
│   ├── overallStatus
│   ├── pagesCount
│   ├── security
│   ├── text
│   └── vds
├── detailsRFID
│   ├── AA
│   ├── BAC
│   ├── CA
│   ├── PA
│   ├── PACE
│   ├── TA
│   └── overallStatus
├── optical
├── overallStatus
├── portrait
├── rfid
└── stopList
Parameter Description
detailsOptical.docType The check status if document type was recognized or not.
detailsOptical.expiry The document validity period verification status.
detailsOptical.imageQA The input images quality verification status.
detailsOptical.mrz MRZ verification: values validity, dates, checkdigits verification.
detailsOptical.overallStatus The summary of all optical results.
detailsOptical.pagesCount The number of scanned document pages, integer.
detailsOptical.security The authenticity verification status.
detailsOptical.text Text fields valitity: values validity for specific fields, cross-comparison of values from different sources, dates & checkdigits verification.
detailsOptical.vds The Visible Digital Seal verification status.
detailsRFID.AA The active authentication status.
detailsRFID.BAC The basics access control status.
detailsRFID.CA The chip authentication status.
detailsRFID.PA The passive authentication status.
detailsRFID.PACE The password authenticated connection establishment status.
detailsRFID.TA The terminal authentication status.
detailsRFID.overallStatus The summary of all RFID results.
optical The summary of all optical results. Same as detailsOptical.overallStatus.
overallStatus The summary of all results.
portrait The comparison status for portrait in the document against the live or external image.
rfid The summary of all RFID results. Same as detailsRFID.overallStatus.
stopList The verification status for the document data against the database.

Images

images
├── availableSourceList
│   ├── containerType
│   └── source
├── fieldList
│   ├── fieldName
│   ├── fieldType
│   ├── valueList
│   │   ├── containerType
│   │   ├── fieldRect
│   │   │   ├── bottom
│   │   │   ├── left
│   │   │   ├── right
│   │   │   └── top
│   │   ├── lightIndex
│   │   ├── originalPageIndex
│   │   ├── pageIndex
│   │   ├── source
│   │   └── value
Parameter Description
availableSourceList The list of available sources.
availableSourceList.containerType The source type, integer representation.
availableSourceList.source The source name, string representation.
fieldList The list of available graphic fields.
fieldList.fieldName The graphic field name, string representation.
fieldList.fieldType The graphic field type, integer representation.
fieldList.valueList The list of graphic field values.
fieldList.valueList.containerType The source type which the value belongs to, integer representation.
fieldList.valueList.fieldRect The field rectangular area coordinates on the image.
fieldList.valueList.lightIndex The lightning scheme.
fieldList.valueList.originalPageIndex Original page index.
fieldList.valueList.pageIndex The page index.
fieldList.valueList.source The source name which the value belongs to, string representation.
fieldList.valueList.value The image value, Base64 format.