- Get the authorization header using the credentials of one of your applications. For details about getting the authorization header, please refer to the Authentication section.
- Upload a file in a valid input format to the server using the File.Upload method. In the response, you will get the file’s identifier and token to be used in all subsequent requests concerning the file.
Request example
Request example
curl -X POST —header “Accept: application/json” —header “Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l” “https://api-eu.flexicapture.com/v2/file” —form “file=@/path/to/file/US_1.png”
Response example
Response example
{“id”: “5eeb762149c6470fdc65a84c”,“token”: “4B5A1A00E7A82C2AF31E20CADE7284DDA43DED30”,“name”: “US_1.png”,“extension”: “.png”,“hash”: “E75133BA4FC50B7197C2842D7A8A8AE615C37E38714C7773B1F8E2904EC62537A199129CD3B737673FBAB1DE63CBD5D428705443ADD2E1BA6223B7DD60070FDA”,“size”: 369090,“mime”: “image/png”,“is_recognizable”: true,“account”: “5dae591d3c66a51ae8be9896”,“application”: “5dae591e91375010bcd78362”,“email”: “user@abbyy.com”,“created”: “2020-02-02T14:11:45.5338461Z”,“expiring”: “2020-03-03T14:11:45.5338254Z”}
- Start a processing task to begin data extraction using the Task.Run method. You can specify multiple files in this request. The request may contain the following optional parameters: invoices region, verification type, and the export format for the results.
Request example
Request example
curl -X POST —header “Content-Type: application/json” —header “Accept: application/json” —header “Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l” -d ”{“properties”: {“region”: “US”,“export_format”: “Xls”,“verification_type”: “NoVerification”,},“files”: [{“id”: “5eeb762149c6470fdc65a84c”,“token”: “4B5A1A00E7A82C2AF31E20CADE7284DDA43DED30”}]}” “https://api-eu.flexicapture.com/v2/task/capture/invoices”
Response example
Response example
{“id”: “5eeb7bf728613d1e04a70782”,“number”: “1126563”,“batch_id”: 0,“type”: “ic”,“is_realtime_enabled”: false,“processing_priority”: “Normal”,“is_demo”: false,“properties”: {“region”: “US”,“export_format”: “Xls”,“verification_type”: “NoVerification”},“account”: “5dae591d3c66a51ae8be9896”,“email”: “user@abbyy.com”,“application”: “5dae591e91375010bcd78362”,“created”: “2020-02-02T14:36:39.441Z”,“progress”: 0,“status”: “Submitted”,“is_deleted”: false,“is_billed”: false,“documents”: [{“files”: {“source”: {“id”: “5eeb762149c6470fdc65a84c”,“token”: “4B5A1A00E7A82C2AF31E20CADE7284DDA43DED30”,“name”: “US_1.png”}},“data”: {},“is_moved”: false}],“is_extra_error”: false}
- Processing the task will take some time, so the extracted data will not be available immediately. You can check the task status using the identifier you have received when starting the task. Wait until the status changes to Done. To check the status of the task, use the Task.Get method.
Request example
Request example
curl -X GET —header “Accept: application/json” —header “Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l” “https://api-eu.flexicapture.com/v2/task/5eeb7bf728613d1e04a70782
Response example
Response example
{“id”: “5eeb7bf728613d1e04a70782”,“number”: “1126563”,“batch_id”: 2640691,“type”: “ic”,“is_realtime_enabled”: false,“processing_priority”: “Normal”,“is_demo”: false,“properties”: {“region”: “US”,“export_format”: “Xls”,“verification_type”: “NoVerification”},“account”: “5dae591d3c66a51ae8be9896”,“email”: “user@abbyy.com”,“application”: “5dae591e91375010bcd78362”,“created”: “2020-02-02T14:36:39.441Z”,“started”: “2020-02-02T14:36:50.308Z”,“billed”: “2020-02-02T14:37:14.35Z”,“delivered”: “2020-02-02T14:37:14.328Z”,“progress”: 100,“status”: “Done”,“is_deleted”: false,“is_billed”: true,“documents_count”: 1,“pages_count”: 1,“documents”: [{“files”: {“source”: {“id”: “5eeb762149c6470fdc65a84c”,“token”: “4B5A1A00E7A82C2AF31E20CADE7284DDA43DED30”,“name”: “US_1.png”},“target”: {“id”: “5eeb7c1963ee5a1268123b96”,“token”: “A01EFC05BBB787DC6825F08E51B56CF3E066210E”,“name”: “Data_00000001.xls”},“verification_layer_page_0”: {“id”: “5eeb7c1a63ee5a1268123b97”,“token”: “18921FFB4C944056CB3ED00768F90724ADF0CB69”,“name”: “verification_layer_page_2.xml”}},“data”: {“region”: “us”,“export_format”: “xls”,“verification_type”: “noverification”,“vendor_id”: “1”,“vendor_name”: “AA APPAREL”,“total”: “20208”,“currency”: “USD”},“is_moved”: false}],“is_extra_error”: false}
- After the status has changed to Done, you can download the output files using their identifiers and tokens (target files information in the response on the previous step). To do this, use the File.Download method. This request can be repeated for each input file in the task request.
Request example
Request example
curl -X GET —header “Accept: application/json” —header “Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l=” “https://api-eu.flexicapture.com/v2/file/5eeb7c1963ee5a1268123b96/A01EFC05BBB787DC6825F08E51B56CF3E066210E”
- After downloading the output data, delete the task to remove all input and output files. To do this, use the Task.Delete method and specify the task identifier.
Request example
Request example
curl -X DELETE —header “Accept: application/json” —header “Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l=” “https://api-eu.flexicapture.com/v2/task/5eeb7bf728613d1e04a70782”
