Transaction details

There is an endpoint available to fetch the status of a transaction.

If the transaction state is pending and the transaction has not expired yet, the endpoint will also return the files created by the document scan attempts.

If the transaction has expired, the files are no longer available.

To retrieve the files for completed transactions, the transaction result endpoint must be used.

Request headers

Authorization: Bearer GENERATED_TOKEN_HERE

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

Response

{
    "id": "2c2f04a5-44e4-4a83-aa53-1a9fa90c2394",
    "state": "pending",
    "created": "2024-10-28T14:32:32+00:00",
    "expires": "2025-11-28T15:32:32+00:00",
    "completed": null,
    "tasks": [
        {
            "type": "document_scan",
            "state": "pending",
            "level": "advanced",
            "attempts": 2,
            "attemptsInvoiced": 1,
            "documentScans": [
                {
                    "created": "2024-10-28T14:32:44+00:00",
                    "code": "front_side_provided_back_side_required",
                    "score": 0.98,
                    "source": "file",
                    "linked": false,
                    "files": [
                        {
                            "category": "document",
                            "type": "raw_document_image",
                            "url": "https://api.cm.com/id-scan/v1/downloads/kvd6UWjcymy9O3dsd9MU9nQF6pIMwRLi0wIDc6w16dnKv2AQBK"
                        },
                        {
                            "category": "document",
                            "type": "passport",
                            "name": "Netherlands - ePassport (2021)",
                            "score": 0.98,
                            "url": "https://api.cm.com/id-scan/v1/downloads/FyXfLOMbgEruDhqWWBKSgWq56XzNs4TTLyUqHULIZYYvjiQyDk"
                        },
                        {
                            "category": "image",
                            "type": "portrait",
                            "url": "https://api.cm.com/id-scan/v1/downloads/eiejGPpi4evJKCuC1f6ueGOZ3hsA2U9XMkRw5yJVYzCCLawdoV"
                        }
                    ]
                },
                {
                    "created": "2024-10-28T14:32:56+00:00",
                    "code": "unknown_type_back",
                    "score": 0.98,
                    "source": "camera",
                    "linked": true,
                    "files": [
                        {
                            "category": "document",
                            "type": "raw_document_image",
                            "url": "https://api.cm.com/id-scan/v1/downloads/2r572RPUVBxlREerKHAS1hRRhKGtXmnXeTfBuOIOnMBL9a5ywe"
                        },
                        {
                            "category": "document",
                            "type": "raw_document_image",
                            "url": "https://api.cm.com/id-scan/v1/downloads/kvd6UWjcymy9O3dsd9MU9nQF6pIMwRLi0wIDc6w16dnKv2AQBK"
                        },
                        {
                            "category": "document",
                            "type": "passport",
                            "name": "Netherlands - ePassport (2021)",
                            "score": 0.98,
                            "url": "https://api.cm.com/id-scan/v1/downloads/HAPiWFw1ifXzxu6mhhozgFqZZ14Un1byQwL1zV9AgivycjOniS"
                        },
                        {
                            "category": "image",
                            "type": "portrait",
                            "url": "https://api.cm.com/id-scan/v1/downloads/Yuc5fpPrPyrrImtk2wOlVUkwgtSz1KMYFh7BwUhJ4zxxxWuc1v"
                        }
                    ]
                },
                {
                    "created": "2024-10-28T14:33:07+00:00",
                    "code": "unknown_type_back",
                    "score": 0.98,
                    "source": "camera",
                    "linked": true,
                    "files": [
                        {
                            "category": "document",
                            "type": "raw_document_image",
                            "url": "https://api.cm.com/id-scan/v1/downloads/1ZdGNAZk4kh1hZZwGQcIDiBSipMlK8yskIkRms8UagHpwDzcrt"
                        },
                        {
                            "category": "document",
                            "type": "raw_document_image",
                            "url": "https://api.cm.com/id-scan/v1/downloads/kvd6UWjcymy9O3dsd9MU9nQF6pIMwRLi0wIDc6w16dnKv2AQBK"
                        },
                        {
                            "category": "document",
                            "type": "passport",
                            "name": "Netherlands - ePassport (2021)",
                            "score": 0.98,
                            "url": "https://api.cm.com/id-scan/v1/downloads/Mx0M8drAlLvCZQEIoNZeZYnLt1jf9JGuUbk2ZlillR8xNGrFMU"
                        },
                        {
                            "category": "image",
                            "type": "portrait",
                            "url": "https://api.cm.com/id-scan/v1/downloads/ggsEFrytSdlDFjq8QPydrqwRSDvGuUnetnAbPW1ookkdpoz4iG"
                        }
                    ]
                }
            ]
        },
        {
            "type": "face_liveness",
            "state": "pending",
            "attempts": 3,
            "attemptsInvoiced": 3
        },
        {
            "type": "face_match",
            "state": "pending",
            "score": 0.99,
            "attempts": 1,
            "attemptsInvoiced": 1
        }
    ]
}