Custom ScanDocument
Esta función permite escanear varios tipos de documentos al mismo tiempo.
Requiere configurar los valores de los registros de entrada que se muestran en la sección Registros de entrada.
ID de la función
Registro | Valor |
---|---|
110 | 3 |
Registros de entrada
Registro | Descripción | Obligatorio | Valor |
---|---|---|---|
390 | Lista de parámetros utilizada para configurar información visual como colores y textos en formato JSON. | Sí | La estructura del JSON debe ser la siguiente: [en] {
"country_code":"4",
"face_image_id":"faceimageid",
"front_image_id":"frontimageid",
"back_image_id":"backimageid",
"button_enabled_color":"#2E97F2",
"button_disabled_color":"#B3B3B3",
"json_messages_string":{
"card_message_front": "Position the front of the document within the frame",
"card_message_back": "Position the back of the document within the frame",
"dot_label_front": "Front",
"dot_label_back": "Back",
"main_button_clicked_text": "Scanning...",
"main_button_title_front": "Capture Front",
"main_button_title_back": "Capture Back",
"main_button_title_success": "Finished",
"card_message_success": "The document was successfully scanned"
},
"time_out_seconds":"",
"image_extension_factor":"0.1"
} |
391 | Lista de parámetros a leer en el escaneo. | Sí | Ejemplo 1: El JSON considera todos los parámetros como opcionales. Esto significa que, al leer el documento, si algún campo aparece vacío, la respuesta de la Call API en el registro de salida 112 no será Mandatory fields not found (103). La estructura del JSON debe ser la siguiente: [ { "document_type": "ID", "country" : "GUATEMALA", "document_fields": [ { "field_name": "document_type", "field_presence": "optional" }, { "field_name": "documentDataMatch", "field_presence": "optional" }, { "field_name": "date_of_birth", "field_presence": "optional", "field_type" : "date", "output_field_format": "dd-MM-yyyy" }, { "field_name": "date_of_expiry", "field_presence": "optional", "field_type" : "date", "output_field_format": "yyyy-MM-dd" }, { "field_name": "date_of_issue", "field_presence": "optional", "field_type" : "date", "output_field_format": "yyyy-dd-MM" }, { "field_name": "document_additional_number", "field_presence": "optional" }, { "field_name": "document_number", "field_presence": "optional" }, { "field_name": "back_document_number", "field_presence" : "optional" }, { "field_name": "front_document_number", "field_presence" : "optional" }, { "field_name": "first_name", "field_presence": "optional" }, { "field_name": "last_name", "field_presence": "optional" }, { "field_name": "nationality", "field_presence": "optional" }, { "field_name": "sex", "field_presence": "optional" }, { "field_name": "address", "field_presence": "optional" }, { "field_name": "mrz", "field_presence": "optional" }, { "field_name": "marital_status", "field_presence": "optional" }, { "field_name": "issuing_authority", "field_presence": "optional" }, { "field_name": "place_of_birth", "field_presence": "optional" }, { "field_name": "personal_id_number", "field_presence": "optional" }, { "field_name": "religion", "field_presence": "optional" }, { "field_name": "race", "field_presence": "optional" } ] } ] Ejemplo 2: El JSON considera dos tipos de documento diferentes: "ID" y "PASSPORT", donde todos los campos para el tipo "ID" están configurados como "always". Esto significa que no se espera que los campos "document_type", "document_data_match", "date_of_birth" y "date_of_expiry" estén vacíos. Si alguno de estos campos aparece vacío, la respuesta de la Call API en el registro de salida 112 será Mandatory fields not found (103). [ { "document_type": "ID", "country" : "GUATEMALA", "document_fields": [ { "field_name": "document_type", "field_presence": "always" }, { "field_name": "document_data_match", "field_presence": "always" }, { "field_name": "date_of_birth", "field_presence": "always", "field_type" : "date", "output_field_format": "dd-MM-yyyy" }, { "field_name": "date_of_expiry", "field_presence": "always", "field_type" : "date", "output_field_format": "yyyy-MM-dd" } ] }, { "document_type": "PASSPORT", "country" : "COLOMBIA", "document_fields": [ { "field_name": "date_of_issue", "field_presence": "optional", "field_type" : "date", "output_field_format": "yyyy-dd-MM" }, { "field_name": "document_additional_number", "field_presence": "optional" }, { "field_name": "document_number", "field_presence": "optional" }, { "field_name": "first_name", "field_presence": "optional" }, { "field_name": "last_name", "field_presence": "optional" }, { "field_name": "nationality", "field_presence": "optional" }, { "field_name": "sex", "field_presence": "optional" }, { "field_name": "address", "field_presence": "optional" }, { "field_name": "mrz", "field_presence": "optional" }, { "field_name": "marital_status", "field_presence": "optional" }, { "field_name": "issuing_authority", "field_presence": "optional" }, { "field_name": "place_of_birth", "field_presence": "optional" }, { "field_name": "personal_id_number", "field_presence": "optional" }, { "field_name": "religion", "field_presence": "optional" }, { "field_name": "race", "field_presence": "optional" } ] } ] |
Nota
En el registro 391, puedes utilizar la etiqueta field_presence con los valores "always" u "optional". Si la etiqueta se establece como always y vuelve vacía, la lectura no será válida y la respuesta de la Call API en el registro de salida 112 será Mandatory fields not found (103).
Registros de salida
Registro | Descripción | Valor | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
112 | Resultado de la Call |
| ||||||||||||||||||||||
290 | Devuelve | { "document_type":"PASSPORT", "document_data_match":"success", "date_of_birth":"21-07-1991", "date_of_expiry":"2027-08-29", "date_of_issue":"2022-30-08", "document_additional_number":"F815555555", "document_number":"3333333333", "name":"JOHN|DAVID", "last_name":"DOE|SMITH", "nationality":"CHILEAN", "sex":"M", "mrz":"P<<<<JOHN<DAVID<<<<<<<\n2062838650GTM9107212M2708296F8181129<<<<<<12\n", "issuing_authority":"MIGRATION DIRECTOR", "place_of_birth":"SANTIAGO", "personal_id_number":"2062838651801" } |