Show / Hide Table of Contents

Class CoreAPI

Multi-function ID verification API to verify document, its authenticity and face match the document with your user photo.

Inheritance
System.Object
CoreAPI
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IDAnalyzer
Assembly: IDAnalyzer.dll
Syntax
public class CoreAPI

Constructors

| Improve this Doc View Source

CoreAPI(String, String)

Initialize Core API with an API key and optional region (US, EU)

Declaration
public CoreAPI(string apikey, string region = "US")
Parameters
Type Name Description
System.String apikey

You API key

System.String region

US/EU

Methods

| Improve this Doc View Source

EnableAMLCheck(Boolean)

Check document holder's name and document number against ID Analyzer AML Database for sanctions, crimes and PEPs.

Declaration
public void EnableAMLCheck(bool enabled = false)
Parameters
Type Name Description
System.Boolean enabled

Enable or disable AML check

| Improve this Doc View Source

EnableAMLStrictMatch(Boolean)

By default, entities with identical name or document number will be considered a match even though their birthday or nationality may be unknown. Enable this parameter to reduce false-positives by only matching entities with exact same nationality and birthday.

Declaration
public void EnableAMLStrictMatch(bool enabled = false)
Parameters
Type Name Description
System.Boolean enabled

Enable or disable AML strict match mode

| Improve this Doc View Source

EnableAuthentication(Boolean, String)

Validate the document to check whether the document is authentic and has not been tampered, and set authentication module

Declaration
public void EnableAuthentication(bool enabled = false, string module = "2")
Parameters
Type Name Description
System.Boolean enabled

Enable or disable document authentication

System.String module

Authentication module version: "1", "2" or "quick"

| Improve this Doc View Source

EnableBarcodeMode(Boolean)

Disable Visual OCR and read data from AAMVA Barcodes only

Declaration
public void EnableBarcodeMode(bool enabled = false)
Parameters
Type Name Description
System.Boolean enabled

Enable or disable Barcode Mode

| Improve this Doc View Source

EnableDualsideCheck(Boolean)

Check if the names, document number and document type matches between the front and the back of the document when performing dual-side scan. If any information mismatches error 14 will be thrown.

Declaration
public void EnableDualsideCheck(bool enabled = false)
Parameters
Type Name Description
System.Boolean enabled

Enable or disable dual-side information check

| Improve this Doc View Source

EnableImageOutput(Boolean, Boolean, String)

Generate cropped image of document and/or face, and set output format [url, base64]

Declaration
public void EnableImageOutput(bool cropDocument = false, bool cropFace = false, string outputFormat = "url")
Parameters
Type Name Description
System.Boolean cropDocument

Enable or disable document cropping

System.Boolean cropFace

Enable or disable face cropping

System.String outputFormat

"url" or "base64"

| Improve this Doc View Source

EnableVault(Boolean, Boolean, Boolean, Boolean)

Save document image and parsed information in your secured vault. You can list, search and update document entries in your vault through Vault API or web portal.

Declaration
public void EnableVault(bool enabled = true, bool saveUnrecognized = false, bool noDuplicateImage = false, bool autoMergeDocument = false)
Parameters
Type Name Description
System.Boolean enabled

Enable or disable Vault

System.Boolean saveUnrecognized

Save document image in your vault even if the document cannot be recognized

System.Boolean noDuplicateImage

Automatically merge images with same document number into a single entry inside vault

System.Boolean autoMergeDocument

Prevent duplicated images from being saved

| Improve this Doc View Source

GenerateContract(String, String, Object)

Generate legal document using data from user uploaded ID

Declaration
public void GenerateContract(string templateId, string format = "PDF", dynamic prefillData = null)
Parameters
Type Name Description
System.String templateId

Contract Template ID displayed under web portal

System.String format

Output file format: PDF, DOCX or HTML

System.Object prefillData

Hashtable or JSON string, to autofill dynamic fields in contract template.

| Improve this Doc View Source

ResetConfig()

Reset all API configurations except API key and region.

Declaration
public void ResetConfig()
| Improve this Doc View Source

RestrictCountry(String)

Check if the document was issued by specified countries, if not error code 10 will be thrown. Separate multiple values with comma. For example "US,CA" would accept documents from United States and Canada.

Declaration
public void RestrictCountry(string countryCodes = "US,CA,UK")
Parameters
Type Name Description
System.String countryCodes

ISO ALPHA-2 Country Code separated by comma

| Improve this Doc View Source

RestrictState(String)

Check if the document was issued by specified state, if not error code 11 will be thrown. Separate multiple values with comma. For example "CA,TX" would accept documents from California and Texas.

Declaration
public void RestrictState(string states = "CA,TX")
Parameters
Type Name Description
System.String states

State full name or abbreviation separated by comma

| Improve this Doc View Source

RestrictType(String)

Check if the document was one of the specified types, if not error code 12 will be thrown. For example, "PD" would accept both passport and drivers license.

Declaration
public void RestrictType(string documentType = "DIP")
Parameters
Type Name Description
System.String documentType

P: Passport, D: Driver's License, I: Identity Card

| Improve this Doc View Source

Scan(String, String, String, String, String)

Scan an ID document with Core API, optionally specify document back image, face verification image, face verification video and video passcode

Declaration
public Task<JObject> Scan(string document_primary, string document_secondary = "", string biometric_photo = "", string biometric_video = "", string biometric_video_passcode = "")
Parameters
Type Name Description
System.String document_primary

Front of Document (File path, base64 content or URL)

System.String document_secondary

Back of Document (File path, base64 content or URL)

System.String biometric_photo

Face Photo (File path, base64 content or URL)

System.String biometric_video

Face Video (File path, base64 content or URL)

System.String biometric_video_passcode

Face Video Passcode (4 Digit Number)

Returns
Type Description
System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JObject>

Core API response data

| Improve this Doc View Source

SetAccuracy(Int32)

Set OCR Accuracy

Declaration
public void SetAccuracy(int accuracy = 2)
Parameters
Type Name Description
System.Int32 accuracy

0 = Fast, 1 = Balanced, 2 = Accurate, defaults to 2

| Improve this Doc View Source

SetAMLDatabase(String)

Specify the source databases to perform AML check, if left blank, all source databases will be checked. Separate each database code with comma, for example: un_sc,us_ofac. For full list of source databases and corresponding code visit AML API Overview.

Declaration
public void SetAMLDatabase(string databases = "au_dfat,ca_dfatd,ch_seco,eu_fsf,fr_tresor_gels_avoir,gb_hmt,ua_sfms,un_sc,us_ofac,eu_cor,eu_meps,global_politicians,interpol_red")
Parameters
Type Name Description
System.String databases

Database codes separated by comma

| Improve this Doc View Source

SetBiometricThreshold(Double)

Set the minimum confidence score to consider faces being identical

Declaration
public void SetBiometricThreshold(double threshold = 0.4)
Parameters
Type Name Description
System.Double threshold

Number between 0 to 1, higher value yields more strict verification

| Improve this Doc View Source

SetOCRImageResize(Int32)

Scale down the uploaded image before sending to OCR engine. Adjust this value to fine tune recognition accuracy on large full-resolution images. Set 0 to disable image resizing.

Declaration
public void SetOCRImageResize(int maxScale = 2000)
Parameters
Type Name Description
System.Int32 maxScale

Number of 0 or between 500~4000

| Improve this Doc View Source

SetParameter(String, Object)

Set an API parameter and its value, this function allows you to set any API parameter without using the built-in functions

Declaration
public void SetParameter(string parameterKey, dynamic parameterValue)
Parameters
Type Name Description
System.String parameterKey

Parameter key

System.Object parameterValue

Parameter value

| Improve this Doc View Source

SetVaultData(String, String, String, String, String)

Add up to 5 custom strings that will be associated with the vault entry, this can be useful for filtering and searching entries.

Declaration
public void SetVaultData(string data1 = "", string data2 = "", string data3 = "", string data4 = "", string data5 = "")
Parameters
Type Name Description
System.String data1

Custom data field 1

System.String data2

Custom data field 2

System.String data3

Custom data field 3

System.String data4

Custom data field 4

System.String data5

Custom data field 5

| Improve this Doc View Source

ThrowAPIException(Boolean)

Raise APIException when API returns error

Declaration
public void ThrowAPIException(bool throwException = false)
Parameters
Type Name Description
System.Boolean throwException

Enable or Disable APIException being thrown

| Improve this Doc View Source

VerifyAddress(String)

Check if supplied address matches with document.

Declaration
public void VerifyAddress(string address = "123 Sample St, California, US")
Parameters
Type Name Description
System.String address

Address requiring validation

| Improve this Doc View Source

VerifyAge(String)

Check if the document holder is aged between the given range.

Declaration
public void VerifyAge(string ageRange = "18-99")
Parameters
Type Name Description
System.String ageRange

Age range, example: 18-40

| Improve this Doc View Source

VerifyDOB(String)

Check if supplied date of birth matches with document.

Declaration
public void VerifyDOB(string dob = "1990/01/01")
Parameters
Type Name Description
System.String dob

Date of birth in YYYY/MM/DD

| Improve this Doc View Source

VerifyDocumentNumber(String)

Check if supplied document or personal number matches with document.

Declaration
public void VerifyDocumentNumber(string documentNumber = "X1234567")
Parameters
Type Name Description
System.String documentNumber

Document or personal number requiring validation

| Improve this Doc View Source

VerifyExpiry(Boolean)

Check if the document is still valid based on its expiry date.

Declaration
public void VerifyExpiry(bool enabled = false)
Parameters
Type Name Description
System.Boolean enabled

Enable or disable expiry check

| Improve this Doc View Source

VerifyName(String)

Check if supplied name matches with document.

Declaration
public void VerifyName(string fullName = "ELON MUSK")
Parameters
Type Name Description
System.String fullName

Full name requiring validation

| Improve this Doc View Source

VerifyPostcode(String)

Check if supplied postcode matches with document.

Declaration
public void VerifyPostcode(string postcode = "90001")
Parameters
Type Name Description
System.String postcode

Postcode requiring validation

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX