---
title: "Bulk update annotation content"
method: POST
path: "/api/v1/annotations/{annotationID}/content/operations"
tags: ["Annotation Content"]
---

# Bulk update annotation content

`POST /api/v1/annotations/{annotationID}/content/operations`

Allows to specify a sequence of operations that should be performed on particular datapoint objects.

To replace a `datapoint` value (or other supported attribute), use *replace* operation.
To add a new row into a table `multivalue`, use *add* operation.
To remove a row from a multivalue, use *remove* operation.

Please note that only `multivalue` children datapoints may be removed.
Please note that `section`, `multivalue` and `tuple` should not be updated.

## Path parameters

- `annotationID` integer, required

## Request body

- BulkOperationsRequest
  - `operations` union[], required — List of operations to perform on annotation content
    - union
      - OperationReplace — Replace operation to update a datapoint value or other supported attributes
        - `op` 'replace', required — Type of operation
        - `id` integer, required — Datapoint id
        - `value` object, required — Updated data. Only `value`, `position`, `page`, `validation_sources`, `hidden` and `options` attributes may be updated. Please note that `value` is parsed and formatted. When both `value` and `normalized_value` are specified, they must match, otherwise datapoint won't be modified.
          - `content` object
            - `value` string — The extracted data of a given node. Maximum length: 1500 UTF characters.
            - `normalized_value` string, nullable — When both value and normalized_value are specified, they must match, otherwise datapoint won't be modified (this may be changed in the future).
            - `position` number[] — List of the coordinates of the label box of the given node. (left, top, right, bottom)
            - `page` integer — Number of page where the data is situated (see position).
          - `validation_sources` string[] — Optional list of validation sources to set for all fields of the row by default
          - `hidden` boolean — If set to true, the datapoint is not visible in the user interface, but remains stored in the database.
          - `options` object[] — Enum option object with value and label.
            - `value` string — Value of the option.
            - `label` string — User-friendly label for the option, shown in the UI.
      - OperationAdd — Add operation to add a new row into a table multivalue or add one child datapoint to simple multivalue
        - `op` 'add', required — Type of operation
        - `id` integer, required — Multivalue id (parent of new datapoint)
        - `value` union, required
          - object[] — List of objects for adding a row to table multivalue
            - `schema_id` string, required — Reference to schema (required)
            - `content` object
              - …
            - `validation_sources` string[] — Optional list of validation sources to set for all fields of the row by default
            - `hidden` boolean — If set to true, the datapoint is not visible in the user interface, but remains stored in the database.
            - `options` object[] — Enum option object with value and label.
              - …
          - object — Object for adding one child datapoint to simple multivalue
            - `content` object
              - …
            - `validation_sources` string[] — Optional list of validation sources to set for all fields of the row by default
            - `hidden` boolean — If set to true, the datapoint is not visible in the user interface, but remains stored in the database.
            - `options` object[] — Enum option object with value and label.
              - …
      - OperationRemove — Remove operation to remove a row from a multivalue. Only multivalue children datapoints may be removed.
        - `op` 'remove', required — Type of operation
        - `id` integer, required — Datapoint id to remove

## Response `200`

OK

- AnnotationContent
  - `content` AnnotationContentSection[] — Represents the full content of an annotation, composed of sections and datapoints.
    - `id` integer, required — A unique ID of a given section.
    - `url` string, uri, required — URL of the section.
    - `schema_id` string, required — Reference mapping the object to the schema tree.
    - `category` 'section', required — The category of the object, which is 'section'.
    - `children` union[], required — Datapoints, multivalues and tuples that belong to the section.
      - union — Represents a datapoint, multivalue, or tuple object within the annotation content.
        - object — A container for a list of datapoints or tuples, used to represent recurring items or table rows.
          - `id` integer, required — A unique ID of a given object.
          - `url` string, uri, required — URL of a given object.
          - `schema_id` string, required — Reference mapping the object to the schema tree.
          - `category` 'multivalue', required — Type of the object.
          - `hidden` boolean — If set to true, the datapoint is not visible in the user interface, but remains stored in the database.
          - `children` union[], required
            - union — Represents a datapoint or tuple object within the multivalue context.
              - …
          - `grid` AnnotationContentGrid, required — Defines the grid structure for a multivalue object.
            - `parts` object[]
              - …
          - `time_spent` number, float, required — Time spent while actively working on a given node, in seconds.
          - `time_spent_overall` number, float, required — Total time spent while validating a given node, in seconds. Only for internal purposes.
          - `time_spent_grid` number, float, required — Total time spent while actively working on a grid, in seconds. Only for internal purposes.
          - `time_spent_grid_overall` number, float, required — Total time spent while validating a given grid, in seconds. Only for internal purposes.
        - object — A container for a set of related datapoints, representing a table row. Must be nested within a multivalue.
          - `id` integer, required — A unique ID of a given object.
          - `url` string, uri, required — URL of a given object.
          - `schema_id` string, required — Reference mapping the object to the schema tree.
          - `category` 'tuple', required — Type of the object.
          - `hidden` boolean — If set to true, the datapoint is not visible in the user interface, but remains stored in the database.
          - `children` AnnotationContentDatapoint[], required
            - `id` integer, required — A unique ID of a given object.
            - `url` string, uri, required — URL of a given object.
            - `schema_id` string, required — Reference mapping the object to the schema tree.
            - `category` 'datapoint', required — Type of the object.
            - `hidden` boolean — If set to true, the datapoint is not visible in the user interface, but remains stored in the database.
            - `content` AnnotationContentDatapointContent, required — A dictionary of the writable attributes of a given datapoint. Can be null for datapoints of type `button`.
              - …
            - `validation_sources` ValidationSource[], required — See [Validation Source](#validation-source) for details.
            - `time_spent` number, float, required — Time spent while actively working on a given node, in seconds.
            - `time_spent_overall` number, float, required — Total time spent while validating a given node, in seconds. Only for internal purposes.
            - `no_recalculation` boolean — If set to true, the datapoint's formula is not recalculated automatically. Only available for datapoint category editable formula datapoints.
        - object — A datapoint with a single value.
          - `id` integer, required — A unique ID of a given object.
          - `url` string, uri, required — URL of a given object.
          - `schema_id` string, required — Reference mapping the object to the schema tree.
          - `category` 'datapoint', required — Type of the object.
          - `hidden` boolean — If set to true, the datapoint is not visible in the user interface, but remains stored in the database.
          - `content` AnnotationContentDatapointContent, required — A dictionary of the writable attributes of a given datapoint. Can be null for datapoints of type `button`.
            - `value` string — The extracted data of a given node. Maximum length: 1500 UTF characters.
            - `normalized_value` string, nullable — Normalized value for date (in ISO 8601 format) and number fields (in JSON number format).
            - `page` integer, nullable — Number of page where the data is situated (see position).
            - `position` number[], nullable — List of the coordinates of the label box of the given node. (left, top, right, bottom)
            - `rir_text` string, nullable — The extracted text, used as a reference for data extraction models.
            - `rir_raw_text` string, nullable — Raw extracted text (only for internal purposes, may be removed in the future).
            - `rir_page` integer, nullable — The extracted page, used as a reference for data extraction models.
            - `rir_position` number[], nullable — The extracted position, used as a reference for data extraction models. (left, top, right, bottom)
            - `rir_confidence` number, float, nullable — Confidence (estimated probability) that this field was extracted correctly.
            - `connector_text` string, nullable — Text set by the connector.
            - `connector_position` number[], nullable — Position set by the connector. (left, top, right, bottom)
            - `ocr_text` string, nullable — Value extracted by OCR, if applicable. (only for internal purposes, may be removed in the future)
            - `ocr_raw_text` string, nullable — Raw value extracted by OCR, if applicable. (only for internal purposes, may be removed in the future)
            - `ocr_position` number[], nullable — OCR position, if applicable. (left, top, right, bottom) (only for internal purposes, may be removed in the future)
          - `validation_sources` ValidationSource[], required — See [Validation Source](#validation-source) for details.
          - `time_spent` number, float, required — Time spent while actively working on a given node, in seconds.
          - `time_spent_overall` number, float, required — Total time spent while validating a given node, in seconds. Only for internal purposes.
          - `no_recalculation` boolean — If set to true, the datapoint's formula is not recalculated automatically. Only available for datapoint category editable formula datapoints.

## Other responses

- `400` — Invalid input data.
- `401` — The username/password is invalid or token is invalid (e.g. expired).
- `403` — Insufficient permission, missing authentication, invalid CSRF token and similar issue.
- `404` — The specified resource was not found.
- `409` — Conflict
- `413` — Payload too large (especially for files uploaded).
- `429` — Request rate is too high, wait before sending more requests. See [Rate Limiting](/guides/overview#rate-limiting) for more details.
- `500` — Server failure while processing the request.
- `502` — Invalid response from the upstream server.
- `503` — We're temporarily offline for maintenance. Please try again later.
- `504` — Upstream server could not complete the request in time.

---

[API](https://skmtc.dev/rossum/apis/rossum-api.md) · [All operations](https://skmtc.dev/rossum/apis/rossum-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rossum/rossum-api/revisions/f1b5a910991d/schema)
