Skip to content

2-Step Processing

With 2-Step Processing, you can add an extra layer of security for processing data. After you set up 2-Step Processing, users' identity documents data in encrypted format will be sent to the server for processing.

Mobile side

  1. Get a license that includes the encrypting functionality.
  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