> ## Documentation Index
> Fetch the complete documentation index at: https://docs.checkin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Document Check

> Extract data from identity documents and verify it.

Document Check reads an identity document, extracts its data and checks that the data is consistent and the document hasn't been tampered with.

See [Fraud prevention](https://docs.checkin.com/products/fraud-prevention.md) for the fraud checks that run on the document and its capture.

| | |
| - | - |
| API identifier | `data-extraction` |
| Result key | `servicesResults.docCheck` |
| Extensions | [Profile comparison](https://docs.checkin.com/products/profile-comparison.md), [NFC chip reading](https://docs.checkin.com/products/nfc.md) |
| Available in | Web SDK, mobile SDKs, verification links, API |

## When to use it

* Onboarding where you need the applicant's identity data from a government-issued document, such as name, date of birth and document number
* Checking that data the applicant typed in matches their document, with [Profile comparison](https://docs.checkin.com/products/profile-comparison.md)
* As the base for [Face Match](https://docs.checkin.com/products/selfie-face-match.md), which compares a selfie with the document portrait

## Accepted documents

Passports, ID cards, driving licences and residence permits are supported for most countries, plus other types such as voter cards, tax cards and refugee documents for some.

See [Supported documents](https://docs.checkin.com/products/supported-documents.md) for coverage by country, and how to choose the accepted documents in the Backoffice.

In the SDKs and verification links, the document type is detected automatically, so the applicant doesn't select it. The back side is requested only when the document has one, so a passport needs a single photo.

In the API, the document type and issuing country are also detected from the images, so you don't need to pass them. `documentType` and `issuingCountry` are optional.

Document types (`documentType`):

* `passport`
* `id-card`
* `driving-licence`
* `residence-permit`
* `voter-card`
* `tax-card`
* `address-card`
* `student-card`
* `domestic-passport`
* `unknown`

The issuing country (`issuingCountry`) is an ISO 3166-1 alpha-2 or alpha-3 code.

## Applicant flow

In the Web SDK, the applicant scans the front of the document, flips it, scans the back if the document has one, then takes a selfie. With [Liveness](https://docs.checkin.com/products/liveness.md) on, liveness is checked during the same selfie capture.

![Web SDK screens: welcome, document guide, scan front, flip document, scan back, selfie guide, selfie and liveness, liveness done, sending, success](https://mintcdn.com/checkin-com/25GVaDB7DHI1hjGE/images/flow-main.png?fit=max\&auto=format\&n=25GVaDB7DHI1hjGE\&q=85\&s=9e0aa134840fb8b9b505654bfaf6f563)

Web SDK flow with Document Check, selfie and liveness

## Configuration

In the Backoffice, per flow:

| Setting | Location |
| - | - |
| Turn on Document Check | Flows → \[flow name] → Services → ID check |
| Accepted document types and countries | Flows → \[flow name] → Acceptable ID docs |
| NFC chip reading | Flows → \[flow name] → Customize → NFC |
| Switching to mobile for better photo quality | Flows → \[flow name] → Customize → Other |
| Verification rules for document findings | Settings → Verification rules → ID Document Check, or the flow's own verification rules |

See [Flows](https://docs.checkin.com/backoffice/flows.md).

At runtime, the SDKs can narrow the flow's accepted documents with `acceptableDocuments`.

See [Applicant data](https://docs.checkin.com/integrate/applicant-data.md#accepted-documents-per-session).

## Request

In the API, request it with `verificationTypes`:

```json theme={null}
{
  "verificationTypes": ["data-extraction"],
  "application": {
    "documents": [
      {
        "files": [
          { "kind": "front", "uri": "data:image/jpeg;base64,..." },
          { "kind": "back", "uri": "data:image/jpeg;base64,..." }
        ]
      }
    ]
  }
}
```

In the Web SDK, mobile SDKs and verification links, Checkin.com handles the capture, so image requirements only apply when you send files through the API.

Through the API, send images or PDFs of up to 10 MB. We recommend images of 720p or higher.

See [File requirements](https://docs.checkin.com/integrate/api/submit-application.md#file-requirements).

## Result

`servicesResults.docCheck` contains:

| Field | Content |
| - | - |
| `status`, `processingState`, `comment`, `verifier` | Service outcome |
| `extracted` | `ocr`, `mrz`, `nfc`, `barcode`, `additional` (extracted values), `images`, `imageManipulationDetection`, `securityFeatures`, `hasIdenticalPositions` |
| `documentDataChecking[]` | One entry per field, see below |
| `dataExtractionConsistency` | Check list |
| `documentPhotoQuality` | Check list |
| `documentQuality` | Check list |
| `originalDocumentPresence` | Check list |
| `fraudAssessment` | Check list, including `dataVelocity.duplicates` |
| `biometrics` | Check list |

### Per-field data

Each entry in `documentDataChecking`:

| Field | Meaning |
| - | - |
| `category` | Field name, for example `Last name` |
| `ocr`, `mrz`, `nfc`, `barcode`, `additional` | Value read from each source |
| `equal` | Whether the sources match. `null` means the comparison was not performed. |
| `valid` | `false` means the value is incorrect |
| `status` | `approved`, `needs-review`, `declined` or `disabled` |
| `conflicts` | List of conflicts |
| `message` | Description |
| `documentId` | Document the data came from |

### Extracted fields

The list of extracted fields depends on the document type, country and revision.

Fields prefixed with `Original`, such as `Original Last name`, hold the value as printed on the document, for example in Cyrillic or in its original letter case, while `Last name` holds the normalised Latin spelling in upper case.

Each extracted value has `category`, `content` and `contentType` (for example `string`, `date`, `country`).

### Example

```json theme={null}
{
  "docCheck": {
    "serviceType": "doc-check",
    "status": "approved",
    "processingState": "done",
    "comment": "No issues found.",
    "extracted": {
      "ocr": [
        { "category": "Document number", "content": "AB1234567", "contentType": "string" },
        { "category": "Date of birth", "content": "1990-01-20", "contentType": "date" },
        { "category": "Last name", "content": "EXAMPLE", "contentType": "string" },
        { "category": "Document type", "content": "driving-licence", "contentType": "string" }
      ],
      "additional": [],
      "barcode": [],
      "images": [
        { "kind": "front", "uri": "https://partner.sb.getid.dev/files/proxy/images/...?t=...&s=..." },
        { "kind": "portrait", "uri": "https://partner.sb.getid.dev/files/proxy/images/...?t=...&s=..." }
      ]
    },
    "documentDataChecking": [
      {
        "category": "Last name",
        "ocr": "EXAMPLE", "mrz": "", "nfc": "", "barcode": "", "additional": "",
        "equal": true, "valid": true, "conflicts": [],
        "message": "Value is ok", "status": "approved"
      }
    ],
    "dataExtractionConsistency": {
      "group": "dataExtractionConsistency",
      "description": "Consistency and validity of extracted data",
      "considers": [
        { "id": "DC043", "name": "documentValidation", "type": "clear", "status": "approved", "description": "Data extracted from the document is consistent and valid." }
      ]
    },
    "documentPhotoQuality": {
      "group": "documentPhotoQuality",
      "description": "Document photo quality",
      "considers": [
        { "id": "DC002", "name": "supportedDocument", "type": "clear", "status": "approved", "description": "Document is supported for check." }
      ]
    }
  }
}
```

Only the check lists that ran are returned. Each check list can also carry a `tooltip` that explains what it checks.

A check list with an issue:

```json theme={null}
{
  "originalDocumentPresence": {
    "group": "originalDocumentPresence",
    "description": "Original document presence",
    "tooltip": "GetID checks if a photo of original document was taken.",
    "considers": [
      { "id": "DC008", "name": "photoOfScreen", "type": "consider", "status": "needs-review", "description": "A photo of not original document is suspected. Photo of the screen." }
    ]
  }
}
```

In that case `docCheck.status` is `needs-review`, `comment` is `Found 1 issue(s).`, and `overallResult.concerns` lists the summary concern `DC045` together with `DC008`.

### Profile comparison

When you send the applicant's details in `fields`, they are compared with the document automatically. The comparison is returned in `servicesResults.profileCheck`.

See [Profile comparison](https://docs.checkin.com/products/profile-comparison.md).

### Images

`extracted.images[].kind` values: `front`, `back`, `portrait`, `signature`, `ghost-portrait`, `mrz`, `barcode`.

See [Download media](https://docs.checkin.com/integrate/results/media-downloads.md).

## Concerns

Values in `{braces}` are filled in at runtime.

> [accordion] Document check (DC)
>
> | Code | Message |
> | - | - |
> | `DC001` | No document found on photo. |
> | `DC002` | Document is not supported. |
> | `DC003` | Dark photo provided. |
> | `DC004` | Glared photo provided. |
> | `DC005` | Blurred photo provided. |
> | `DC006` | Not a colour photo of the document provided. |
> | `DC007` | Document photo has some issues. |
> | `DC008` | A photo of not original document is suspected. Photo of the screen. |
> | `DC009` | A photo of not original document is suspected. Screenshot. |
> | `DC010` | A photo of not original document is suspected. Document was printed out on a paper before a photo was taken. |
> | `DC011` | A photo of not original document is suspected. Scanned document. |
> | `DC012` | Two different documents provided. |
> | `DC013` | Incorrect side. |
> | `DC014` | Missing back side of the document. |
> | `DC015` | Cut-off document. |
> | `DC016` | Covered document. |
> | `DC017` | Document corner removed physically. |
> | `DC018` | Document is punctured. |
> | `DC019` | Document is damaged. |
> | `DC020` | Document data points are obscured. |
> | `DC021` | Critical security feature is obscured. |
> | `DC022` | Abnormal document features. |
> | `DC023` | Watermarks that are not related to a document found. |
> | `DC024` | Document was published digitally. |
> | `DC025` | The document does not match the expected document template. |
> | `DC026` | Face on document was not found. |
> | `DC027` | Picture of the face on the document shows signs of tampering or modification. |
> | `DC028` | Digital tampering of a document suspected. |
> | `DC029` | Usage of non-genuie fonts suspected. |
> | `DC030` | Issue with security features on a document suspected. |
> | `DC031` | Applicants age less than minimum required age. |
> | `DC032` | Applicants First name does not match First name on the document. |
> | `DC033` | Applicants Last name does not match Last name on the document. |
> | `DC034` | Applicants Date of birth does not match Date of birth on the document. |
> | `DC035` | Applicants Date of expiry does not match Date of expiry on the document. |
> | `DC036` | Applicants Document number does not match Document number on the document. |
> | `DC037` | Applicants Personal number does not match Personal number on the document. |
> | `DC038` | Applicants MRZ does not match MRZ on the document. |
> | `DC039` | Other fields do not match fields on the document. |
> | `DC040` | Checksum is not valid |
> | `DC045` | Found `{count}` issue(s). Summary of the document check findings. |
> | `DC047` | Fields from `{source1}` and `{source2}` have conflict: `{content1}`, `{content2}{subMessage}` |
> | `DC048` | Document has expired |
> | `DC049` | Date of birth is in the future |
> | `DC050` | Date of issue is in the future |
> | `DC051` | Personal number is not supported |
> | `DC053` | Value is not provided |
> | `DC054` | Document number is not supported |
> | `DC055` | Suspicious metadata detected, indicating possible file modification. |
> | `DC056` | Suspicious data velocity identified. |
> | `DC057` | Suspicious records found in the data. |
> | `DC058` | Potential biometric match found in previously fraudulent documents. |
> | `DC059` | Potential image manipulation detected on the document |
> | `DC060` | Picture of the face on the document shows signs of tampering or modification. |
> | `DC061` | Potential video stream manipulation detected. |
> | `DC062` | No motion detected |
> | `DC063` | Desktop environment detected in forced mobile flow |
>
> NFC concerns (`DC064`–`DC067`) are on [NFC chip reading](https://docs.checkin.com/products/nfc.md#concerns).

> [accordion] Data extraction (DE)
>
> | Code | Message |
> | - | - |
> | `DE000` | Required field was not extracted (fallback ID for categories without a dedicated mapping) |
> | `DE010` | First name was not extracted |
> | `DE012` | Last name was not extracted |
> | `DE014` | Date of birth was not extracted |
> | `DE016` | Personal number was not extracted |
> | `DE018` | Document number was not extracted |
> | `DE020` | Date of expiry was not extracted |
> | `DE022` | Date of issue was not extracted |
> | `DE024` | Issue country was not extracted |

Profile comparison concerns (`PC`) are on [Profile comparison](https://docs.checkin.com/products/profile-comparison.md#concerns).

All codes are in [Considers lists](https://docs.checkin.com/integrate/results/considers-lists.md).

## Related

* [Supported documents](https://docs.checkin.com/products/supported-documents.md)
* [Fraud prevention](https://docs.checkin.com/products/fraud-prevention.md)
* [Profile comparison](https://docs.checkin.com/products/profile-comparison.md)
* [NFC chip reading](https://docs.checkin.com/products/nfc.md)
* [Selfie and Face Match](https://docs.checkin.com/products/selfie-face-match.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.