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

# OpenBatch

> Open a batch and lock it against deletion by other connections with the OpenBatch method of the ABBYY FlexiCapture Web Services API, returning a success flag.

## What it does

Opens a batch (locks it to prevent deletion by other connections). To delete a batch, close it first using the [CloseBatch](/flexi-capture/api/methods/close-batch) method.

## Definition

```
bool OpenBatch ( 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 being opened                   |

## Returned value

| **Type** | **Description**                                                         |
| -------- | ----------------------------------------------------------------------- |
| bool     | A flag that shows whether the operation has been successfully completed |
