Skip to main content

Veritran Docs

ScanDocument

This function initializes the scan of the identity document. It is an improvement to the ScanCard function.

It requires you to configure the input register values shown in the Input Registers section.

Function ID

Register

Value

110

2

Input Registers

Register

Description

Mandatory

Value

390

List of parameters in JSON format.

To learn more about how to set the INPUT_COUNTRY_CODE, INPUT_BUTTON_ENABLED_COLOR, INPUT_BUTTON_DISABLED_COLOR and INPUT_JSON_MESSAGES_STRING values, refer to the ScanCard function Input registers.

Yes

The JSON structure should be as follows:

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

Note

Image_extension_factor key is not mandatory. If no key is added, the default value configured is 0.

Output Registers

Register

Description

Value

112

Call Result

-1

GENERIC_ERROR

000

NO_ERROR

2

INVALID_IMAGE_EXTENSION_FACTOR

102

PARAMS_ERROR

103

Mandatory fields not found: Mandatory fields not found in the scanned document.

130

UNKNOWN_COUNTRY_CODE

131

LICENSE_EXPIRED_ERROR

132

TIME_OUT_ERROR

133

UNSUPPORTED_VERSION_ERROR

200

CANCEL_ERROR

290

OUTPUT_DATA

JSON with a different structure depending on the country:

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

Mexico

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

Possible values for data_match_result:

  • success: Both sides of the document belong to the same person.

  • failed: The sides of the document do not belong to the same person.

  • not_Performed: The SDK does not support the match due to the document type.