---
title: "Configuration"
description: "Your configuration holds the settings that apply to every transaction you create. Unlike the document scan settings, which you send with each transaction, your configuration is stored for your account and is not part of the transaction request."
canonical: "https://docs.cm.com/verification/id-scan/configuration"
---

# Configuration

> Your configuration holds the settings that apply to every transaction you create. Unlike the document scan settings, which you send with each transaction, your configuration is stored for your account and is not part of the transaction request.

Source: https://docs.cm.com/verification/id-scan/configuration

Your configuration holds the settings that apply to every transaction you create. Unlike the [document scan settings](https://docs.cm.com/verification/id-scan/create-transaction#settings), which you send with each transaction, your configuration is stored **for your account** and is not part of the transaction request.

It currently contains the image quality checks for your document scan tasks.

## Image quality checks

Image quality checks let you reject a document scan when the submitted image is not good enough, for example when it is blurry, has glare, or is not fully visible.

### How it works

For every document scan the service evaluates a set of quality checks on the submitted image. Each check returns `ok` or `error`.

A document scan is only rejected when at least 1 individual check that returned `error` is enabled in your configuration.

When a scan is rejected, the document scan task fails with the `image_quality_requirements_not_met` error and the end user is asked to submit the document again. See [document scan errors](https://docs.cm.com/verification/id-scan#document-scan-errors).

:::note
All checks are disabled by default
:::

### Available checks

| Check | Description |
| - | - |
| `glare` | Glare is present on the document image. |
| `focus` | The document image is out of focus. |
| `resolution` | The image resolution is below the required threshold. |
| `color` | The image is colorless, for example a black-and-white scan or photocopy. |
| `perspective` | The document in the image has perspective distortion. |
| `bounds` | The document is not fully present in the image. |
| `moire` | Moiré patterns were detected, indicating a screen capture instead of a physical document. |
| `portrait` | The portrait is not present on the document. |
| `handwritten` | The document contains handwritten text in the scanned fields. |
| `brightness` | The document image is not bright enough. |
| `occlusion` | Part of the document is occluded in the image. |

## Retrieve the configuration

```text title="Request"
GET https://api.cm.com/id-scan/v1/config
```

```text title="Request headers"
Authorization: Bearer GENERATED_TOKEN_HERE
```

```json title="Response body"
{
    "documentScan": {
        "imageQualityChecks": {
            "glare": false,
            "focus": false,
            "resolution": false,
            "color": false,
            "perspective": false,
            "bounds": false,
            "moire": false,
            "portrait": false,
            "handwritten": false,
            "brightness": false,
            "occlusion": false
        }
    }
}
```

## Update the configuration

```text title="Request"
PUT https://api.cm.com/id-scan/v1/config
```

```text title="Request headers"
Content-Type: application/json
Authorization: Bearer GENERATED_TOKEN_HERE
```

**Request body**

| Property | Type | Description |
| - | - | - |
| `documentScan` | object | Configuration that applies to your document scan tasks. |
| `documentScan.imageQualityChecks` | object | The image quality checks to enforce. Every [available check](#available-checks) can be set as an optional boolean. |

All properties are optional and only the checks you send are changed. Checks you leave out keep their current value.

**Enable the checks for blurry images and screen captures**

```json title="Request body"
{
    "documentScan": {
        "imageQualityChecks": {
            "focus": true,
            "moire": true
        }
    }
}
```

**Response**

The full configuration is always returned, including the checks you did not send.

```json title="Request body"
{
    "documentScan": {
        "imageQualityChecks": {
            "glare": false,
            "focus": true,
            "resolution": false,
            "color": false,
            "perspective": false,
            "bounds": false,
            "moire": true,
            "portrait": false,
            "handwritten": false,
            "brightness": false,
            "occlusion": false
        }
    }
}
```

For a full list of all options see the [API reference](https://docs.cm.com/verification/id-scan/v1/api-reference)
