> For the complete documentation index, see [llms.txt](https://docs.transactionlink.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.transactionlink.io/docs/v1/integrations/complycube/document-check.md).

# Document Check

### What kind of data I will get

By using this integration you will be able to verify identity customers' documents.

### Integration Scope

You can choose which of the document types user will be allowed to pass. These include

* national identity card
* driving licence
* passport
* resident permit

### Input

You can configure users' input that will be send to comply cube in order to get the most of the verifications.

<table><thead><tr><th width="156">Field</th><th>Description</th><th>Type</th><th>Required</th><th data-hidden>Description</th><th data-hidden>Required</th></tr></thead><tbody><tr><td>email</td><td>The client's email address.</td><td>string</td><td>Yes</td><td>Email address of the client.</td><td>Yes</td></tr><tr><td>mobile</td><td>The client's mobile number.</td><td>string</td><td>No</td><td>Client's mobile phone number.</td><td>No</td></tr><tr><td>telephone</td><td>The client's telephone number.</td><td>string</td><td>No</td><td>Client's telephone number.</td><td>No</td></tr><tr><td>joinedDate</td><td>The date and time when the client was registered with you. This is relevant for users that migrate existing customers. </td><td>string (format YYYY-MM-DD)</td><td>No</td><td>Date when the client joined (YYYY-MM-DD).</td><td>No</td></tr><tr><td><a href="#persondetails">personDetails</a></td><td>Primary details for a client of type person</td><td>object</td><td>Yes if client is of type person</td><td>Details about the individual client.</td><td></td></tr><tr><td><a href="#companydetails">companyDetails</a></td><td>Primary details for a client of type company</td><td>object</td><td>Yes if client is of type company</td><td>Details about the client's company.</td><td></td></tr><tr><td><a href="#address">address</a></td><td>Primary details of a client's address</td><td>object</td><td>Yes if proof of address check is selected</td><td>Address information related to the client.</td><td>Required when proof of address check selected</td></tr></tbody></table>

### PersonDetails&#x20;

<table><thead><tr><th>Field</th><th>Description</th><th>Type</th><th>Required</th><th data-hidden>Description</th></tr></thead><tbody><tr><td>firstName</td><td>The client's first name. </td><td>string</td><td>Yes (required when client is a person)</td><td>First name of the individual.</td></tr><tr><td>middleName</td><td>The client's middle name.</td><td>string</td><td>No</td><td>Middle name of the individual.</td></tr><tr><td>lastName</td><td>The client's last name.</td><td>string</td><td>Yes (required when client is a person)</td><td>Last name of the individual.</td></tr><tr><td>dob</td><td>The client's date of birth.</td><td>string (format YYYY-MM-DD)</td><td>No</td><td>Date of birth (YYYY-MM-DD).</td></tr><tr><td>gender</td><td>The client's gender.</td><td>string (possible values include: male, female, other)</td><td>No</td><td>Gender of the individual.</td></tr><tr><td>nationality</td><td>The client's nationality.</td><td>string (2 letter country ISO code)</td><td>No</td><td>Nationality of the individual.</td></tr><tr><td>birthCountry</td><td>The client's birth country.</td><td>string (2 letter country ISO code)</td><td>No</td><td>Country of birth of the individual.</td></tr><tr><td>ssn</td><td>The client's SSN (Social Security Number). This is for US clients.</td><td>string</td><td>No</td><td>Social Security Number (if applicable).</td></tr><tr><td>socialInsuranceNumber</td><td>The client's Social Insurance Number. </td><td>string</td><td>No</td><td>Social Insurance Number (if applicable).</td></tr><tr><td>nationalIdentityNumber</td><td>The client's National Identity Number.</td><td>string</td><td>No</td><td>National Identity Number (if applicable).</td></tr><tr><td>taxIdentificationNumber</td><td>The client's Tax Identification Number (TIN).</td><td>string</td><td>No</td><td>Tax Identification Number (if applicable).</td></tr></tbody></table>

### CompanyDetails

| Field                | Description                                | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Required                            |
| -------------------- | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| name                 | Name of the company.                       | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes (required if client is company) |
| website              | Website of the company.                    | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | No                                  |
| registrationNumber   | Registration number of the company.        | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | No                                  |
| incorporationCountry | Country where the company is incorporated. | string (2 letter country ISO code)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | No                                  |
| incorporationType    | Type of incorporation of the company.      | <p>string (possible values include: </p><p></p><ol><li><code>sole\_proprietorship</code></li><li><code>private\_limited\_company</code></li><li><code>public\_limited\_company</code></li><li><code>limited\_partnership</code></li><li><code>holding\_company</code></li><li><code>non\_government\_organisation</code></li><li><code>statutory\_company</code></li><li><code>subsidiary\_company</code></li><li><code>unlimited\_partnership</code></li><li><code>charitable\_incorporated\_organisation</code></li><li><code>chartered\_company)</code></li></ol> | No                                  |

### Input Example&#x20;

```
{
    "email": "test@transactionlink.io",
    "personDetails": {
        "firstName": "Jan",
        "lastName": "Kowalskii"
    }
}
```

### Output

| Attribute                      | Type   | Description                  |
| ------------------------------ | ------ | ---------------------------- |
| [client](#client)              | object | Comply Cube client details.  |
| [checksResult](#checks-result) | map    | Results of performed checks. |

### Client

<table><thead><tr><th>Attribute</th><th width="260.3333333333333">Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>The unique identifier for a client.</td></tr><tr><td>type</td><td><p>string, possible values include:</p><ul><li><code>person</code></li><li><code>company</code></li></ul></td><td>The type of client. </td></tr><tr><td>entityName</td><td>string</td><td>The client's full name.</td></tr><tr><td>email</td><td>string</td><td>The client's email address.</td></tr><tr><td><a href="#person-details">personDetails</a></td><td>object</td><td>Details for a client of type <code>person</code>.</td></tr><tr><td>companyDetails</td><td>object</td><td>Details for a client of type <code>company</code>.</td></tr><tr><td>createdAt</td><td>string</td><td>The date and time when the client was created.</td></tr><tr><td>updatedAt</td><td>string</td><td>The date and time when the client was updated.</td></tr></tbody></table>

### Person Details

| Attribute | Type   | Description              |
| --------- | ------ | ------------------------ |
| firstName | string | The client's first name. |
| lastName  | string | The client's last name.  |

### Company Details

| Attribute | Type   | Description        |
| --------- | ------ | ------------------ |
| name      | string | The client's name. |

### Checks Result

| Attribute                        | Type   | Description                   |
| -------------------------------- | ------ | ----------------------------- |
| [documentCheck](#document-check) | string | Result of the document check. |

### Document Check

| Attribute                                                       | Type                                                                                                                                                                                                      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| state                                                           | <p>string, possible values include: </p><ul><li><code>INIT</code></li><li><code>IN\_PROGRESS</code></li><li><code>ERROR</code></li><li><code>FAILED</code></li><li><code>FINISHED</code></li></ul><p></p> | The status of the client's verification                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [document](#document)                                           | object                                                                                                                                                                                                    | Document which was used to verification process.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| files                                                           | links                                                                                                                                                                                                     | Links that allow to download client's documents.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| outcome                                                         | <p>string, possible values include: </p><ul><li>clear</li><li>attention</li><li>not\_processed</li></ul>                                                                                                  | <p></p><p>The outcome attribute represents the overall check result. Returned values include:</p><ol><li><code>clear</code>: Indicates every <a href="https://docs.complycube.com/documentation/checks/document-check#analysis-performed">analysis type</a> conducted returned a successful result, and hence the document is authentic.</li><li><code>attention</code>: Indicates at least one of the analysis results requires attention.</li><li><p><code>not\_processed</code>: Indicates that ComplyCube was not able to process the images. Reasons include:</p><ul><li>The image is of <strong>low</strong> <strong>quality</strong>.</li><li>The image is <strong>blurred</strong> or <strong>glared</strong>.</li><li>The image is at an <strong>angle</strong>.</li><li>The <strong>ID type and country</strong> provided do not correspond with the actual document provided uploaded. </li></ul></li></ol> |
| [breakdown](#breakdown)                                         | object                                                                                                                                                                                                    | Details of verification.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [mrzAnalysis](#mrz-analysis)                                    | object                                                                                                                                                                                                    | The MRZ analysis results.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [consistencyAnalysis](#consistencyanalysis-object)              | object                                                                                                                                                                                                    | The consistency analysis results.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [contentAnalysis](#content-analysis)                            | object                                                                                                                                                                                                    | The content analysis results.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [formatAnalysis](#format-analysis)                              | object                                                                                                                                                                                                    | The format analysis results.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [forensicAnalysis](#forensic-analysis)                          | object                                                                                                                                                                                                    | The forensic analysis results.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [frontAndBackAnalysis](#front-and-back-analysis)                | object                                                                                                                                                                                                    | The front and back of the image analysis results.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [clientValidation](#client-validation)                          | object                                                                                                                                                                                                    | The client validation results.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [extractedImages](#extracted-images)                            | array\<object>                                                                                                                                                                                            | The images extracted from the document.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [securityAndPatternAnalysis](#securityandpatternanalysis-array) | object                                                                                                                                                                                                    | The security and pattern analysis results.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

### Document

| Attribute      | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Description                                                                                                                       |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| type           | <p>string,</p><p>valid values include:</p><ol><li><code>passport</code></li><li><code>driving\_license</code></li><li><code>national\_insurance\_number</code></li><li><code>social\_security\_number</code></li><li><code>utility\_bill</code></li><li><code>tax\_identification\_number</code></li><li><code>national\_identity\_card</code></li><li><code>visa</code></li><li><code>polling\_card</code></li><li><code>residence\_permit</code></li><li><code>birth\_certificate</code></li><li><code>bank\_statement</code></li><li><code>change\_of\_name</code></li><li><code>tax\_document</code></li><li><code>company\_confirmation\_statement</code></li><li><code>company\_annual\_accounts</code></li><li><code>company\_statement\_of\_capital</code></li><li><code>company\_change\_of\_address</code></li><li><code>company\_incorporation</code></li><li><code>company\_change\_of\_officers</code></li><li><code>company\_change\_of\_beneficial\_owners</code></li><li><code>unknown</code></li><li><code>other</code></li></ol> | The type of document.                                                                                                             |
| issuingCountry | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | The document's issuing country. This will be the [two-letter country ISO code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). |
| createdAt      | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | The date and time when the document was created.                                                                                  |
| updatedAt      | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | The date and time when the document was updated.                                                                                  |

### Breakdown

| Attribute                               | Type   | Description                                                                                                                     |
| --------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------- |
| [extractedData](#extracted-data)        | object | The data extracted using [Optical Character Recognition (OCR)](https://en.wikipedia.org/wiki/Optical_character_recognition).    |
| [allExtractedData](#all-extracted-data) | object | All the data extracted from the document, including data in native scripts, organized by source (e.g. Visual, MRZ, and barcode) |

### Extracted Data

| Attribute                            | Type   | Description                           |
| ------------------------------------ | ------ | ------------------------------------- |
| [documentDetails](#document-details) | object | Data relating to the document.        |
| [holderDetails](#holder-details)     | object | Data relating to the document holder. |

### Document Details

| Property                | Type                                                                                                                                                                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                                            |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| documentType            | <p></p><p>string, possible values include: </p><ul><li><code>passport</code></li><li><code>driving\_license</code></li><li><code>national\_identity\_card</code></li><li><code>residence\_permit</code></li><li><code>visa</code></li><li><code>unidentified</code></li></ul> | Detected document type.                                                                                                                                                                                                                                                                                                                                                |
| hasTwoSides             | boolean                                                                                                                                                                                                                                                                       | A boolean indicating if both sides of the document were used for the analysis.                                                                                                                                                                                                                                                                                         |
| issuingCountry          | string                                                                                                                                                                                                                                                                        | The issuing country of the document. This will be the [two-letter country ISO code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).                                                                                                                                                                                                                                 |
| [expirationDate](#date) | object                                                                                                                                                                                                                                                                        | Expiry date of the document.                                                                                                                                                                                                                                                                                                                                           |
| documentNumber          | string                                                                                                                                                                                                                                                                        | Document number.                                                                                                                                                                                                                                                                                                                                                       |
| personalNumber          | string                                                                                                                                                                                                                                                                        | Personal number (if available).                                                                                                                                                                                                                                                                                                                                        |
| [issuingDate](#date)    | object                                                                                                                                                                                                                                                                        | Issuing date of the document.                                                                                                                                                                                                                                                                                                                                          |
| issuingPlace            | string                                                                                                                                                                                                                                                                        | Issuing place of the document.                                                                                                                                                                                                                                                                                                                                         |
| issuingAuthority        | string                                                                                                                                                                                                                                                                        | Issuing authority of the document.                                                                                                                                                                                                                                                                                                                                     |
| additionalDetails       | array                                                                                                                                                                                                                                                                         | Any additional details extracted from the document. This will be returned as an array of key/value pair objects.                                                                                                                                                                                                                                                       |
| documentDiscriminator   | string                                                                                                                                                                                                                                                                        | Document discriminator.                                                                                                                                                                                                                                                                                                                                                |
| cardAccessNumber        | string                                                                                                                                                                                                                                                                        | Card access number.                                                                                                                                                                                                                                                                                                                                                    |
| mrz                     | object                                                                                                                                                                                                                                                                        | <p></p><p>The <a href="https://en.wikipedia.org/wiki/Machine-readable_passport">Machine Readable Zone (MRZ)</a>, which is usually at the bottom of the identity page of a passport or the back of an identity card, can be up to 3 lines depending on the document type:</p><ul><li><code>line1</code></li><li><code>line2</code></li><li><code>line3</code></li></ul> |

### Holder Details

| Property                | Type                                                                                                                      | Description                                                                                                        |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| firstName               | array\<string>                                                                                                            | The list of first/given names as an array.                                                                         |
| lastName                | array\<string>                                                                                                            | The list of last names as an array.                                                                                |
| [dob](#date)            | object                                                                                                                    | The date of birth.                                                                                                 |
| age                     | number                                                                                                                    | The age of the document holder.                                                                                    |
| birthPlace              | string                                                                                                                    | Birthplace.                                                                                                        |
| nationality             | string                                                                                                                    | The nationality. This will be the [two-letter country ISO code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). |
| taxIdentificationNumber | string                                                                                                                    | Tax Identification Number (TIN).                                                                                   |
| healthInsuranceNumber   | string                                                                                                                    | Health insurance number.                                                                                           |
| gender                  | <p>string, values include: </p><ul><li><code>male</code></li><li><code>female</code></li><li><code>other</code></li></ul> | Gender of the document holder.                                                                                     |

### Date

| Attribute | Type   | Description                               |
| --------- | ------ | ----------------------------------------- |
| day       | number | The day of the month. Value range `1-31`. |
| month     | number | The month. Value range `1-12`.            |
| year      | number | The year, in `YYYY` format.               |

### All extracted Data

| Attribute             | Type   | Description                                                  |
| --------------------- | ------ | ------------------------------------------------------------ |
| [visual](#visual)     | object | All data extracted through the Visual Inspection Zone (VIZ). |
| [barcode](#breakdown) | object | All data extracted through the barcode or QR code.           |
| [mrz](#mrz-analysis)  | object | All data extracted through the MRZ.                          |

For each conducted analysis, the returned values include:

1. `clear`: Indicates the analysis returned a successful result.
2. `attention`: Indicates a potential falsified or fraudulent document.&#x20;
3. `not_processed`: Returned when the analysis does not apply to a document type, e.g. MRZ Analysis on a document without an MRZ. It will also be returned if ComplyCube does not support a given country's particular analysis for a document type.

### MRZ Analysis

| Attribute   | Type   | Description                                       |
| ----------- | ------ | ------------------------------------------------- |
| mrzFormat   | string | Indicates whether the MRZ checksum test is valid. |
| mrzChecksum | string | Indicates whether the MRZ checksum test is valid. |

### Consistency Analysis

| Attribute      | Type   | Description                                                                   |
| -------------- | ------ | ----------------------------------------------------------------------------- |
| lastName       | string | Indicates whether the first name on the document and MRZ are consistent.      |
| firstName      | string | Indicates whether the last name on the document and MRZ are consistent.       |
| dob            | string | Indicates whether the birth date on the document and MRZ are consistent.      |
| documentNumber | string | Indicates whether the document number on the document and MRZ are consistent. |
| personalNumber | string | Indicates whether the personal number on the document and MRZ are consistent. |
| expirationDate | string | Indicates whether the expiry date on the document and MRZ are consistent.     |
| issuingDate    | string | Indicates whether issuing date on the document and MRZ are consistent.        |

### Content Analysis

| Attribute      | Type   | Description                                                      |
| -------------- | ------ | ---------------------------------------------------------------- |
| dataIntegrity  | string | Indicates whether the extracted data passes our integrity check. |
| issuingDate    | string | Indicates whether issuing date has valid content.                |
| expirationDate | string | Indicates whether the expiration date has valid content.         |
| nationality    | string | Indicates whether nationality has valid content.                 |
| specimenCheck  | string | Indicates whether the content has been copied from the internet. |
| blackListCheck | string | Indicates a competent authority blacklisted the ID document.     |

### Format Analysis

| Attribute             | Type   | Description                                                                         |
| --------------------- | ------ | ----------------------------------------------------------------------------------- |
| modelIdentification   | string | Indicates whether the document model has been identified.                           |
| countryModelValidity  | string | Indicates whether the document model adheres to the issuing country specifications. |
| documentModelValidity | string | Indicates whether the document model adheres to the document type specifications.   |
| photocopyDetected     | string | Indicates whether the document is a black and white photocopy.                      |

### Forensic Analysis

| Attribute                                 | Type   | Description                                                                                            |
| ----------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------ |
| documentLivenessCheck                     | string | Indicates if the document image is genuine and not a photo-of-an-image or photo-of-a-screen.           |
| tamperingDetected                         | string | Indicates if the document image is tampered with using image manipulation software, such as Photoshop. |
| daylightAnalysis                          | string | Indicates whether the document daylight colours are valid.                                             |
| mrzVisualPlacement                        | string | Indicates whether the MRZ is in the right location and not tampered with.                              |
| securityElements                          | string | Indicates whether the document security elements are valid.                                            |
| photoLocation                             | string | Indicates whether the photo is in the correct location for a given document type.                      |
| mrzClassification                         | string | Indicates whether the MRZ is consistent with the document type.                                        |
| [breakdown](#forensic-analysis-breakdown) | object | Breakdown related to forensic analysis.                                                                |

### Forensic Analysis Breakdown

| Attribute                  | Type   | Description                                                                                                                     |
| -------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------- |
| documentFrontLivenessScore | number | Indicates the liveness score of the front side image of the document. The score will be 100 when it is assumed to be authentic. |
| documentBackLivenessScore  | number | Indicates the liveness score of the back side image of the document. The score will be 100 when it is assumed to be authentic.  |

### Front And Back Analysis

| Attribute       | Type   | Description                                                                                           |
| --------------- | ------ | ----------------------------------------------------------------------------------------------------- |
| formatAnalysis  | string | Indicates that both sides of the document are following the document type and country specifications. |
| dataConsistency | string | Indicates whether data on both sides of the document are consistent.                                  |

### Client Validation

| Attribute             | Type   | Description                                                                                                 |
| --------------------- | ------ | ----------------------------------------------------------------------------------------------------------- |
| ageVerification       | string | Indicates whether the extracted age is greater than or equal to a predefined minimum accepted age.          |
| clientDataConsistency | string | Indicates whether the client data (e.g. first and last names)  corresponds with data extracted from the ID. |

### Extracted Images

| Property | Type                                                                                                                                                                                                                                                                                                                                       | Description                |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- |
| type     | <p>string, </p><p>possible values include:</p><ul><li><code>front\_side</code></li><li><code>back\_side</code></li><li><code>extracted\_face</code></li><li><code>extracted\_signature</code></li><li><code>extracted\_security\_element</code></li><li><code>extracted\_code</code></li><li><code>extracted\_fingerprint</code></li></ul> | Extracted image type.      |
| data     | string                                                                                                                                                                                                                                                                                                                                     | BASE64 encoded image data. |

### Security And Pattern Analysis

| Attribute         | Type   | Description                                                                                                                           |
| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| similarity        | string | The similarity score between the expected and actual image patterns. The higher the score, the more likely the document is authentic. |
| outcome           | string | The outcome of the analysis. This can be `clear` or `attention.`                                                                      |
| narrative         | string | A description of the analysis performed.                                                                                              |
| actualImageData   | string | The `BASE64` encoded data of the actual extracted security element pattern.                                                           |
| expectedImageData | string | The `BASE64` encoded data of the expected security element's pattern.                                                                 |

### Output Example

```
{
    "complyCube": {
        "documentCheck": [
            {
                "client": {
                    "id": "64e369e520b96f0008d945bf",
                    "type": "person",
                    "entityName": "Jan Kowalski",
                    "email": "jkowalski@transactionlink.io",
                    "personDetails": {
                        "firstName": "Jan",
                        "lastName": "Kowalski"
                    },
                    "createdAt": "2023-08-21T13:43:01.539Z",
                    "updatedAt": "2023-08-21T13:43:01.539Z"
                },
                "checksResult": {
                    "documentCheck": {
                        "state": "FINISHED",
                        "outcome": "attention",
                        "document": {
                            "type": "NATIONAL_IDENTITY_CARD",
                            "classification": "PROOF_OF_IDENTITY",
                            "createdAt": "2023-08-21T13:43:15.410Z",
                            "updatedAt": "2023-08-21T13:43:18.796Z"
                        },
                        "files": [
                            {
                                "resourceId": "e89f45e5-7f71-4886-8a3a-241f1f8315bb",
                                "resourcePath": "resources/b6e595f4-0682-4b9e-ac09-30da50b4e591/e89f45e5-7f71-4886-8a3a-241f1f8315bb/b5188051-db1f-4d09-a5c6-52b29c86794f/fake_dowod_front.png",
                                "resourceName": "dowod_front.png"
                            },
                            {
                                "resourceId": "6bb71612-4265-4546-a382-ffe283bb9c06",
                                "resourcePath": "resources/b6e595f4-0682-4b9e-ac09-30da50b4e591/6bb71612-4265-4546-a382-ffe283bb9c06/b5188051-db1f-4d09-a5c6-52b29c86794f/fake_dowod_back.png",
                                "resourceName": "dowod_back.png"
                            }
                        ],
                        "outcome": "attention",
                        "breakdown": {
                            "extractedData": {
                                "holderDetails": {
                                    "lastName": [
                                        "KOWALSKI"
                                    ],
                                    "firstName": [
                                        "JAN"
                                    ],
                                    "dob": {
                                        "day": 2,
                                        "month": 1,
                                        "year": 1981
                                    },
                                    "age": 42,
                                    "nationality": "PL",
                                    "birthPlace": "WARSZAWA",
                                    "gender": "male"
                                },
                                "documentDetails": {
                                    "documentNumber": "ZZC108201",
                                    "documentType": "national_identity_card",
                                    "documentSubtypes": [
                                        "Poland - Id Card (2021) Side B",
                                        "Poland - Id Card (2021)"
                                    ],
                                    "issuingCountry": "PL",
                                    "issuingAuthority": "PREZYDENT M. ST. WARSZAWY",
                                    "issuingDate": {
                                        "day": 2,
                                        "month": 8,
                                        "year": 2021
                                    },
                                    "expirationDate": {
                                        "day": 2,
                                        "month": 8,
                                        "year": 2031
                                    },
                                    "personalNumber": "81010200131",
                                    "cardAccessNumber": "123456",
                                    "hasTwoSides": true
                                },
                                "allExtractedData": {
                                    "visual": {
                                        "lastName": [
                                            "KOWALSKI"
                                        ],
                                        "lastNameNative": "KOWALSKI",
                                        "firstName": [
                                            "JAN"
                                        ],
                                        "firstNameNative": "JAN",
                                        "entityNameNative": "KOWALSKI JAN",
                                        "dob": {
                                            "day": 2,
                                            "month": 1,
                                            "year": 1981
                                        },
                                        "nationalityNative": "POLSKIE",
                                        "birthPlace": "WARSZAWA",
                                        "birthPlaceNative": "WARSZAWA",
                                        "gender": "male",
                                        "documentNumber": "ZZC108201",
                                        "personalNumber": "81010200131",
                                        "cardAccessNumber": "123456",
                                        "issuingAuthority": "PREZYDENT M. ST. WARSZAWY",
                                        "issuingAuthorityNative": "PREZYDENT M. ST. WARSZAWY",
                                        "issuingDate": {
                                            "day": 2,
                                            "month": 8,
                                            "year": 2021
                                        },
                                        "expirationDate": {
                                            "day": 2,
                                            "month": 8,
                                            "year": 2031
                                        }
                                    },
                                    "mrz": {
                                        "lastName": [
                                            "KOWALSKI"
                                        ],
                                        "firstName": [
                                            "JAN"
                                        ],
                                        "dob": {
                                            "day": 2,
                                            "month": 1,
                                            "year": 1981
                                        },
                                        "nationality": "PL",
                                        "gender": "male",
                                        "documentNumber": "ZZC108201",
                                        "personalNumber": "81010200131",
                                        "issuingCountry": "PL",
                                        "expirationDate": {
                                            "day": 2,
                                            "month": 8,
                                            "year": 2031
                                        }
                                    },
                                    "barcode": {
                                        "cardAccessNumber": "123456"
                                    }
                                },
                                "mrz": {
                                    "line1": "I<POLZZC1082012<<<<<<<<<<<<<<<",
                                    "line2": "8101028M3108022POL810102001312",
                                    "line3": "KOWALSKI<<JAN<<<<<<<<<<<<<<<<<"
                                }
                            },
                            "mrzAnalysis": {
                                "mrzChecksum": "attention",
                                "mrzFormat": "attention"
                            },
                            "contentAnalysis": {
                                "expirationDate": "clear",
                                "specimenCheck": "attention",
                                "blackListCheck": "clear",
                                "dataIntegrity": "clear"
                            },
                            "clientValidation": {
                                "ageVerification": "clear",
                                "clientDataConsistency": "attention"
                            },
                            "consistencyAnalysis": {
                                "firstName": "clear",
                                "lastName": "clear",
                                "documentNumber": "clear",
                                "nationality": "not_processed",
                                "issuingDate": "not_processed",
                                "expirationDate": "clear",
                                "dob": "clear"
                            },
                            "extractedImages": [
                                {
                                    "type": "front_side",
                                    "index": 0,
                                    "data": "base64 string"
                                },
                                {
                                    "type": "extracted_face",
                                    "index": 2,
                                    "data": "base64 string"
                                },
                                {
                                    "type": "extracted_security_element",
                                    "index": 3,
                                    "data": "base64 string"
                                },
                                {
                                    "type": "extracted_signature",
                                    "index": 5,
                                    "data": "base64 string"
                                }
                            ],
                            "forensicAnalysis": {
                                "mrzVisualPlacement": "not_processed",
                                "securityElements": "clear",
                                "photoLocation": "clear",
                                "mrzClassification": "clear",
                                "documentLivenessCheck": "clear",
                                "tamperingDetected": "clear",
                                "breakdown": {
                                    "documentFrontLivenessScore": 96,
                                    "documentBackLivenessScore": 98
                                }
                            },
                            "formatAnalysis": {
                                "modelIdentification": "clear",
                                "countryModelValidity": "clear",
                                "documentModelValidity": "clear",
                                "photocopyDetected": "attention"
                            },
                            "frontAndBackAnalysis": {
                                "formatAnalysis": "not_processed",
                                "dataConsistency": "clear"
                            },
                            "securityAndPatternAnalysis": [
                                {
                                    "outcome": "clear",
                                    "narrative": "Barcode"
                                },
                                {
                                    "similarity": 94,
                                    "outcome": "clear",
                                    "narrative": "Clear",
                                    "index": 1,
                                    "actualImageData": ""
                                },
                                {
                                    "similarity": 94,
                                    "outcome": "clear",
                                    "narrative": "Clear",
                                    "index": 2,
                                    "actualImageData": "",
                                    "expectedImageData": ""
                                },
                                {
                                    "outcome": "clear",
                                    "narrative": "Clear"
                                }
                            ]
                        }
                    }
                }
            }
        ]
    }
}
```
