Specifying structure of a batch
You can add a description of the batch's structure when sending a batch with several pages by means of a POST request. The current version supports the following scenarios:
- Creation of documents from pages
- Specifying a desired Document Definition for a document
Remarque : 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.
Remarque : 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.
Together with the batch structure, you may use the json file to describe 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"}
]
}
]
}
4/12/2024 6:16:03 PM