Skip to content

Document Reprocessing

Document reprocessing adds an extra layer of security for data processing. It lets you process a document, save the package for reprocessing, and then process it on the web service.

Mobile side

  1. Turn on shouldReturnPackageForReprocess.
  2. Process an identity document.
  3. Handle results that are returned by the getEncryptedContainers method — it's a JSON string.
  4. Make up the request — add to the JSON mentioned above the processParam node with the scenario attribute. See the description below.

Server side

Use the following endpoint to process Identity Documents in encrypted presentation:

POST /api/process

Body of the request should include 3 nodes:

  • processParam - params that have to be used during the document processing
  • ContainerList - the list of encrypted containters, such as license and other encrypted data
  • TransactionInfo - the transaction metadata
{
    "processParam": {
        "scenario": "FullProcess",
        "alreadyCropped": true
    },
    "ContainerList": {
        "List": [
            {
                "License": "",
                ...
                "result_type": 50
            },
            {
                "EncryptedRCL": "",
                ...
                "result_type": 49
            }
        ]
    },
    "TransactionInfo": {
        ...
    }
}

Example request

curl --request POST \
--url "https://api.regulaforensics.com/api/process" \
--header "Content-Type: application/json" \
--data '{ "processParam": { "scenario": "FullProcess", "alreadyCropped": true }, "ContainerList": { "List": [ { "License": "...", ... "result_type": 50 }, { "EncryptedRCL": "...", ... "result_type": 49 } ] }, "TransactionInfo": { ... } }'

Example response

Find in the Result JSON file.

Next Steps