Require personal number

You can request the availability of specific fields, like the personal number, during a document scan. Initiate the document scan transaction with personal_number configured as a desired field. If the desired fields are not present on the initially scanned side, the system will automatically prompt for the other side of the document to be scanned. The document scan will not fail if the desired fields can't be found on any of the scanned sides.

POST https://api.cm.com/id-scan/v1/transactions

Request headers

Content-Type: application/json
Authorization: Bearer GENERATED_TOKEN_HERE
{
    "tasks": [
        "document_scan"
    ],
    "settings": {
        "documentScan": {
            "desiredFields": [
                "personal_number"
            ]
        }
    }
}

Example

Netherlands Passport (2021)

In this case, the front side of the Netherlands Passport is provided, which doesn't have a personal number located on the front side. Once provided, the system will prompt for the back side.

Netherlands Passport (2021)

Netherlands Passport (2021)

The personal number is present on the back side, resulting in a completed document scan.

Netherlands Passport (2021) - Back

Netherlands Passport (2021) - Back

Greece Passport (2021)

There are also identity documents that don't have a personal number at all on any of the sides. For example, this Greek Passport doesn't have a personal number on the front side, so the system will prompt for the back side.

Greece Passport (2021)

Greece Passport (2021)

On the back side of the Greek Passport, there is also no personal number available. The document scan will still complete, regardless of whether the desired field is found on any of the scanned sides.

Greece Passport (2021) - Back

Greece Passport (2021) - Back

For a full list of all desiredFields values, see the API reference