Skip to content

Document Processing

When the service is up and running and the scenario is chosen, you can start the document recognition processing.

For starting the recognition processing, send the request to the following endpoint:

POST /api/process

and specify at least the parameters required:

Attribute Type Required Description
scenario string Yes Document processing scenario.
image string Yes Base64-encoded image.
doublePageSpread boolean No Allows to process up to two pages of the document (a so-called "double-page spread") in one shot if they are presented on the image. Disabled by default.
alreadyCropped boolean No Can be enabled if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile. Disabled by default.
dateFormat string No Allows to set dates format so that solution will return dates in this format. For example, if you supply 'MM/dd/yyyy', and document have printed date '09 JUL 2020' for the date os issue, you will get '07/09/2020' as a result. By default it is set to system locale default (where the service is running).
passBackObject JSON object No Free-form object to be included in response. Do not affect document processing. Use it freely to pass your metadata.

See the full list of required and optional attributes

Request example

curl --request POST \
--url "https://api.regulaforensics.com/api/process" \
--header "Content-Type: application/json" \
--data '{ "processParam": { "scenario": "FullProcess" }, "List": [ { "ImageData": { "image": "<Base64_Image>" } } ], "passBackObject": { "customField1": "CUSTOM_VALUE_1", "customField2": "CUSTOM_VALUE_2" } }'

Response example

Find in the Result JSON file.

Next Steps