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

# Specifying structure of a batch

> Describe a batch structure when sending pages to the ABBYY FlexiCapture server via POST: build documents, set a Document Definition, and add parameters.

You can add a description of the batch's structure when sending a batch with several pages by means of a [POST](/flexi-capture/api/files/files) request. The current version supports the following scenarios:

* Creation of documents from pages
* Specifying a Document Definition for a document

The current version supports only one-level documents.

To use these features, add a separate text field with the **BatchStructure** name to the multipart request. This name must contain a json description of the structure of the batch being created and look as follows:

```
{ 
"documents": [ 
               {
                               "template": "Banking_eng",
                               "pages": ["file1.jpg", "file2.jpg"]
                },
               { "pages": ["file3.jpg", "file4.jpg"] }
      ]
}
```

The **template** field is optional and contains the name of one Document Definition in the batch type. The **pages** array contains names of files that are sent in a request (a value from the **filename** is used). They will be used to form a document.

<Note>
  The services does not forbid using one image to create several pages in different documents. This method can be used, for example, to decrease the size of a request.
</Note>

Together with the batch structure, you may use the json file to describe [registration parameters](/flexi-capture/registration-parameters) for documents and/or a batch:

```
{ 
   "regParams": [
      {"name":"batchParam1", "value":"param1value"},
      {"name":"batchParam2", "value":"param2value"}
   ],
   "documents": [
   {
      "template": "Banking_eng",
      "pages": ["file1.jpg", "file2.jpg"],
      "regParams": [
         {"name":"param1", "value":"param1value"},
         {"name":"param2", "value":"param2value"}
      ]
   } 
   ]
}
```
