Migrating to the 2nd version of the API
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/v1/file
GET https://api-{location-id}.flexicapture.com/v1/file/{id}/{token}/info
GET https://api-{location-id}.flexicapture.com/v1/file/{id}/{token}
DELETE https://api-{location-id}.flexicapture.com/v1/file/{id}/{token}
Capturing documents
POST https://api-{location-id}.flexicapture.com/v1/capture/data
Invoice capturing tasks
POST https://api-{location-id}.flexicapture.com/v1/capture/invoices
GET https://api-{location-id}.flexicapture.com/v1/task/{id}
DELETE https://api-{location-id}.flexicapture.com/v1/task/{id}
Working with datasets
POST https://api-{location-id}.flexicapture.com/v1/dataset/businessunits
PUT https://api-{location-id}.flexicapture.com/v1/dataset/businessunits
GET https://api-{location-id}.flexicapture.com/v1/dataset/businessunits/{region}
DELETE https://api-{location-id}.flexicapture.com/v1/dataset/businessunits/{region}
DELETE https://api-{location-id}.flexicapture.com/v1/dataset/businessunit/{region}/{externalId}
POST https://api-{location-id}.flexicapture.com/v1/dataset/vendors
PUT https://api-{location-id}.flexicapture.com/v1/dataset/vendors
GET https://api-{location-id}.flexicapture.com/v1/dataset/vendors/{region}
DELETE https://api-{location-id}.flexicapture.com/v1/dataset/vendors/{region}
DELETE https://api-{location-id}.flexicapture.com/v1/dataset/vendors/{region}/{externalId}
Training the data capture models
POST https://api-{location-id}.flexicapture.com/v1/data/train
PUT https://api-{location-id}.flexicapture.com/v1/data/train
GET https://api-{location-id}.flexicapture.com/v1/data/{taskId}/{fileId}
POST https://api-{location-id}.flexicapture.com/v1/data/train/station/{taskId}
PUT https://api-{location-id}.flexicapture.com/v1/data/train/station/{taskId}
GET https://api-{location-id}.flexicapture.com/v1/data/batch/{region}
5/18/2023 9:30:10 AM