Document expiration

Expired documents are not allowed by default when supplied for the document_scan task. It is possible to change this behavior by providing the allowedExpiration setting. A positive number allows a document to be expired for the specified number of days, a negative number requires a document to be valid for at least the specified number of days.

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

Request headers

Content-Type: application/json
Authorization: Bearer GENERATED_TOKEN_HERE

Document should be valid for at least 90 days after expiration date

{
    "tasks": [
        "document_scan"
    ],
    "settings": {
        "documentScan": {
            "allowedExpiration": 90
        }
    }
}

Document should be valid for at least 90 days before expiration date

{
    "tasks": [
        "document_scan"
    ],
    "settings": {
        "documentScan": {
            "allowedExpiration": -90
        }
    }
}