Skip to main content
When you upgrade from the version 1 to version 2 of ABBYY FlexiCapture for Invoices Cloud REST API, you will need to make some changes to your code. The essential changes include:
  • Applications
    The new version introduces the concept of applications. One account can have multiple applications which operate independently. Each application can only work with its own tasks, processing data, and training models, and cannot access any of this information for other applications.
  • Multi-column fields
    The fields may have variants now, allowing for spelling differences and mistakes, which makes it easier to match the vendors and business units. The captured fields will be represented by arrays with variants.
  • Version updated in URLs
    The URLs were renamed according to the version: the v1 in the URL was changed to v2.
You will need to change some of your code to account for the differences. The API methods of the first version are listed below. Open the subsection for each method to see how it has changed in the second version. The URL changes are picked out in bold.

Working with files

POST https://api-{location-id}.flexicapture.com/v2/file
  • removed the email query parameter; the email address of the account will be used
  • added to the response: application (application ID) and expiring (the file expiration date)
  • removed from the response: the keys concerning the file validation and deletion (validated, is_validated, deleted, is_deleted), error message (error) and the number of pages (pages_count)
GET https://api-{location-id}.flexicapture.com/v2/file/{id}/{token}/info
  • for deleted files you can’t get metadata anymore; response 404 is now returned
  • added to the response: application (application ID) and expiring (the file expiration date)
  • removed from the response: the keys concerning the file validation and deletion (validated, is_validated, deleted, is_deleted), error message (error) and the number of pages (pages_count)
GET https://api-{location-id}.flexicapture.com/v2/file/{id}/{token}
DELETE https://api-{location-id}.flexicapture.com/v2/file/{id}/{token}

Capturing documents

POST https://api-{location-id}.flexicapture.com/v2/task/capture/documents
The changes to the request parameters:
  • the request body should no longer contain the email and label keys
  • region, export_format, and verification_type keys are moved to the properties dictionary
The changes to the response:
  • added keys: batch_id, is_realtime_enabled, processing_priority, is_demo, account, application, is_extra_error, documents > data, documents > is_moved, documents > traininglayout_fileid
  • removed keys: label, lead_time, started, delivered, deleted, wait_for_action, is_test, region, export_format, verification_type, business_unit, properties > export_format, properties > verification_type
  • the services array was removed, with the files key moved from services array to documents array
  • number is now string instead of integer
  • progress is now a floating point number instead of integer

Invoice capturing tasks

POST https://api-{location-id}.flexicapture.com/v2/task/capture/invoices
The changes to the request parameters:
  • the request body should no longer contain the business_unit, email and label keys
  • region, export_format, and verification_type keys are moved to the properties dictionary
The changes to the response:
  • added keys: batch_id, is_realtime_enabled, processing_priority, is_demo, account, application, is_extra_error, documents > data, documents > is_moved, documents > traininglayout_fileid
  • removed keys: label, lead_time, started, delivered, deleted, wait_for_action, is_test, region, export_format, verification_type, business_unit, properties > export_format, properties > verification_type
  • the services array was removed, with the files key moved from services array to documents array
  • number is now string instead of integer
  • progress is now a floating point number instead of integer
  • region, export_format, and verification_type keys are moved to the properties dictionary
GET https://api-{location-id}.flexicapture.com/v2/task/{id}
The response is now organized in the same way as for the task creation method.
  • added keys similar to the task creation method: batch_id, is_realtime_enabled, processing_priority, is_demo, account, application, documents_count, pages_count, is_extra_error, documents > data, documents > is_moved, documents > traininglayout_fileid
  • added more keys: relating to the extracted data documents > data > {region, export_format, verification_type, vendor_name, invoice_date, total, currency}, relating to task billing: billed, is_billed
  • removed keys: label, lead_time, deleted, wait_for_action, is_test, region, export_format, verification_type, business_unit,
  • the services array was removed, with the files key moved from services array to documents array
  • number is now string instead of integer
  • progress is now a floating point number instead of integer
  • region, export_format, and verification_type keys are moved to the properties dictionary
DELETE https://api-{location-id}.flexicapture.com/v2/task/{id}

Working with datasets

POST https://api-{location-id}.flexicapture.com/v2/dataset/businessunits
Both in the request and response, the following keys now contain arrays with variants: name, street, city, state, zip, vat
PUT https://api-{location-id}.flexicapture.com/v2/dataset/businessunits
Both in the request and response, the following keys now contain arrays with variants: name, street, city, state, zip, vat
GET https://api-{location-id}.flexicapture.com/v2/dataset/businessunits/{region}
Optional query parameters can now be used to get the data on one of the business units: externalId, skip, takeBoth in the request and response, the following keys now contain arrays with variants: name, street, city, state, zip, vat
DELETE https://api-{location-id}.flexicapture.com/v2/dataset/businessunits/{region}
DELETE https://api-{location-id}.flexicapture.com/v2/dataset/businessunit/{region}/{externalId}
POST https://api-{location-id}.flexicapture.com/v2/dataset/vendors
Both in the request and response, the following keys now contain arrays with variants: name, street, city, state, zip, vat, national_vat, iban, bank_account, bank_code, gl_code
PUT https://api-{location-id}.flexicapture.com/v2/dataset/vendors
Both in the request and response, the following keys now contain arrays with variants: name, street, city, state, zip, vat, national_vat, iban, bank_account, bank_code, gl_code
GET https://api-{location-id}.flexicapture.com/v2/dataset/vendors/{region}
Optional query parameters can now be used to get the data on one of the business units: externalId, skip, takeBoth in the request and response, the following keys now contain arrays with variants: name, street, city, state, zip, vat, national_vat, iban, bank_account, bank_code, gl_code
DELETE https://api-{location-id}.flexicapture.com/v2/dataset/vendors/{region}
DELETE https://api-{location-id}.flexicapture.com/v2/dataset/vendors/{region}/{externalId}

Training the data capture models

POST https://api-{location-id}.flexicapture.com/v2/training
PUT https://api-{location-id}.flexicapture.com/v2/training
GET https://api-{location-id}.flexicapture.com/v2/training/layout/{taskId}/{fileId}
POST https://api-{location-id}.flexicapture.com/v2/training/station/{taskId}
PUT https://api-{location-id}.flexicapture.com/v2/training/station/{taskId}
GET https://api-{location-id}.flexicapture.com/v2/training/batch{region}