Annotation Content

Partial update grid

Apply multiple operations on a grid and perform OCR on modified cell datapoints. Update the multivalue with the new grid.

Operations are grouped in rows operations and columns operations.

Possible operations:

axisoprequired parametersOCRResult
columnsupdateschema_idYesUpdate column datapoints
columnsdeleteschema_idNoSet content to empty for column datapoints
rowscreaterow_indexYesInsert a new row, create datapoints and perform OCR
rowsupdaterow_index, tuple_idYesUpdate datapoints via OCR
rowsdeletetuple_idNoDelete the tuple associated to this row

OCR is performed only for rows of extractable type as defined in the multivalue schema by row_types_to_extract, or by default for rows of type data only.

post/api/v1/annotations/{annotationID}/content/{multivalueID}/grid_parts_operations

Path parameters

annotationIDinteger required

Annotation ID

multivalueIDinteger required

ID of the multivalue

Query parameters

full_responseboolean

Use this parameter to get all datapoints in the grid part in the response

Request body

grid_indexinteger required

Index of the grid part

Response

OK - Returns updated multivalue content as a tree. By default, only updated datapoints and updated grid are returned. Add ?full_response=true to get all the datapoints in this grid.

idinteger required

A unique ID of a given object.

urlstring uri required

URL of a given object.

schema_idstring required

Reference mapping the object to the schema tree.

category'multivalue' required

Type of the object.

hiddenboolean

If set to true, the datapoint is not visible in the user interface, but remains stored in the database.

time_spentnumber float required

Time spent while actively working on a given node, in seconds.

time_spent_overallnumber float required

Total time spent while validating a given node, in seconds. Only for internal purposes.

time_spent_gridnumber float required

Total time spent while actively working on a grid, in seconds. Only for internal purposes.

time_spent_grid_overallnumber float required

Total time spent while validating a given grid, in seconds. Only for internal purposes.

Example response

{
  "id": 27801933,
  "url": "https://example.rossum.app/api/v1/annotations/319668/content/27801933",
  "schema_id": "some_id",
  "children": [
    {
      "id": 27801933,
      "url": "https://example.rossum.app/api/v1/annotations/319668/content/27801933",
      "schema_id": "some_id",
      "children": [
        {
          "id": 27801933,
          "url": "https://example.rossum.app/api/v1/annotations/319668/content/27801933",
          "schema_id": "some_id",
          "content": {
            "value": "8/12/24",
            "normalized_value": "12-08-2024",
            "page": 1,
            "position": [
              202.3,
              100.1,
              110.442,
              110
            ],
            "rir_text": "8/12/24",
            "rir_raw_text": "8/I2/24",
            "rir_page": 1,
            "rir_position": [
              202.3,
              100.1,
              110.442,
              110
            ],
            "rir_confidence": 0.954233451,
            "connector_text": "8/I2/24",
            "connector_position": [
              200,
              100,
              110,
              110
            ],
            "ocr_text": null,
            "ocr_raw_text": null,
            "ocr_position": null
          },
          "validation_sources": [
            "score"
          ]
        }
      ]
    }
  ],
  "grid": {
    "parts": [
      {
        "page": 1,
        "columns": [
          {
            "left_position": 12.1,
            "schema_id": "item_description",
            "header_texts": [
              "Item description"
            ]
          }
        ],
        "rows": [
          {
            "top_position": 112.29,
            "tuple_id": 1,
            "type": "data"
          }
        ],
        "width": 123.2,
        "height": 513.2
      }
    ]
  }
}

Changes

No recorded changes to this endpoint across all 2 revisions of this API.