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

# Document2

> Document2 data type in the ABBYY FlexiCapture Web Services API: expanded document fields including pages, counts, status flags, errors, and priority.

## What it does

The **Document2** data type stores information about a document. It contains an expanded set of fields.

## Fields

| Name                  | Type                                                                            | Description                                                                                                                                                         |
| --------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Id`                  | `int`                                                                           | The ID of the document.                                                                                                                                             |
| `BatchId`             | `int`                                                                           | The ID of the batch.                                                                                                                                                |
| `DocIndex`            | `int`                                                                           | Document index.                                                                                                                                                     |
| `Pages`               | [Page2](/flexi-capture/api/structures/page2)`[]`                                | The set of pages in the document.                                                                                                                                   |
| `PageCount`           | `int`                                                                           | The number of pages in the document.                                                                                                                                |
| `IsProcessed`         | `bool`                                                                          | A flag that shows whether the document has been processed. `True` if processed, `False` if not.                                                                     |
| `HasProcessingErrors` | `bool`                                                                          | A flag that shows whether processing errors occurred. `True` if some processing errors occurred, `False` if there were none.                                        |
| `HasDocumentErrors`   | `bool`                                                                          | A flag that shows whether the document has errors, such as format, rule, or assembly errors. `True` if there are errors in the document, `False` if there are none. |
| `ErrorText`           | `string`                                                                        | A description of the document processing errors. Completed automatically by the Application Server.                                                                 |
| `ExternalId`          | `string`                                                                        | The external ID of the document. If left empty, the parameter is completed automatically by the Application Server and is the same as `Id`.                         |
| `Properties`          | [RegistrationProperty](/flexi-capture/api/structures/registration-property)`[]` | The set of registration parameters for the document.                                                                                                                |
| `PropertiesCount`     | `int`                                                                           | The number of registration parameters.                                                                                                                              |
| `Priority`            | `int`                                                                           | Document priority. For possible values, see [ProcessingPriority](/flexi-capture/api/structures/t-priority).                                                         |
| `FileVersion`         | `int`                                                                           | The version of the document file on the server. Completed automatically by the Application Server.                                                                  |
| `OwnerId`             | `int`                                                                           | The ID of the user or group the document is assigned to.                                                                                                            |
| `StageExternalId`     | `int`                                                                           | The ID of the processing stage in which the task is created.                                                                                                        |
| `TaskId`              | `int`                                                                           | The ID of the task the document belongs to.                                                                                                                         |
| `UncertainSymbols`    | `int`                                                                           | The number of uncertain characters.                                                                                                                                 |
| `VerificationSymbols` | `int`                                                                           | The number of verified characters.                                                                                                                                  |
| `TotalSymbols`        | `int`                                                                           | The total number of characters.                                                                                                                                     |
| `HasErrors`           | `bool`                                                                          | Document errors. `True` if there are errors in the document, `False` if there are none.                                                                             |
| `HasWarnings`         | `bool`                                                                          | Document warnings. `True` if there are warnings in the document, `False` if there are none.                                                                         |
| `HasAssemblingErrors` | `bool`                                                                          | Document assembly errors. `True` if there are assembly errors in the document, `False` if there are none.                                                           |
| `HasAttachments`      | `bool`                                                                          | A flag that shows whether the document has attachments.                                                                                                             |
| `Flags`               | `int`                                                                           | A set of flags that describe the status of the document. The value combines the flags listed after this table.                                                      |

### Flags field values

The `Flags` value is a combination of the following flags. Only the flags useful when working with tasks and the [Web Services API methods](/flexi-capture/api/methods/methods) are listed.

| Flag                                    | Value       | Meaning                                                                                                        |
| --------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------- |
| `BIF_IsAnalyzed`                        | `0x100`     | The document is analyzed.                                                                                      |
| `BIF_IsRecognized`                      | `0x200`     | The document is recognized.                                                                                    |
| `BIF_IsVerified`                        | `0x400`     | The document is verified.                                                                                      |
| `BIF_IsExported`                        | `0x800`     | The document is exported.                                                                                      |
| `BIF_HasRuleErrors`                     | `0x10000`   | The document contains rule execution errors.                                                                   |
| `BIF_HasRuleWarnings`                   | `0x20000`   | The document contains rule execution warnings.                                                                 |
| `BIF_HasMergeVersionErrors`             | `0x80000`   | The document contains errors from merging double verification results (the verification results do not match). |
| `BIF_HasUserAttachments`                | `0x100000`  | The document has attachments.                                                                                  |
| `BIF_HasUnmatchedFieldErrors`           | `0x200000`  | The document contains unmatched fields.                                                                        |
| `BIF_NeedsPreprocessing`                | `0x800000`  | The document needs preprocessing.                                                                              |
| `BIF_IsManuallyCreated`                 | `0x1000000` | The document was created manually.                                                                             |
| `BIF_IsExcludedFromAutomaticAssembling` | `0x2000000` | The document is excluded from automatic assembly.                                                              |
| `BIF_IsSourceImageAttached`             | `0x4000000` | A source image file is attached to the document.                                                               |
