HTTP request
GET https://api-{location-id}.flexicapture.com/v2/training/layout/{taskId}/{fileId}
{location-id} with your supported location.
Path parameters
| Parameter | Type | Description |
|---|---|---|
taskId | path, string | Required. Task ID. |
fileId | path, string | Required. Source file ID. |
Response
If successful, the response body contains an instance ofTrainingDataViewModel.
{
"task_id": "string",
"file_id": "string",
"pages": [
{
"id": 0,
"number": 0,
"resolution": 0,
"height": 0,
"width": 0
}
],
"fields": [
{
"name": "string",
"value": "string",
"rectangles": [
{
"page_id": 0,
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0
}
],
"cell": {
"table_name": "string",
"row_number": 0,
"column_name": "string"
}
}
],
"tables": [
{
"name": "string",
"regions": [
{
"rectangles": [
{
"page_id": 0,
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0
}
],
"columns": [
{
"left": 0,
"right": 0
}
],
"horizontal_separators": [
0
]
}
]
}
]
}
TrainingDataViewModel
| Field | Type | Description |
|---|---|---|
task_id | string | Required. Task ID. |
file_id | string | Required. File ID. |
pages | Array[PageViewModel] | Optional. List of document pages. |
fields | Array[FieldViewModel] | Required. Set of captured fields. |
tables | Array[TableViewModel] | Optional. Set of captured tables. |
PageViewModel
| Field | Type | Description |
|---|---|---|
id | integer($int32) | Optional. Readonly. Internal page ID. |
number | integer($int32) | Optional. Readonly. Page number. |
resolution | integer($int32) | Optional. Readonly. Page image DPI. |
height | integer($int32) | Optional. Readonly. Page image height. |
width | integer($int32) | Optional. Readonly. Page image width. |
FieldViewModel
| Field | Type | Description |
|---|---|---|
name | string | Required. Field name. |
value | string | Optional. Extracted value. |
rectangles[] | object(RectangleViewModel) | Required. Field rectangles. |
cell | object(CellReferenceViewModel) | Optional. Position of the cell in the table. |
TableViewModel
| Field | Type | Description |
|---|---|---|
name | string | Required. Table name. |
regions[] | object(RegionViewModel) | Required. Table regions. |
RectangleViewModel
| Field | Type | Description |
|---|---|---|
page_id | integer($int32) | Required. Internal page ID. |
x1 | integer($int32) | Required. Coordinate of x1. |
y1 | integer($int32) | Required. Coordinate of y1. |
x2 | integer($int32) | Required. Coordinate of x2. |
y2 | integer($int32) | Required. Coordinate of y2. |
CellReferenceViewModel
| Field | Type | Description |
|---|---|---|
table_name | string | Required. Name of referred table. |
row_number | integer($int32) | Required. Number of referred row. |
column_name | string | Required. Name of referred column. |
RegionViewModel
| Field | Type | Description |
|---|---|---|
rectangles[] | object(RectangleViewModel) | Required. Field rectangle. |
columns[] | object(ColumnViewModel) | Required. Table columns. |
horizontal_separators[] | integer($int32) | Required. Horizontal table separator. |
ColumnViewModel
| Field | Type | Description |
|---|---|---|
left | integer($int32) | Required. Left boundary of the column. |
right | integer($int32) | Required. Right boundary of the column. |
