Skip to main content

Veritran Docs

ScanDocument

Esta función inicia el escaneo del documento de identidad. Es una mejora de la función ScanCard.

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

2

Registros de entrada

Registro

Descripción

Obligatorio

Valor

390

Lista de parámetros en formato JSON.

Para obtener más información sobre cómo configurar los valores INPUT_COUNTRY_CODE, INPUT_BUTTON_ENABLED_COLOR, INPUT_BUTTON_DISABLED_COLOR e INPUT_JSON_MESSAGES_STRING, consulta los Registros de entrada de la función ScanCard.

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"
}

Nota

La key Image_extension_factor no es obligatoria. Si no se añade ninguna key, el valor por defecto configurado es 0.

Registros de salida

Registro

Descripción

Valor

112

Resultado de la llamada

-1

GENERIC_ERROR

000

NO_ERROR

2

INVALID_IMAGE_EXTENSION_FACTOR

102

PARAMS_ERROR

103

Mandatory fields not found: Campos obligatorios no encontrados en el documento escaneado.

130

UNKNOWN_COUNTRY_CODE

131

LICENSE_EXPIRED_ERROR

132

TIME_OUT_ERROR

133

UNSUPPORTED_VERSION_ERROR

200

CANCEL_ERROR

290

OUTPUT_DATA

El JSON tendrá una estructura diferente según el país:

Argentina

{"document_number":"","name":"","surname":"","gender":"","expiring_date":"","birth_date":"","raw_barcode_data":"","document_type":"","data_match_result":""}

Guatemala

{"document_number":"","name":"","surname":"","gender":"","nationality":"","issuing_date":"","birth_date":"","raw_barcode_data":"","document_type":"","data_match_result":""}

Colombia

{"document_number":"","name":"","surname":"","birth_date":"","issuing_date":"","place_of_birth":"","issuing_authority":"","gender":"","document_type":"","data_match_result":""}  

Chile

{"document_number":"","name":"","surname":"","birth_date":"","issuing_date":"","expiring_date":"","gender":"","nationality":"","run":"","document_type":"","data_match_result":""}

México

{"paternal_surname": "","register_year": "","name": "","maternal_surname": "","elector_key": "","data_match_result": "","validity": "","cic": "","emission_number": "","curp": "","ocr": "","document_type": ""}

Bolivia

{"document_type": "","document_number": "","issuing_date": "","expiring_date": "","issuing_authority":"","address": "","birth_date": "","full_name": "","marital_status": "","birth_place": "","profession": "","data_match_result": ""}

Valores posibles para data_match_result:

  • success: Ambas caras del documento pertenecen a la misma persona.

  • failed: Las caras del documento no pertenecen a la misma persona.

  • not_Performed: El SDK no admite la coincidencia debido al tipo de documento.