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

# GetDocuments

> GetDocuments in the ABBYY FlexiCapture web services API returns a Document array describing every document in a batch, including the empty parent document.

## What it does

Gets information about all the documents of a batch.

## Definition

```
Document [] GetDocuments ( int sessionId, int batchId );
```

## Parameters

| **Name**  | **Type** | **Description**                                                                            |
| --------- | -------- | ------------------------------------------------------------------------------------------ |
| sessionId | int      | The ID of the connection to the Application Server                                         |
| batchId   | int      | The ID of the batch that contains the documents about which information is to be retrieved |

## Returned value

| **Type**                                              | **Description**                                                                                                                                                                                                                                                                                                         |
| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Document](/flexi-capture/api/structures/document)\[] | The list of all documents in the batch, including the empty document that is the parent document of all the top-level documents in the batch. The collection of top-level documents can be accessed using the ChildrenOrder field of the empty parent document. The ParentId of the empty parent document is set to -1. |
