Transaction result

When all tasks are completed by the end user you get the result ID from the notification or as query parameter in the return URL. Use this result ID in combination with the transaction ID to retrieve the transaction results. It is recommended to use the mrz source if available for a given field, as this will contain the most accurate value.

Request headers

Authorization: Bearer GENERATED_TOKEN_HERE

GET https://api.cm.com/id-scan/v1/transactions/{transactionId}/results/{resultId}?includeRawImages=true

URL parameters

PropertyTypeDescription
transactionIdstringA unique identifier for the transaction.
resultIdstringThis result ID can be obtained from the resultId parameter in the iframe event or query parameter "resultid" in the return url after the user completes the transaction.

Query parameters

PropertyTypeDescription
includeRawImagesbooleanInclude the raw image(s) in the response. The default is false.

Response

{
    "id": "c3b92333-3935-4c15-a95e-8eb0051e644b",
    "state": "completed",
    "tasks": [
        {
            "type": "document_scan",
            "state": "completed",
            "score": 0.86,
            "result": [
                {
                    "field": "document_number",
                    "validity": "invalid",
                    "comparison": "match",
                    "locale": null,
                    "values": [
                        {
                            "source": "mrz",
                            "value": "SPECI2021"
                        },
                        {
                            "source": "visual",
                            "value": "SPECI2021"
                        }
                    ]
                },
                {
                    "field": "given_names",
                    "validity": "not_checked",
                    "comparison": "match",
                    "locale": null,
                    "values": [
                        {
                            "source": "mrz",
                            "value": "WILLEKE LISELOTTE"
                        },
                        {
                            "source": "visual",
                            "value": "WILLEKE LISELOTTE"
                        }
                    ]
                },
                {
                    "field": "given_names",
                    "validity": "not_checked",
                    "comparison": "not_performed",
                    "locale": "nl-NL",
                    "values": [
                        {
                            "source": "visual",
                            "value": "Willeke Liselotte"
                        }
                    ]
                },
                {
                    "field": "nationality",
                    "validity": "valid",
                    "comparison": "not_performed",
                    "locale": null,
                    "values": [
                        {
                            "source": "mrz",
                            "value": "Netherlands"
                        }
                    ]
                },
                {
                    "field": "nationality",
                    "validity": "valid",
                    "comparison": "not_performed",
                    "locale": "nl-NL",
                    "values": [
                        {
                            "source": "visual",
                            "value": "Nederlandse"
                        }
                    ]
                },
                {
                    "field": "personal_number",
                    "validity": "invalid",
                    "comparison": "match",
                    "locale": null,
                    "values": [
                        {
                            "source": "barcode",
                            "value": "999999990"
                        },
                        {
                            "source": "visual",
                            "value": "999999990"
                        }
                    ]
                },
              	// other fields omitted for readability
            ],
            "files": [
                {
                    "category": "document",
                    "type": "raw_document_image",
                    "url": "https://api.cm.com/id-scan/v1/downloads/OWEwUH7weiogj83bfi..."
                },
                {
                    "category": "document",
                    "type": "raw_document_image",
                    "url": "https://api.cm.com/id-scan/v1/downloads/REHE0wejfw786we690..."
                },
                {
                    "category": "document",
                    "type": "DRIVING_LICENSE",
                    "name": "Netherlands - Driving License (2022)",
                    "score": 0.85,
                    "url": "https://api.cm.com/id-scan/v1/downloads/pz6vLGjX9OOOsiQxEY..."
                },
                {
                    "category": "document",
                    "type": "DRIVING_LICENSE",
                    "name": "Netherlands - Driving License (2022) Side B",
                    "score": 0.87,
                    "url": "https://api.cm.com/id-scan/v1/downloads/55mrqZQhtp1wa3a1uC..."
                },
                {
                    "category": "image",
                    "type": "portrait",
                    "url": "https://api.cm.com/id-scan/v1/downloads/YNBQ0V4nofRehT8e2Y..."
                }
            ]
        },
        {
            "type": "face_liveness",
            "state": "completed"
        },
        {
            "type": "face_match",
            "state": "completed",
            "score": 0.877
        }
    ]
}

📘

This example only shows a small section of field types in results. For a full list of all fields see the API reference.

Download document image

The URL in the files section for the document_scan task contains the URLs of the document images.

Request headers

Authorization: Bearer GENERATED_TOKEN_HERE
GET https://api.cm.com/id-scan/v1/downloads/pz6vLGjX9OOOsiQxEY...

Response

Image file

Retrieve audit report

Once the transaction is completed, you can retrieve an audit report.

This audit report is available to be retrieved by using the transaction ID of the completed transaction as well as the result ID from the notification or return URL query parameter.

There are two types of audit reports: simple and extended.

Request headers

Authorization: Bearer GENERATED_TOKEN_HERE

Response

PDF file

Simple audit report

The simple report is created when the transaction is completed. This report is always retrievable.

It contains no documents and is not sealed.

GET https://api.cm.com/id-scan/v1/transactions/{transactionId}/report/{resultId}

Extended audit report

The extended report is available to be created on request, only within the validity period of the transaction.

📘

After the transaction expires, the extended report cannot be retrieved any more.

It contains all the scanned documents from the transaction and will be digitally sealed. Specify the type=extended query parameter to request this report.

GET https://api.cm.com/id-scan/v1/transactions/{transactionId}/report/{resultId}?type=extended