UNPKG

idanalyzer

Version:

ID Analyzer API client library, scan and verify global passport, driver license and identification card.

4,437 lines (1,064 loc) 51.6 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: CoreAPI</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: CoreAPI</h1> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span>CoreAPI<span class="signature">(apikey, region)</span><span class="type-signature"></span></h2> </header> <article> <div class="container-overview"> <h4 class="name" id="CoreAPI"><span class="type-signature"></span>new CoreAPI<span class="signature">(apikey, region)</span><span class="type-signature"></span></h4> <div class="description"> Initialize Core API with an API key and optional region (US, EU) </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>apikey</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="default"> </td> <td class="description last">You API key</td> </tr> <tr> <td class="name"><code>region</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="default"> US </td> <td class="description last">US/EU</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line64">line 64</a> </li></ul></dd> </dl> <h5>Throws:</h5> <div class="param-desc"> <span class="param-type">Error</span> </div> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="enableAMLCheck"><span class="type-signature"></span>enableAMLCheck<span class="signature">(enabled)</span><span class="type-signature"></span></h4> <div class="description"> Check document holder's name and document number against ID Analyzer AML Database for sanctions, crimes and PEPs. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>enabled</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="default"> false </td> <td class="description last">Enable or disable AML/PEP check</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line178">line 178</a> </li></ul></dd> </dl> <h4 class="name" id="enableAMLStrictMatch"><span class="type-signature"></span>enableAMLStrictMatch<span class="signature">(enabled)</span><span class="type-signature"></span></h4> <div class="description"> 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. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>enabled</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="default"> false </td> <td class="description last">Enable or disable AML strict match mode</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line196">line 196</a> </li></ul></dd> </dl> <h4 class="name" id="enableAuthentication"><span class="type-signature"></span>enableAuthentication<span class="signature">(enabled, module)</span><span class="type-signature"></span></h4> <div class="description"> Validate the document to check whether the document is authentic and has not been tampered, and set authentication module </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>enabled</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="default"> false </td> <td class="description last">Enable or disable Document Authentication</td> </tr> <tr> <td class="name"><code>module</code></td> <td class="type"> <span class="param-type">*</span> </td> <td class="default"> 2 </td> <td class="description last">Module: 1, 2 or quick</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line106">line 106</a> </li></ul></dd> </dl> <h5>Throws:</h5> <div class="param-desc"> <span class="param-type">Error</span> </div> <h4 class="name" id="enableBarcodeMode"><span class="type-signature"></span>enableBarcodeMode<span class="signature">(enabled)</span><span class="type-signature"></span></h4> <div class="description"> Disable Visual OCR and read data from AAMVA Barcodes only </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>enabled</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="default"> false </td> <td class="description last">Enable or disable Barcode Mode</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line358">line 358</a> </li></ul></dd> </dl> <h4 class="name" id="enableDualsideCheck"><span class="type-signature"></span>enableDualsideCheck<span class="signature">(enabled)</span><span class="type-signature"></span></h4> <div class="description"> 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. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>enabled</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="default"> false </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line167">line 167</a> </li></ul></dd> </dl> <h4 class="name" id="enableImageOutput"><span class="type-signature"></span>enableImageOutput<span class="signature">(cropDocument, cropFace, outputFormat)</span><span class="type-signature"></span></h4> <div class="description"> Generate cropped image of document and/or face, and set output format [url, base64] </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>cropDocument</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="default"> false </td> <td class="description last">Enable or disable document cropping</td> </tr> <tr> <td class="name"><code>cropFace</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="default"> false </td> <td class="description last">Enable or disable face cropping</td> </tr> <tr> <td class="name"><code>outputFormat</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="default"> url </td> <td class="description last">"url" or "base64", defaults to "url"</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line152">line 152</a> </li></ul></dd> </dl> <h5>Throws:</h5> <div class="param-desc"> <span class="param-type">Error</span> </div> <h4 class="name" id="enableVault"><span class="type-signature"></span>enableVault<span class="signature">(enabled, saveUnrecognized, noDuplicateImage, autoMergeDocument)</span><span class="type-signature"></span></h4> <div class="description"> 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. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>enabled</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="default"> true </td> <td class="description last">Enable or disable Vault</td> </tr> <tr> <td class="name"><code>saveUnrecognized</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="default"> false </td> <td class="description last">Save document image in your vault even if the document cannot be recognized.</td> </tr> <tr> <td class="name"><code>noDuplicateImage</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="default"> false </td> <td class="description last">Prevent duplicated images from being saved.</td> </tr> <tr> <td class="name"><code>autoMergeDocument</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="default"> false </td> <td class="description last">Automatically merge images with same document number into a single entry inside vault.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line372">line 372</a> </li></ul></dd> </dl> <h4 class="name" id="generateContract"><span class="type-signature"></span>generateContract<span class="signature">(templateId, format, prefillData)</span><span class="type-signature"></span></h4> <div class="description"> Generate legal document using data from user uploaded ID </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>templateId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="default"> </td> <td class="description last">Contract Template ID displayed under web portal</td> </tr> <tr> <td class="name"><code>format</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="default"> PDF </td> <td class="description last">Output file format: PDF, DOCX or HTML</td> </tr> <tr> <td class="name"><code>prefillData</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="default"> </td> <td class="description last">Object or JSON string, to autofill dynamic fields in contract template.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line419">line 419</a> </li></ul></dd> </dl> <h5>Throws:</h5> <div class="param-desc"> <span class="param-type">Error</span> </div> <h4 class="name" id="resetConfig"><span class="type-signature"></span>resetConfig<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Reset all API configurations except API key and region. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line84">line 84</a> </li></ul></dd> </dl> <h4 class="name" id="restrictCountry"><span class="type-signature"></span>restrictCountry<span class="signature">(countryCodes)</span><span class="type-signature"></span></h4> <div class="description"> 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. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>countryCodes</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="default"> US,CA,UK </td> <td class="description last">ISO ALPHA-2 Country Code separated by comma</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line315">line 315</a> </li></ul></dd> </dl> <h4 class="name" id="restrictState"><span class="type-signature"></span>restrictState<span class="signature">(states)</span><span class="type-signature"></span></h4> <div class="description"> 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. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>states</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="default"> CA,TX </td> <td class="description last">State full name or abbreviation separated by comma</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line329">line 329</a> </li></ul></dd> </dl> <h4 class="name" id="restrictType"><span class="type-signature"></span>restrictType<span class="signature">(documentType)</span><span class="type-signature"></span></h4> <div class="description"> 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. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>documentType</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="default"> DIP </td> <td class="description last">P: Passport, D: Driver's License, I: Identity Card</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line343">line 343</a> </li></ul></dd> </dl> <h4 class="name" id="scan"><span class="type-signature"></span>scan<span class="signature">()</span><span class="type-signature"> &rarr; {object}</span></h4> <div class="description"> Scan an ID document with Core API, optionally specify document back image, face verification image, face verification video and video passcode </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>options.document_primary</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Front of Document (File path, base64 content or URL)</td> </tr> <tr> <td class="name"><code>options.document_secondary</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Back of Document (File path, base64 content or URL)</td> </tr> <tr> <td class="name"><code>options.biometric_photo</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Face Photo (File path, base64 content or URL)</td> </tr> <tr> <td class="name"><code>options.biometric_video</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Face Video (File path, base64 content or URL)</td> </tr> <tr> <td class="name"><code>options.biometric_video_passcode</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Face Video Passcode (4 Digit Number)</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line440">line 440</a> </li></ul></dd> </dl> <h5>Throws:</h5> <div class="param-desc"> <span class="param-type">Error</span> </div> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">object</span> </dd> </dl> <h4 class="name" id="setAccuracy"><span class="type-signature"></span>setAccuracy<span class="signature">(accuracy)</span><span class="type-signature"></span></h4> <div class="description"> Set OCR Accuracy </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>accuracy</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="default"> 2 </td> <td class="description last">0 = Fast, 1 = Balanced, 2 = Accurate</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line93">line 93</a> </li></ul></dd> </dl> <h4 class="name" id="setAMLDatabase"><span class="type-signature"></span>setAMLDatabase<span class="signature">(databases)</span><span class="type-signature"></span></h4> <div class="description"> 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. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>databases</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="default"> 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 </td> <td class="description last">Database codes separated by comma</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line187">line 187</a> </li></ul></dd> </dl> <h4 class="name" id="setBiometricThreshold"><span class="type-signature"></span>setBiometricThreshold<span class="signature">(threshold)</span><span class="type-signature"></span></h4> <div class="description"> Set the minimum confidence score to consider faces being identical </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>threshold</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="default"> 0.4 </td> <td class="description last">float between 0 to 1</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line135">line 135</a> </li></ul></dd> </dl> <h5>Throws:</h5> <div class="param-desc"> <span class="param-type">Error</span> </div> <h4 class="name" id="setOCRImageResize"><span class="type-signature"></span>setOCRImageResize<span class="signature">(maxScale)</span><span class="type-signature"></span></h4> <div class="description"> 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. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>maxScale</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="default"> 2000 </td> <td class="description last">0 or 500~4000</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line122">line 122</a> </li></ul></dd> </dl> <h5>Throws:</h5> <div class="param-desc"> <span class="param-type">Error</span> </div> <h4 class="name" id="setParameter"><span class="type-signature"></span>setParameter<span class="signature">(parameterKey, parameterValue)</span><span class="type-signature"></span></h4> <div class="description"> Set an API parameter and its value, this function allows you to set any API parameter without using the built-in functions </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>parameterKey</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Parameter key</td> </tr> <tr> <td class="name"><code>parameterValue</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Parameter value</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line406">line 406</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> void </div> <h4 class="name" id="setVaultData"><span class="type-signature"></span>setVaultData<span class="signature">(data1, data2, data3, data4, data5)</span><span class="type-signature"></span></h4> <div class="description"> Add up to 5 custom strings that will be associated with the vault entry, this can be useful for filtering and searching entries. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>data1</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Custom data field 1</td> </tr> <tr> <td class="name"><code>data2</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Custom data field 2</td> </tr> <tr> <td class="name"><code>data3</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Custom data field 3</td> </tr> <tr> <td class="name"><code>data4</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Custom data field 4</td> </tr> <tr> <td class="name"><code>data5</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Custom data field 5</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line389">line 389</a> </li></ul></dd> </dl> <h4 class="name" id="verifyAddress"><span class="type-signature"></span>verifyAddress<span class="signature">(address)</span><span class="type-signature"></span></h4> <div class="description"> Check if supplied address matches with document. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>address</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="default"> 123 Sample St, California, US </td> <td class="description last">Address requiring validation</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line287">line 287</a> </li></ul></dd> </dl> <h4 class="name" id="verifyAge"><span class="type-signature"></span>verifyAge<span class="signature">(ageRange)</span><span class="type-signature"></span></h4> <div class="description"> Check if the document holder is aged between the given range. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>ageRange</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="default"> 18-99 </td> <td class="description last">Age range, example: 18-40</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line268">line 268</a> </li></ul></dd> </dl> <h5>Throws:</h5> <div class="param-desc"> <span class="param-type">Error</span> </div> <h4 class="name" id="verifyDOB"><span class="type-signature"></span>verifyDOB<span class="signature">(dob)</span><span class="type-signature"></span></h4> <div class="description"> Check if supplied date of birth matches with document. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>dob</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="default"> 1990/01/01 </td> <td class="description last">Date of birth in YYYY/MM/DD</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line248">line 248</a> </li></ul></dd> </dl> <h5>Throws:</h5> <div class="param-desc"> <span class="param-type">Error</span> </div> <h4 class="name" id="verifyDocumentNumber"><span class="type-signature"></span>verifyDocumentNumber<span class="signature">(documentNumber)</span><span class="type-signature"></span></h4> <div class="description"> Check if supplied document or personal number matches with document. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>documentNumber</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="default"> X1234567 </td> <td class="description last">Document or personal number requiring validation</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line216">line 216</a> </li></ul></dd> </dl> <h5>Throws:</h5> <div class="param-desc"> <span class="param-type">Error</span> </div> <h4 class="name" id="verifyExpiry"><span class="type-signature"></span>verifyExpiry<span class="signature">(enabled)</span><span class="type-signature"></span></h4> <div class="description"> Check if the document is still valid based on its expiry date. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>enabled</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="default"> false </td> <td class="description last">Enable or disable expiry check</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line206">line 206</a> </li></ul></dd> </dl> <h4 class="name" id="verifyName"><span class="type-signature"></span>verifyName<span class="signature">(fullName)</span><span class="type-signature"></span></h4> <div class="description"> Check if supplied name matches with document. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>fullName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="default"> ELON MUSK </td> <td class="description last">Full name requiring validation</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line233">line 233</a> </li></ul></dd> </dl> <h5>Throws:</h5> <div class="param-desc"> <span class="param-type">Error</span> </div> <h4 class="name" id="verifyPostcode"><span class="type-signature"></span>verifyPostcode<span class="signature">(postcode)</span><span class="type-signature"></span></h4> <div class="description"> Check if supplied postcode matches with document. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <