Skip to main content
Train a data capture model.

HTTP request

POST https://api-{location-id}.flexicapture.com/v2/training
Replace {location-id} with your supported location.

Request body

The request body contains data with the following structure:
{
  "task_id": "string",
  "file_id": "string",
  "fields": [
    {
      "name": "string",
      "rectangles": [
        {
          "page_id": 0,
          "x1": 0,
          "y1": 0,
          "x2": 0,
          "y2": 0
        }
      ]
    }
  ]
}

Fields

FieldTypeDescription
modelbody, object(TrainingCommandViewModel)Required. Model used for training.

TrainingCommandViewModel

FieldTypeDescription
task_idstringRequired. Task ID.
file_idstringRequired. File ID.
fields[]object(FieldCommandViewModel)Required. Set of fields for training.

FieldCommandViewModel

FieldTypeDescription
namestringRequired. Field name.
rectangles[]object(RectangleViewModel)Required. Field rectangles.

RectangleViewModel

FieldTypeDescription
page_idinteger($int32)Required. Internal page ID.
x1integer($int32)Required. Coordinate of x1.
y1integer($int32)Required. Coordinate of y1.
x2integer($int32)Required. Coordinate of x2.
y2integer($int32)Required. Coordinate of y2.

Response

If successful, the server returns a 204 No Content HTTP status.