Skip to main content

Documentation

Step 6: Upload Document

Use the POST method to upload a document to an application field that requires uploading a file such as a scan of a driver’s license. The file must be a Base64-encoded image. Maximum size: 10 MB, and up to 8,000 pixels height or width. The permitted formats include .img, .jpeg, .jpg, .png, and .bmp.

Note

  • Run this method for each field that requires uploading a document.

  • When the upload succeeds, the file is automatically saved in the application.

  • See also Delete Uploaded Document

    • app_token

    • Identifier of the application. String starting with app_.

    • section

    • The section in the application. For example, shareholder.

    • field

    • The name of the field in the section. For example, ownership_ref_type.

    • file

    • Base64-encoded image of the document. Maximum size: 10 MB, and up to 8,000 pixels height or width. The permitted formats include *.img, *.jpeg, *.jpg, *.png, *.bmp.

    • original_file_name

    • Original file name of the image.

The response includes the file token identifier that should be used when it is required to delete this document (See also Delete Uploaded Document).

  • ERROR_MAX_FILE_ONE - You cannot upload more than 1 file.

  • ERROR_PATH_PARAMETERS_MISSING:ERROR_PATH_PARAMETERS_MISSING - [APP_TOKEN] -  The request attempted an operation, but one or more required path parameters were missing. The request was rejected. Corrective action: Assign valid values to all of the path parameters listed at the end of the error code.

  • ERROR_PATH_PARAMETERS_MISSING:ERROR_PATH_PARAMETERS_MISSING - [SECTION TOKEN OR SECTION_INDEX] - The request attempted an operation, but one or more required path parameters were missing. The request was rejected. Corrective action: Assign valid values to all of the path parameters listed at the end of the error code.

  • ERROR_PATH_PARAMETERS_MISSING:ERROR_PATH_PARAMETERS_MISSING - [FIELD_TOKEN OR FIELD_TYPE] - The request attempted an operation, but one or more required path parameters were missing. The request was rejected. Corrective action: Assign valid values to all of the path parameters listed at the end of the error code.

  • ERROR_PATH_PARAMETERS_MISSING:ERROR_PATH_PARAMETERS_MISSING - [FILE] - The request attempted an operation, but one or more required path parameters were missing. The request was rejected. Corrective action: Assign valid values to all of the path parameters listed at the end of the error code.

  • ERROR_PATH_PARAMETERS_MISSING:ERROR_PATH_PARAMETERS_MISSING - [ORIGINAL_FILE_NAME] - The request attempted an operation, but one or more required path parameters were missing. The request was rejected. Corrective action: Assign valid values to all of the path parameters listed at the end of the error code.

  • {base_uri}/verify/api/applications/documents/:app_token/:section/:field

  • Upload Document

  • curl -X POST
    {base_uri}/verify/api/applications/documents/app_a94f525027bf4f599dc6f640b231647b/shareholder/ownership_ref_type
    -H 'access_key: your-access-key-here'
    -H 'Content-Type: application/json'
    -H 'idempotency: your-idempotency-parameter-here'
    -H 'salt: your-random-string-here'
    -H 'signature: your-calculated-signature-here'
    -H 'timestamp: your-unix-timestamp-here'
    -H 'api_timestamp: your-unix-timestamp-here'
    -d '
    {
        "original_file_name": "ttt.asdvsd.asca.PNG",
        "file": "iVQmCC--"
    }
    '
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "a826224c-a500-436a-b5db-26556b6395a3"
        },
        "data": {
            "token": "file_2e9af8b8dbb94702be521ba7a1b41d83",
            "origin_name": "ttt.asdvsd.asca.PNG",
            "is_deleted": false
        }
    }