> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Run

Runs an invoice capture task. Multiple files can be specified in the request.

You can use any of your applications to process the document. To change the document processing application, use the [Authentication header](/flexi-capture/cloud/cloud-f-cfor-invoices-api-auth) based on the appropriate application identifier and token while running the task.

ABBYY FlexiCapture for Invoices Cloud processes invoices from many different countries and supports a wide range of languages. For more information, see the [Specification](/flexi-capture/cloud/cloud-f-cfor-invoices-languages) section. Each application applies a predefined set of processing rules, keywords, and other country-specific settings once it identifies the country of the invoiced business unit.

<Tip>
  Specify the correct region for the invoices you expect to receive. Using the right language significantly improves recognition quality.
</Tip>

## HTTP request

```http theme={null}
POST https://api-{location-id}.flexicapture.com/v2/task/capture/invoices
```

Replace `{location-id}` with your [supported location](/flexi-capture/cloud/cloud-f-cfor-invoices-api#icaas-supported-countries).

## Request body

The request body contains data with the following structure:

```json theme={null}
{
  "files": [
    {
      "id": "string",
      "token": "string"
    }
  ],
  "properties": {
    "region": "US",
    "export_format": "Xls",
    "verification_type": "NoVerification"
  }
}
```

| Field               | Type   | Description                                                                                                                                                                                                                                                                                 |
| ------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `files[]`           | object | Required. List of files to process.                                                                                                                                                                                                                                                         |
| `files[].id`        | string | Required. The file ID that was returned in the response of the **file.Upload** method.                                                                                                                                                                                                      |
| `files[].token`     | string | Required. The file access token that was returned in the response of the **file.Upload** method.                                                                                                                                                                                            |
| `region`            | string | Required. Invoice region. Supported regions: `US`: USA, `AU`: Australia, `EU`: European Union countries, `CA`: Canada.                                                                                                                                                                      |
| `export_format`     | string | Required. Output file format. Available formats are listed in the [Specification](/flexi-capture/cloud/cloud-f-cfor-invoices-formats#output) section.                                                                                                                                       |
| `verification_type` | string | Required. Verification type. Available types: `NoVerification` — documents are always processed without verification; `Troubleshooting` — documents are sent for verification if there are uncertain characters or errors; `UserVerification` — documents are always sent for verification. |

## Response

If successful, the response body contains an instance of `CaptureTask`.

```json theme={null}
{
  "id": "string",
  "number": "string",
  "verification_id": "string",
  "type": "ic",
  "properties": {
    "property_name": "string"
  },
  "email": "string",
  "account": "string",
  "application": "string",
  "created": "YYYY-MM-DDT00:00:00.000",
  "started": "YYYY-MM-DDT00:00:00.000",
  "action_required": "YYYY-MM-DDT00:00:00.000",
  "billed": "YYYY-MM-DDT00:00:00.000",
  "delivered": "YYYY-MM-DDT00:00:00.000",
  "deleted": "YYYY-MM-DDT00:00:00.000",
  "progress": 0,
  "status": "Submitted",
  "is_deleted": true,
  "is_demo": true,
  "is_billed": true,
  "documents_count": 0,
  "pages_count": 0,
  "documents": [
    {
      "files": {},
      "data": {},
      "is_moved": true
    }
  ]
}
```

### CaptureTask

| Field             | Type                              | Description                                                                                                                     |
| ----------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `id`              | string                            | Required. Unique task ID.                                                                                                       |
| `number`          | string                            | Required. Task number.                                                                                                          |
| `verification_id` | string                            | Required. This ID is used to open the verification page, that is, `https://{cloud-host}/verification/{verification_id}`.        |
| `type`            | string                            | Required. Task type. Supported types: `ic`: invoice capture, `dc`: document capture.                                            |
| `properties`      | object                            | Optional. Processing settings or custom registration parameters. Any number of name-value pairs.                                |
| `email`           | string                            | Required. The email address used to create the task.                                                                            |
| `account`         | string                            | Required. The account ID used to create the task.                                                                               |
| `application`     | string                            | Required. The application ID used to create the task.                                                                           |
| `created`         | string (\$date-time)              | Required. Task creation date.                                                                                                   |
| `started`         | string (\$date-time)              | Optional. Task start date.                                                                                                      |
| `action_required` | string (\$date-time)              | Optional. Date when the task received WaitForAction status.                                                                     |
| `billed`          | string (\$date-time)              | Optional. Task billing date.                                                                                                    |
| `delivered`       | string (\$date-time)              | Optional. Task completion date.                                                                                                 |
| `deleted`         | string (\$date-time)              | Optional. Data deletion date.                                                                                                   |
| `progress`        | number (\$double)                 | Required. Overall task progress.                                                                                                |
| `status`          | string                            | Required. Task completion status. Supported statuses: `Submitted`, `InProgress`, `WaitForAction`, `Done`, `Failed`, `Canceled`. |
| `is_deleted`      | boolean                           | Required. Specifies whether the task data was deleted.                                                                          |
| `is_demo`         | boolean                           | Required. Specifies whether the task was created in the demo application.                                                       |
| `is_billed`       | boolean                           | Required. Specifies whether the task was billed.                                                                                |
| `documents_count` | integer (\$int32)                 | Optional. Number of documents in task.                                                                                          |
| `pages_count`     | integer (\$int32)                 | Optional. Number of pages in task.                                                                                              |
| `documents[]`     | object (DataCaptureDocumentModel) | Required. Documents in task.                                                                                                    |

### DataCaptureDocumentModel

| Field      | Type                              | Description                                                               |
| ---------- | --------------------------------- | ------------------------------------------------------------------------- |
| `files`    | object (DataCaptureFileLinkModel) | Required. List of files linked to document.                               |
| `data`     | string                            | Optional. Document data.                                                  |
| `is_moved` | boolean                           | Required. Specifies whether the document was removed during verification. |

### DataCaptureFileLinkModel

| Field   | Type   | Description                  |
| ------- | ------ | ---------------------------- |
| `id`    | string | Required. File ID.           |
| `token` | string | Required. File access token. |
| `name`  | string | Required. File name.         |
