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}

Response

{
    "id": "c3b92333-3935-4c15-a95e-8eb0051e644b",
    "state": "completed",
    "tasks": [
        {
            "type": "document_scan",
            "state": "completed",
            "score": 0.86,
            "result": [
                {
                    "field": "document_number",
                    "validity": "invalid",
                    "locale": null,
                    "values": [
                        {
                            "source": "mrz",
                            "value": "SPECI2021"
                        },
                        {
                            "source": "visual",
                            "value": "SPECI2021"
                        }
                    ]
                },
                {
                    "field": "given_names",
                    "validity": "not_checked",
                    "locale": null,
                    "values": [
                        {
                            "source": "mrz",
                            "value": "WILLEKE LISELOTTE"
                        },
                        {
                            "source": "visual",
                            "value": "WILLEKE LISELOTTE"
                        }
                    ]
                },
                {
                    "field": "given_names",
                    "validity": "not_checked",
                    "locale": "nl-NL",
                    "values": [
                        {
                            "source": "visual",
                            "value": "Willeke Liselotte"
                        }
                    ]
                },
                {
                    "field": "nationality",
                    "validity": "valid",
                    "locale": null,
                    "values": [
                        {
                            "source": "mrz",
                            "value": "Netherlands"
                        }
                    ]
                },
                {
                    "field": "nationality",
                    "validity": "valid",
                    "locale": "nl-NL",
                    "values": [
                        {
                            "source": "visual",
                            "value": "Nederlandse"
                        }
                    ]
                },
              	// other fields omitted for readability
            ],
            "files": [
                {
                    "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