Skip to main content
A typical scenario for processing documents using a single API call (for creating a transaction, uploading a file, and starting a transaction) consists of the following steps:
  1. Receive a list of all available skills.
  2. Create and start a transaction.
  3. Monitor the transaction status.
  4. Download source files and result files.
Each request to the server must include authentication information. For more information, see Authentication. Use this scenario if you have one file that is less than 30 MB in size and you do not need to edit images of the file.

Step 1. Receive a list of all available skills

To receive a list of all available skills, send a GET request to the skills resource: Run the following command: As a result, you will receive information about all the skills added to the application instance.

Step 2. Create and start a transaction

To create and start a transaction, send a POST request to the transactions/launch resource: In the URL, specify the skillId query parameter (returned by the previous API call). In the body, send the file to be processed along with optional metadata. You can also pass optional registrationParameters and skillParameters in the request body. The following is an example request body:
{
  "files": [
    {
    }
  ]
}
Run the following command: As a result, you will receive a response containing the id of the created transaction.

Step 3. Monitor the transaction status

To monitor the transaction status, send a GET request to the transactions resource: Run the following command: As a result, you will receive a response containing the transaction status. Transaction processing may be in one of the following statuses:
  • New. The transaction was created but has not been queued for processing yet.
  • Queued. The transaction is queued for processing.
  • InProgress. The transaction is being processed.
  • Processed. The transaction was successfully processed.
  • ProcessedWithWarnings. The transaction was processed but warnings occurred.
  • NotProcessed. The transaction was not processed due to an error.
  • Deleted. The transaction was deleted by the user or automatically by the retention policy.
If the transaction status is Processed or ProcessedWithWarnings, go to step 4.

Step 4. Download source files and result files

To download source files and result files, send a GET request to the transactions/files/download resource, where you should specify the file ID, which was received in the previous request: Run the following command: