REST API workflow
The typical REST API workflow is as follows:
C:\Users\Public\ABBYY\FlexiCapture\12.0\Samples\FlexiCapture\English\Banking_eng\banking_eng.fcproj).
Adjust workflow stages
The REST API always submits data to be processed as the “Default” batch type. For this reason, all document processing in the project must be configured for the “Default” batch type.
1
Select the Advanced workflow schema
On the Project menu, click Project Properties and then click the Workflow tab. From the Schema drop-down list, select Advanced and modify the workflow settings as shown below.

2
Enable web stations for verification
Click Verification → General and select the Enable web stations option.Note: You can omit this setting if you don’t need a verification stage in your project.
3
Set the verification entry condition
Click Verification → Entry Conditions and set the Documents are admitted to stage option to Always.
Depending on the requirements of your solution, you may want to disable the verification stage temporarily or conditionally using a script-based rule on the Entry Conditions tab.

4
Add a stage to export the XML layout
To enable the 
training/layout/{taskId}/{fileId} endpoint for your project, export the XML file containing the field data and layout. Create a document processing stage immediately preceding the verification stage.
5
Set the new stage's entry condition
On the Entry Conditions tab, choose Always.

6
Open the script editor
On the Script tab, click Edit script….

7
Set the script language
Change the script language to C# .NET.

8
Add the export script
Copy and paste the following code snippet into the script pane:
9
Save your changes
Click OK to save your changes.
Adjust data export settings
Once a batch submitted through the REST API is processed, the REST API picks up any exported files to make them available for download by the client. REST API projects do not require any special folder structure. You can use a flat folder structure, using the name of the root folder for each batch and document IDs as parts of file names. The REST API services assign a unique, random batch name to each batch submitted via the REST API, so unique file names are generated when exporting data from those batches. The following screenshot shows the original export settings, which result in a multi-level folder structure:

Upload your modified project to ABBYY FlexiCapture Cloud
1
Open the upload dialog
Click File > Upload Project to Server… to upload your project to ABBYY FlexiCapture Cloud.
2
Enter the server and tenant
In the dialog box that opens, enter the URL of the cloud server hosting your tenant and specify the name of your tenant.
3
Enter your credentials
Select Use server authentication and enter your tenant admin credentials.
4
Test the connection
Click Test connection to check your connection settings.
5
Upload the project
Click OK and wait until your project is uploaded.
Your next steps
Once you have uploaded your project to ABBYY FlexiCapture Cloud, here is what you can try next:- Create an application that is connected to your project. For more information, see Create applications using the FlexiCapture REST API interface.
- To test whether you have connected your application correctly, process a sample batch.
- If you encounter any problems, see Processing error diagnostics.
