> ## 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.

# API Reference

> Reference for the FlexiCapture for Invoices Cloud REST API: endpoints and resources for files, tasks, datasets of business units and vendors, and training.

ABBYY FlexiCapture for Invoices Cloud API is organized around [REST](https://en.wikipedia.org/wiki/Representational_state_transfer). The API enables you to access ABBYY FlexiCapture Cloud service resources. After you have registered and obtained the authentication header, you can make requests to the ABBYY FlexiCapture for Invoices Cloud API.

The API uses built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients.

The [ABBYY FlexiCapture Cloud web portal](https://flexicapture.com) includes the API scheme in swagger format. You can use it to generate client code in the language that you use for your project with special tools, for example [Swagger Editor](https://editor.swagger.io/).

## API endpoint

<a id="icaas-supported-countries" />

```text theme={null}
https://api-{location-id}.flexicapture.com
```

Replace `{location-id}` with one of the supported locations:

* `us`: USA and Canada
* `au`: Australia
* `eu`: The European Union countries

## REST resources

The endpoint paths below are relative to the API endpoint described above.

### v2.file

| Method                                                                   | Endpoint                         | Description                            |
| ------------------------------------------------------------------------ | -------------------------------- | -------------------------------------- |
| [Upload](/flexi-capture/cloud/cloud-f-cfor-invoices-api-upload-file)     | `POST /v2/file`                  | Upload one or more files to the cloud. |
| [Download](/flexi-capture/cloud/cloud-f-cfor-invoices-api-download-file) | `GET /v2/file/{id}/{token}`      | Download a file from the cloud.        |
| [Get](/flexi-capture/cloud/cloud-f-cfor-invoices-api-get-file-metadata)  | `GET /v2/file/{id}/{token}/info` | Returns file metadata.                 |
| [Delete](/flexi-capture/cloud/cloud-f-cfor-invoices-api-delete-file)     | `DELETE /v2/file/{id}/{token}`   | Delete a file from the cloud.          |

### v2.task

| Method                                                               | Endpoint                         | Description                      |
| -------------------------------------------------------------------- | -------------------------------- | -------------------------------- |
| [Run](/flexi-capture/cloud/cloud-f-cfor-invoices-api-run-task)       | `POST /v2/task/capture/invoices` | Run an invoice capture task.     |
| [Get](/flexi-capture/cloud/cloud-f-cfor-invoices-api-get-task)       | `GET /v2/task/{id}`              | Get task information by task ID. |
| [Delete](/flexi-capture/cloud/cloud-f-cfor-invoices-api-delete-task) | `DELETE /v2/task/{id}`           | Delete task data by task ID.     |

### v2.dataset

| Method                                                                                            | Endpoint                                                           | Description                                                              |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| [Create business unit](/flexi-capture/cloud/cloud-f-cfor-invoices-api-create-bu)                  | `POST /v2/dataset/businessunits`                                   | Create a list of business units.                                         |
| [Update business unit](/flexi-capture/cloud/cloud-f-cfor-invoices-api-update-bu)                  | `PUT /v2/dataset/businessunits`                                    | Update information about business units in the dataset.                  |
| [Get business unit](/flexi-capture/cloud/cloud-f-cfor-invoices-api-get-bu)                        | `GET /v2/dataset/businessunits/{region}`                           | Returns a list of business units according to the specified region.      |
| [Remove business unit by region](/flexi-capture/cloud/cloud-f-cfor-invoices-api-remove-b-uby-reg) | `DELETE /v2/dataset/businessunits/{region}`                        | Removes business units with the specified region from the dataset.       |
| [Remove business unit by ID](/flexi-capture/cloud/cloud-f-cfor-invoices-api-remove-b-uby-id)      | `DELETE /v2/dataset/businessunit/{region}/{externalId}`            | Removes a business unit with the specified external ID from the dataset. |
| [Create vendor](/flexi-capture/cloud/cloud-f-cfor-invoices-api-create-vendor)                     | `POST /v2/dataset/vendors`                                         | Create a list of vendors.                                                |
| [Update vendor](/flexi-capture/cloud/cloud-f-cfor-invoices-api-update-vendor)                     | `PUT /v2/dataset/vendors`                                          | Update information about vendors in the dataset.                         |
| [Get vendor](/flexi-capture/cloud/cloud-f-cfor-invoices-api-get-vendor)                           | `GET /v2/dataset/vendors/{region}`                                 | Returns a list of vendors according to the specified region.             |
| [Remove vendor by region](/flexi-capture/cloud/cloud-f-cfor-invoices-api-remove-vendor-by-reg)    | `DELETE /v2/dataset/vendors/{region}`                              | Removes vendors with the specified region from the dataset.              |
| [Remove vendor by ID](/flexi-capture/cloud/cloud-f-cfor-invoices-api-remove-vendor-by-id)         | `DELETE /v2/dataset/vendor/{region}/{externalId}/{businessUnitId}` | Removes a vendor with the specified external ID from the dataset.        |

### v2.training

| Method                                                              | Endpoint                                    | Description                 |
| ------------------------------------------------------------------- | ------------------------------------------- | --------------------------- |
| [Train](/flexi-capture/cloud/cloud-f-cfor-invoices-api-train-model) | `POST /v2/training`                         | Train a data capture model. |
| [Layout](/flexi-capture/cloud/cloud-f-cfor-invoices-api-get-layout) | `GET /v2/training/layout/{taskId}/{fileId}` | Get captured data layout.   |
