OpenAPI SpecificationJSON
API Reference

Rule

Rule object represents arbitrary business rules added to schema objects.

Talk with a Rossum representative about enabling this feature.

Trigger condition

The trigger_condition is a TxScript formula which controls the execution of the list of actions in a rule object.

There are two possible evaluation modes for this condition:

  • simple mode: when the condition does not reference any datapoint, or only reference header fields. Example: len(field.document_id) < 10.
  • line-item mode: when the condition references a line item datapoint (a column of a multivalue table). Example: field.item_amount > 100.0.

In line item mode, the condition is evaluated once for each row of the table, which means multiple actions can potentially be executed. In this case, a deduplication mechanism prevents the creation of duplicate messages (show_message action), duplicate blockers (add_automation_blocker action), and identical emails from being sent (send_email action).

Trigger condition must evaluate strictly to "True", truthy values are not enough to trigger the execution of actions. Wrap your condition with bool(your_condition) if necessary.

Rule actions

Object defines rule actions to be executed when trigger condition is met.

AttributeTypeRead-onlyDescription
idstringnoRule action ID. Needs to be unique within the Rule's actions.
enabledboolnoIf false the action is disabled (default: true).
typestringnoSee the following for the list of possible actions.
payloadobjectnoSee the following for the payload structure for each action.
eventobjectnoActions are configured to be executed on a specific event, see trigger events

Note that just after document import, the initial validation is performed and rules are then executed: the trigger conditions are first evaluated on the latest anntoation content, and then actions registered on validation and annotation_imported events are both executed.

Action Show message

Action: show_message

Event: can be triggered on validation event only.

Payload:

AttributeTypeDescription
typestringOne of: error, warning, info.
contentstringMessage content to be displayed.
schema_idOptional[string]Optional message target field (omit for document scope message).

Action Add automation blocker

Action: add_automation_blocker

Event: can be triggered on validation event only.

Payload:

AttributeTypeDescription
contentstringAutomation blocker content to be displayed.
schema_idOptional[string]Optional automation blocker target field id (omit for document scope automation blocker).

Note: at most one action of type add_automation_blocker can be set up for one rule object.

Action change status

Action: change_status

Event: can be triggered on annotation_imported event only.

Payload:

AttributeTypeDescription
methodstringPossible options: postpone, export, delete, confirm, reject.

Note: at most one action of type change_status can be set up for one rule object.

Action Change queue

This action moves the annotation to another queue with or without re-extraction of the data (see the reimport flag).

Action: change_queue

Event: Can be configured to trigger on annotation_imported, annotation_confirmed or annotation_exported.

Payload:

AttributeTypeDescription
reimportOptional[bool]Flag that controls whether the annotation will be reimported during the action execution.
queue_idintegerID of the target queue.

Note: at most one action of type change_queue can be set up for one rule object.

Action Add label

Action: add_label

Event: can be triggered on validation event only.

Payload:

AttributeTypeDescription
labelslist[url]URLs of label object to be linked to the processed annotation

Note: at most one action of type add_label can be set up for one rule object.

Action Remove label

Action: remove_label

Event: can be triggered on validation event only.

Payload:

AttributeTypeDescription
labelslist[url]URLs of label object to be unlinked from the processed annotation

Note: at most one action of type remove_label can be set up for one rule object.

Action Add / Remove label

Action: add_remove_label

Event: can be triggered on validation event only.

Payload:

AttributeTypeDescription
labelslist[url]URLs of label object to be linked to the processed annotation

The affected labels are added to the annotation when the condition is satisfied, and removed otherwise.

Note: at most one action of type add_remove_label can be set up for one rule object.

Action Show / hide field

Action: show_hide_field

Event: can be triggered on validation event only.

Payload:

AttributeTypeDescription
schema_idsList[string]Set hidden attribute of schema fields according to condition. (Please see schema content

The affected schema field is visible when the condition is satisfied, and is hidden otherwise.

Action Show field

Action: show_field

Event: can be triggered on validation event only.

Payload:

AttributeTypeDescription
schema_idsList[string]Set hidden attribute of schema fields to False. (Please see schema content

Note: at most one action of type show_field can be set up for one rule object.

Action Hide field

Action: hide_field

Event: can be triggered on validation event only.

Payload:

AttributeTypeDescription
schema_idsList[string]Set hidden attribute of schema fields to True. (Please see schema content

Note: at most one action of type hide_field can be set up for one rule object.

Action Add validation source

Adds rules validation source to a datapoint.

Action: add_validation_source

Event: can be triggered on validation event only.

Payload:

AttributeTypeDescription
schema_idstringSchema ID of the datapoint to add the validation source to (Please see schema content

Note: at most one action of type add_validation_source can be set up for one rule object.

Action send email

In line item mode of execution, deduplication mechanism will prevent multiple identical emails from being sent, and at most five emails can be sent by a single action.

Action: send_email

Event: Can be configured to trigger on annotation_imported, annotation_confirmed or annotation_exported.

Payload:

If email_template is defined, the rest of the attributes are ignored.

AttributeTypeDescriptionRequired
email_templatestringEmail template URL.Yes
attach_documentbooleanWhen true document linked to the annotation will be sent together with the email as an attachment (default False).No

If email_template is not defined, then the payload can contain the following attributes:

AttributeTypeDescriptionRequired
toList[string]List of recipients.Yes
subjectstringSubject of the email.Yes
bodystringBody of the email.Yes
ccList[string]List of cc.No
bccList[string]List of bcc.No

Action Exclude from training

This action sets training_enabled to false on the annotation, excluding it from being used for AI training.

Action: exclude_from_training

Event: Can be configured to trigger on annotation_confirmed or annotation_exported.

Payload: none.

Note: at most one action of type exclude_from_training can be set up for one rule object.

Rule

Attribute
Type
Description
id*
read-only
integer

Rule object ID.

url*
read-only
URL

Rule object URL.

name*
string

Name of the rule.

description*
string

Description of the rule.

Default: ""
enabled*
boolean

If false the rule is disabled.

Default: true
organization*
URL

Organization URL.

queues*
list[URL]

List of queues the rule belongs to.

trigger_condition*
string

A condition for triggering the rule's actions. This is a formula evaluated by Rossum TxScript. See Trigger Condition for details.

Default: "True"
created_by*
URL

User who created the rule.

created_at*
datetime

Timestamp of the rule creation.

modified_by*
read-only
URL

User that last modified the object.

modified_at*
read-only
datetime

Timestamp of last modification.

actions*
list[object]

List of the rule action objects.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

type
"error" | "warning" | "info"

Type of message

content
string

Message content to be displayed.

schema_id
string

Optional message target field (omit for document scope message).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_automation_blocker can be set up for one rule object.

content
string

Automation blocker content to be displayed.

schema_id
string

Optional automation blocker target field id (omit for document scope automation blocker).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on annotation_imported event only.

Note: at most one action of type change_status can be set up for one rule object.

method
"postpone" | "export" | "delete" | "confirm" | "reject"

Method.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

This action moves the annotation to another queue with or without re-extraction of the data (see the reimport flag).

Event: Can be configured to trigger on annotation_imported, annotation_confirmed or annotation_exported.

Note: at most one action of type change_queue can be set up for one rule object.

reimport
boolean

Flag that controls whether the annotation will be reimported during the action execution.

queue
URL

Target queue.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type remove_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"add_remove_label"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload.

labels*
list[URL]

URLs of label objects to be linked to the processed annotation.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type show_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to show (set hidden attribute to false).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type hide_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to hide (set hidden attribute to true).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_hide_field"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload. The affected schema fields are visible when the condition is satisfied, and hidden otherwise.

schema_ids*
list[string]

List of schema IDs of fields to show/hide according to condition (sets hidden attribute). See schema content.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Schema depth limit reached.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
email_template
string,null (url)

Email template URL.

attach_document
boolean

When true document linked to the annotation will be sent together with the email as an attachment. Only applicable if email_template is not null.

Default: false
to
list[string]

List of recipients. Only allowed if email_template is not defined. Ignored if email_template is null.

subject
string

Subject of the email. Ignored if email_template is null.

body
string

Body of the email. Ignored if email_template is null.

cc
list[string]

List of cc. Ignored if email_template is null.

bcc
list[string]

List of bcc. Ignored if email_template is null.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"exclude_from_training"
event
"annotation_confirmed" | "annotation_exported"

List rules

GET api / v1 / rules

List all rules objects.

GET
/api/v1/rules
curl -X GET "https://example.rossum.app/api/v1/rules"
{
  "pagination": {
    "next": null,
    "previous": null
  },
  "results": [
    {
      "id": 123,
      "url": "https://example.rossum.app/api/v1/rules/123",
      "name": "rule",
      "description": "Flags invoices missing a required purchase order number.",
      "enabled": true,
      "organization": "string",
      "queues": [
        "https://example.rossum.app/api/v1/queues/101",
        "https://example.rossum.app/api/v1/queues/102"
      ],
      "trigger_condition": "True",
      "created_by": "https://example.rossum.app/api/v1/users/9524",
      "created_at": "2022-01-01T15:02:25.653324Z",
      "modified_by": "https://example.rossum.app/api/v1/users/10775",
      "modified_at": "2021-04-26T10:08:03.856648Z",
      "actions": [
        {
          "id": "f3c43f16-b5f1-4ac8-b789-17d4c26463d7",
          "enabled": true,
          "type": "show_message",
          "event": "validation",
          "payload": {
            "type": "error",
            "content": "No vendor found!",
            "schema_id": "vendor_id"
          }
        }
      ]
    }
  ]
}
{
  "detail": "Bad Request.",
  "code": "bad_request"
}
{
  "detail": "Invalid token.",
  "code": "authentication_failed"
}
{
  "detail": "Access to the requested resource is forbidden.",
  "code": "access_forbidden"
}
{
  "detail": "Not found.",
  "code": "not_found"
}
{
  "detail": "Conflict.",
  "code": "conflict_status"
}
{
  "detail": "Request was rate limited.",
  "code": "rate_limited",
  "url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}
{
  "detail": "Server error.",
  "code": "error"
}
{
  "detail": "Bad Gateway.",
  "code": "bad_gateway"
}
{
  "detail": "Service Unavailable.",
  "code": "service_unavailable"
}
{
  "detail": "Gateway timeout.",
  "code": "gateway_timeout"
}

Response

200OK

OK

Attribute
Type
Description
pagination*
pagination
next
URL

URL for the next page of results. Contains an opaque signed cursor query parameter. Use this URL directly to fetch the next page — do not attempt to construct or modify the cursor value.

previous
URL

URL for the previous page of results. Contains an opaque signed cursor query parameter. Use this URL directly to fetch the previous page — do not attempt to construct or modify the cursor value.

results*
id*
read-only
integer

Rule object ID.

url*
read-only
URL

Rule object URL.

name*
string

Name of the rule.

description*
string

Description of the rule.

Default: ""
enabled*
boolean

If false the rule is disabled.

Default: true
organization*
URL

Organization URL.

queues*
list[URL]

List of queues the rule belongs to.

trigger_condition*
string

A condition for triggering the rule's actions. This is a formula evaluated by Rossum TxScript. See Trigger Condition for details.

Default: "True"
created_by*
URL

User who created the rule.

created_at*
datetime

Timestamp of the rule creation.

modified_by*
read-only
URL

User that last modified the object.

modified_at*
read-only
datetime

Timestamp of last modification.

actions*
list[object]

List of the rule action objects.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

type
"error" | "warning" | "info"

Type of message

content
string

Message content to be displayed.

schema_id
string

Optional message target field (omit for document scope message).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_automation_blocker can be set up for one rule object.

content
string

Automation blocker content to be displayed.

schema_id
string

Optional automation blocker target field id (omit for document scope automation blocker).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on annotation_imported event only.

Note: at most one action of type change_status can be set up for one rule object.

method
"postpone" | "export" | "delete" | "confirm" | "reject"

Method.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

This action moves the annotation to another queue with or without re-extraction of the data (see the reimport flag).

Event: Can be configured to trigger on annotation_imported, annotation_confirmed or annotation_exported.

Note: at most one action of type change_queue can be set up for one rule object.

reimport
boolean

Flag that controls whether the annotation will be reimported during the action execution.

queue
URL

Target queue.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type remove_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"add_remove_label"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload.

labels*
list[URL]

URLs of label objects to be linked to the processed annotation.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type show_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to show (set hidden attribute to false).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type hide_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to hide (set hidden attribute to true).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_hide_field"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload. The affected schema fields are visible when the condition is satisfied, and hidden otherwise.

schema_ids*
list[string]

List of schema IDs of fields to show/hide according to condition (sets hidden attribute). See schema content.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Schema depth limit reached.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
email_template
string,null (url)

Email template URL.

attach_document
boolean

When true document linked to the annotation will be sent together with the email as an attachment. Only applicable if email_template is not null.

Default: false
to
list[string]

List of recipients. Only allowed if email_template is not defined. Ignored if email_template is null.

subject
string

Subject of the email. Ignored if email_template is null.

body
string

Body of the email. Ignored if email_template is null.

cc
list[string]

List of cc. Ignored if email_template is null.

bcc
list[string]

List of bcc. Ignored if email_template is null.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"exclude_from_training"
event
"annotation_confirmed" | "annotation_exported"
400Bad Request

Invalid input data.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

401Unauthorized

The username/password is invalid or token is invalid (e.g. expired).

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

403Forbidden

Insufficient permission, missing authentication, invalid CSRF token and similar issue.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

404Not Found

The specified resource was not found.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

409Conflict

Conflict

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

429Too Many Requests

Request rate is too high, wait before sending more requests. See Rate Limiting for more details.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

url
read-only
string

Link to the rate limiting documentation

500Internal Server Error

Server failure while processing the request.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

502Bad Gateway

Invalid response from the upstream server.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

503Service Unavailable

We're temporarily offline for maintenance. Please try again later.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

504

Upstream server could not complete the request in time.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

Create rule

POST api / v1 / rules

Create a new rule object.

POST
/api/v1/rules
curl -X POST "https://example.rossum.app/api/v1/rules" \  -H "Content-Type: application/json" \  -d '{    "name": "rule"  }'
{
  "id": 123,
  "url": "https://example.rossum.app/api/v1/rules/123",
  "name": "rule",
  "description": "Flags invoices missing a required purchase order number.",
  "enabled": true,
  "organization": "string",
  "queues": [
    "https://example.rossum.app/api/v1/queues/101",
    "https://example.rossum.app/api/v1/queues/102"
  ],
  "trigger_condition": "True",
  "created_by": "https://example.rossum.app/api/v1/users/9524",
  "created_at": "2022-01-01T15:02:25.653324Z",
  "modified_by": "https://example.rossum.app/api/v1/users/10775",
  "modified_at": "2021-04-26T10:08:03.856648Z",
  "actions": [
    {
      "id": "f3c43f16-b5f1-4ac8-b789-17d4c26463d7",
      "enabled": true,
      "type": "show_message",
      "event": "validation",
      "payload": {
        "type": "error",
        "content": "No vendor found!",
        "schema_id": "vendor_id"
      }
    }
  ]
}
{
  "detail": "Bad Request.",
  "code": "bad_request"
}
{
  "detail": "Invalid token.",
  "code": "authentication_failed"
}
{
  "detail": "Access to the requested resource is forbidden.",
  "code": "access_forbidden"
}
{
  "detail": "Not found.",
  "code": "not_found"
}
{
  "detail": "Conflict.",
  "code": "conflict_status"
}
{
  "detail": "Payload Too Large.",
  "code": "payload_too_large"
}
{
  "detail": "Request was rate limited.",
  "code": "rate_limited",
  "url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}
{
  "detail": "Server error.",
  "code": "error"
}
{
  "detail": "Bad Gateway.",
  "code": "bad_gateway"
}
{
  "detail": "Service Unavailable.",
  "code": "service_unavailable"
}
{
  "detail": "Gateway timeout.",
  "code": "gateway_timeout"
}

Request Body

application/json

Attribute
Type
Description
name*
string

Name of the rule.

description
string

Description of the rule.

Default: ""
enabled
boolean

If false the rule is disabled.

Default: true
organization
URL

Organization URL.

queues
list[URL]

List of queues the rule belongs to.

trigger_condition
string

A condition for triggering the rule's actions. This is a formula evaluated by Rossum TxScript. See Trigger Condition for details.

Default: "True"
created_by
URL

User who created the rule.

created_at
datetime

Timestamp of the rule creation.

actions
list[object]

List of the rule action objects.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

type
"error" | "warning" | "info"

Type of message

content
string

Message content to be displayed.

schema_id
string

Optional message target field (omit for document scope message).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_automation_blocker can be set up for one rule object.

content
string

Automation blocker content to be displayed.

schema_id
string

Optional automation blocker target field id (omit for document scope automation blocker).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on annotation_imported event only.

Note: at most one action of type change_status can be set up for one rule object.

method
"postpone" | "export" | "delete" | "confirm" | "reject"

Method.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

This action moves the annotation to another queue with or without re-extraction of the data (see the reimport flag).

Event: Can be configured to trigger on annotation_imported, annotation_confirmed or annotation_exported.

Note: at most one action of type change_queue can be set up for one rule object.

reimport
boolean

Flag that controls whether the annotation will be reimported during the action execution.

queue
URL

Target queue.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type remove_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"add_remove_label"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload.

labels*
list[URL]

URLs of label objects to be linked to the processed annotation.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type show_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to show (set hidden attribute to false).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type hide_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to hide (set hidden attribute to true).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_hide_field"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload. The affected schema fields are visible when the condition is satisfied, and hidden otherwise.

schema_ids*
list[string]

List of schema IDs of fields to show/hide according to condition (sets hidden attribute). See schema content.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Schema depth limit reached.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
email_template
string,null (url)

Email template URL.

attach_document
boolean

When true document linked to the annotation will be sent together with the email as an attachment. Only applicable if email_template is not null.

Default: false
to
list[string]

List of recipients. Only allowed if email_template is not defined. Ignored if email_template is null.

subject
string

Subject of the email. Ignored if email_template is null.

body
string

Body of the email. Ignored if email_template is null.

cc
list[string]

List of cc. Ignored if email_template is null.

bcc
list[string]

List of bcc. Ignored if email_template is null.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"exclude_from_training"
event
"annotation_confirmed" | "annotation_exported"

Response

201Created

Created

Attribute
Type
Description
id*
read-only
integer

Rule object ID.

url*
read-only
URL

Rule object URL.

name*
string

Name of the rule.

description*
string

Description of the rule.

Default: ""
enabled*
boolean

If false the rule is disabled.

Default: true
organization*
URL

Organization URL.

queues*
list[URL]

List of queues the rule belongs to.

trigger_condition*
string

A condition for triggering the rule's actions. This is a formula evaluated by Rossum TxScript. See Trigger Condition for details.

Default: "True"
created_by*
URL

User who created the rule.

created_at*
datetime

Timestamp of the rule creation.

modified_by*
read-only
URL

User that last modified the object.

modified_at*
read-only
datetime

Timestamp of last modification.

actions*
list[object]

List of the rule action objects.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

type
"error" | "warning" | "info"

Type of message

content
string

Message content to be displayed.

schema_id
string

Optional message target field (omit for document scope message).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_automation_blocker can be set up for one rule object.

content
string

Automation blocker content to be displayed.

schema_id
string

Optional automation blocker target field id (omit for document scope automation blocker).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on annotation_imported event only.

Note: at most one action of type change_status can be set up for one rule object.

method
"postpone" | "export" | "delete" | "confirm" | "reject"

Method.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

This action moves the annotation to another queue with or without re-extraction of the data (see the reimport flag).

Event: Can be configured to trigger on annotation_imported, annotation_confirmed or annotation_exported.

Note: at most one action of type change_queue can be set up for one rule object.

reimport
boolean

Flag that controls whether the annotation will be reimported during the action execution.

queue
URL

Target queue.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type remove_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"add_remove_label"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload.

labels*
list[URL]

URLs of label objects to be linked to the processed annotation.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type show_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to show (set hidden attribute to false).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type hide_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to hide (set hidden attribute to true).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_hide_field"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload. The affected schema fields are visible when the condition is satisfied, and hidden otherwise.

schema_ids*
list[string]

List of schema IDs of fields to show/hide according to condition (sets hidden attribute). See schema content.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Schema depth limit reached.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
email_template
string,null (url)

Email template URL.

attach_document
boolean

When true document linked to the annotation will be sent together with the email as an attachment. Only applicable if email_template is not null.

Default: false
to
list[string]

List of recipients. Only allowed if email_template is not defined. Ignored if email_template is null.

subject
string

Subject of the email. Ignored if email_template is null.

body
string

Body of the email. Ignored if email_template is null.

cc
list[string]

List of cc. Ignored if email_template is null.

bcc
list[string]

List of bcc. Ignored if email_template is null.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"exclude_from_training"
event
"annotation_confirmed" | "annotation_exported"
400Bad Request

Invalid input data.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

401Unauthorized

The username/password is invalid or token is invalid (e.g. expired).

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

403Forbidden

Insufficient permission, missing authentication, invalid CSRF token and similar issue.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

404Not Found

The specified resource was not found.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

409Conflict

Conflict

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

413

Payload too large (especially for files uploaded).

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

429Too Many Requests

Request rate is too high, wait before sending more requests. See Rate Limiting for more details.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

url
read-only
string

Link to the rate limiting documentation

500Internal Server Error

Server failure while processing the request.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

502Bad Gateway

Invalid response from the upstream server.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

503Service Unavailable

We're temporarily offline for maintenance. Please try again later.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

504

Upstream server could not complete the request in time.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

Retrieve rule

GET api / v1 / rules / {ruleID}

Retrieve a rule object.

GET
/api/v1/rules/{ruleID}
curl -X GET "https://example.rossum.app/api/v1/rules/0"
{
  "id": 123,
  "url": "https://example.rossum.app/api/v1/rules/123",
  "name": "rule",
  "description": "Flags invoices missing a required purchase order number.",
  "enabled": true,
  "organization": "string",
  "queues": [
    "https://example.rossum.app/api/v1/queues/101",
    "https://example.rossum.app/api/v1/queues/102"
  ],
  "trigger_condition": "True",
  "created_by": "https://example.rossum.app/api/v1/users/9524",
  "created_at": "2022-01-01T15:02:25.653324Z",
  "modified_by": "https://example.rossum.app/api/v1/users/10775",
  "modified_at": "2021-04-26T10:08:03.856648Z",
  "actions": [
    {
      "id": "f3c43f16-b5f1-4ac8-b789-17d4c26463d7",
      "enabled": true,
      "type": "show_message",
      "event": "validation",
      "payload": {
        "type": "error",
        "content": "No vendor found!",
        "schema_id": "vendor_id"
      }
    }
  ]
}
{
  "detail": "Bad Request.",
  "code": "bad_request"
}
{
  "detail": "Invalid token.",
  "code": "authentication_failed"
}
{
  "detail": "Access to the requested resource is forbidden.",
  "code": "access_forbidden"
}
{
  "detail": "Not found.",
  "code": "not_found"
}
{
  "detail": "Conflict.",
  "code": "conflict_status"
}
{
  "detail": "Request was rate limited.",
  "code": "rate_limited",
  "url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}
{
  "detail": "Server error.",
  "code": "error"
}
{
  "detail": "Bad Gateway.",
  "code": "bad_gateway"
}
{
  "detail": "Service Unavailable.",
  "code": "service_unavailable"
}
{
  "detail": "Gateway timeout.",
  "code": "gateway_timeout"
}

Response

200OK

OK

Attribute
Type
Description
id*
read-only
integer

Rule object ID.

url*
read-only
URL

Rule object URL.

name*
string

Name of the rule.

description*
string

Description of the rule.

Default: ""
enabled*
boolean

If false the rule is disabled.

Default: true
organization*
URL

Organization URL.

queues*
list[URL]

List of queues the rule belongs to.

trigger_condition*
string

A condition for triggering the rule's actions. This is a formula evaluated by Rossum TxScript. See Trigger Condition for details.

Default: "True"
created_by*
URL

User who created the rule.

created_at*
datetime

Timestamp of the rule creation.

modified_by*
read-only
URL

User that last modified the object.

modified_at*
read-only
datetime

Timestamp of last modification.

actions*
list[object]

List of the rule action objects.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

type
"error" | "warning" | "info"

Type of message

content
string

Message content to be displayed.

schema_id
string

Optional message target field (omit for document scope message).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_automation_blocker can be set up for one rule object.

content
string

Automation blocker content to be displayed.

schema_id
string

Optional automation blocker target field id (omit for document scope automation blocker).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on annotation_imported event only.

Note: at most one action of type change_status can be set up for one rule object.

method
"postpone" | "export" | "delete" | "confirm" | "reject"

Method.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

This action moves the annotation to another queue with or without re-extraction of the data (see the reimport flag).

Event: Can be configured to trigger on annotation_imported, annotation_confirmed or annotation_exported.

Note: at most one action of type change_queue can be set up for one rule object.

reimport
boolean

Flag that controls whether the annotation will be reimported during the action execution.

queue
URL

Target queue.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type remove_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"add_remove_label"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload.

labels*
list[URL]

URLs of label objects to be linked to the processed annotation.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type show_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to show (set hidden attribute to false).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type hide_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to hide (set hidden attribute to true).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_hide_field"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload. The affected schema fields are visible when the condition is satisfied, and hidden otherwise.

schema_ids*
list[string]

List of schema IDs of fields to show/hide according to condition (sets hidden attribute). See schema content.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Schema depth limit reached.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
email_template
string,null (url)

Email template URL.

attach_document
boolean

When true document linked to the annotation will be sent together with the email as an attachment. Only applicable if email_template is not null.

Default: false
to
list[string]

List of recipients. Only allowed if email_template is not defined. Ignored if email_template is null.

subject
string

Subject of the email. Ignored if email_template is null.

body
string

Body of the email. Ignored if email_template is null.

cc
list[string]

List of cc. Ignored if email_template is null.

bcc
list[string]

List of bcc. Ignored if email_template is null.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"exclude_from_training"
event
"annotation_confirmed" | "annotation_exported"
400Bad Request

Invalid input data.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

401Unauthorized

The username/password is invalid or token is invalid (e.g. expired).

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

403Forbidden

Insufficient permission, missing authentication, invalid CSRF token and similar issue.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

404Not Found

The specified resource was not found.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

409Conflict

Conflict

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

429Too Many Requests

Request rate is too high, wait before sending more requests. See Rate Limiting for more details.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

url
read-only
string

Link to the rate limiting documentation

500Internal Server Error

Server failure while processing the request.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

502Bad Gateway

Invalid response from the upstream server.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

503Service Unavailable

We're temporarily offline for maintenance. Please try again later.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

504

Upstream server could not complete the request in time.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

Partial update rule

PATCH api / v1 / rules / {ruleID}

Update part of rule object.

PATCH
/api/v1/rules/{ruleID}
curl -X PATCH "https://example.rossum.app/api/v1/rules/0" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": 123,
  "url": "https://example.rossum.app/api/v1/rules/123",
  "name": "rule",
  "description": "Flags invoices missing a required purchase order number.",
  "enabled": true,
  "organization": "string",
  "queues": [
    "https://example.rossum.app/api/v1/queues/101",
    "https://example.rossum.app/api/v1/queues/102"
  ],
  "trigger_condition": "True",
  "created_by": "https://example.rossum.app/api/v1/users/9524",
  "created_at": "2022-01-01T15:02:25.653324Z",
  "modified_by": "https://example.rossum.app/api/v1/users/10775",
  "modified_at": "2021-04-26T10:08:03.856648Z",
  "actions": [
    {
      "id": "f3c43f16-b5f1-4ac8-b789-17d4c26463d7",
      "enabled": true,
      "type": "show_message",
      "event": "validation",
      "payload": {
        "type": "error",
        "content": "No vendor found!",
        "schema_id": "vendor_id"
      }
    }
  ]
}
{
  "detail": "Bad Request.",
  "code": "bad_request"
}
{
  "detail": "Invalid token.",
  "code": "authentication_failed"
}
{
  "detail": "Access to the requested resource is forbidden.",
  "code": "access_forbidden"
}
{
  "detail": "Not found.",
  "code": "not_found"
}
{
  "detail": "Conflict.",
  "code": "conflict_status"
}
{
  "detail": "Payload Too Large.",
  "code": "payload_too_large"
}
{
  "detail": "Request was rate limited.",
  "code": "rate_limited",
  "url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}
{
  "detail": "Server error.",
  "code": "error"
}
{
  "detail": "Bad Gateway.",
  "code": "bad_gateway"
}
{
  "detail": "Service Unavailable.",
  "code": "service_unavailable"
}
{
  "detail": "Gateway timeout.",
  "code": "gateway_timeout"
}

Request Body

application/json

Attribute
Type
Description
name
string

Name of the rule.

description
string

Description of the rule.

Default: ""
enabled
boolean

If false the rule is disabled.

Default: true
organization
URL

Organization URL.

queues
list[URL]

List of queues the rule belongs to.

trigger_condition
string

A condition for triggering the rule's actions. This is a formula evaluated by Rossum TxScript. See Trigger Condition for details.

Default: "True"
created_by
URL

User who created the rule.

created_at
datetime

Timestamp of the rule creation.

actions
list[object]

List of the rule action objects.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

type
"error" | "warning" | "info"

Type of message

content
string

Message content to be displayed.

schema_id
string

Optional message target field (omit for document scope message).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_automation_blocker can be set up for one rule object.

content
string

Automation blocker content to be displayed.

schema_id
string

Optional automation blocker target field id (omit for document scope automation blocker).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on annotation_imported event only.

Note: at most one action of type change_status can be set up for one rule object.

method
"postpone" | "export" | "delete" | "confirm" | "reject"

Method.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

This action moves the annotation to another queue with or without re-extraction of the data (see the reimport flag).

Event: Can be configured to trigger on annotation_imported, annotation_confirmed or annotation_exported.

Note: at most one action of type change_queue can be set up for one rule object.

reimport
boolean

Flag that controls whether the annotation will be reimported during the action execution.

queue
URL

Target queue.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type remove_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"add_remove_label"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload.

labels*
list[URL]

URLs of label objects to be linked to the processed annotation.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type show_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to show (set hidden attribute to false).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type hide_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to hide (set hidden attribute to true).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_hide_field"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload. The affected schema fields are visible when the condition is satisfied, and hidden otherwise.

schema_ids*
list[string]

List of schema IDs of fields to show/hide according to condition (sets hidden attribute). See schema content.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Schema depth limit reached.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
email_template
string,null (url)

Email template URL.

attach_document
boolean

When true document linked to the annotation will be sent together with the email as an attachment. Only applicable if email_template is not null.

Default: false
to
list[string]

List of recipients. Only allowed if email_template is not defined. Ignored if email_template is null.

subject
string

Subject of the email. Ignored if email_template is null.

body
string

Body of the email. Ignored if email_template is null.

cc
list[string]

List of cc. Ignored if email_template is null.

bcc
list[string]

List of bcc. Ignored if email_template is null.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"exclude_from_training"
event
"annotation_confirmed" | "annotation_exported"

Response

200OK

OK

Attribute
Type
Description
id*
read-only
integer

Rule object ID.

url*
read-only
URL

Rule object URL.

name*
string

Name of the rule.

description*
string

Description of the rule.

Default: ""
enabled*
boolean

If false the rule is disabled.

Default: true
organization*
URL

Organization URL.

queues*
list[URL]

List of queues the rule belongs to.

trigger_condition*
string

A condition for triggering the rule's actions. This is a formula evaluated by Rossum TxScript. See Trigger Condition for details.

Default: "True"
created_by*
URL

User who created the rule.

created_at*
datetime

Timestamp of the rule creation.

modified_by*
read-only
URL

User that last modified the object.

modified_at*
read-only
datetime

Timestamp of last modification.

actions*
list[object]

List of the rule action objects.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

type
"error" | "warning" | "info"

Type of message

content
string

Message content to be displayed.

schema_id
string

Optional message target field (omit for document scope message).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_automation_blocker can be set up for one rule object.

content
string

Automation blocker content to be displayed.

schema_id
string

Optional automation blocker target field id (omit for document scope automation blocker).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on annotation_imported event only.

Note: at most one action of type change_status can be set up for one rule object.

method
"postpone" | "export" | "delete" | "confirm" | "reject"

Method.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

This action moves the annotation to another queue with or without re-extraction of the data (see the reimport flag).

Event: Can be configured to trigger on annotation_imported, annotation_confirmed or annotation_exported.

Note: at most one action of type change_queue can be set up for one rule object.

reimport
boolean

Flag that controls whether the annotation will be reimported during the action execution.

queue
URL

Target queue.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type remove_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"add_remove_label"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload.

labels*
list[URL]

URLs of label objects to be linked to the processed annotation.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type show_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to show (set hidden attribute to false).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type hide_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to hide (set hidden attribute to true).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_hide_field"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload. The affected schema fields are visible when the condition is satisfied, and hidden otherwise.

schema_ids*
list[string]

List of schema IDs of fields to show/hide according to condition (sets hidden attribute). See schema content.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Schema depth limit reached.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
email_template
string,null (url)

Email template URL.

attach_document
boolean

When true document linked to the annotation will be sent together with the email as an attachment. Only applicable if email_template is not null.

Default: false
to
list[string]

List of recipients. Only allowed if email_template is not defined. Ignored if email_template is null.

subject
string

Subject of the email. Ignored if email_template is null.

body
string

Body of the email. Ignored if email_template is null.

cc
list[string]

List of cc. Ignored if email_template is null.

bcc
list[string]

List of bcc. Ignored if email_template is null.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"exclude_from_training"
event
"annotation_confirmed" | "annotation_exported"
400Bad Request

Invalid input data.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

401Unauthorized

The username/password is invalid or token is invalid (e.g. expired).

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

403Forbidden

Insufficient permission, missing authentication, invalid CSRF token and similar issue.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

404Not Found

The specified resource was not found.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

409Conflict

Conflict

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

413

Payload too large (especially for files uploaded).

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

429Too Many Requests

Request rate is too high, wait before sending more requests. See Rate Limiting for more details.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

url
read-only
string

Link to the rate limiting documentation

500Internal Server Error

Server failure while processing the request.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

502Bad Gateway

Invalid response from the upstream server.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

503Service Unavailable

We're temporarily offline for maintenance. Please try again later.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

504

Upstream server could not complete the request in time.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

Delete rule

DELETE api / v1 / rules / {ruleID}

Delete rule object.

DELETE
/api/v1/rules/{ruleID}
curl -X DELETE "https://example.rossum.app/api/v1/rules/0"
Empty
{
  "detail": "Bad Request.",
  "code": "bad_request"
}
{
  "detail": "Invalid token.",
  "code": "authentication_failed"
}
{
  "detail": "Access to the requested resource is forbidden.",
  "code": "access_forbidden"
}
{
  "detail": "Not found.",
  "code": "not_found"
}
{
  "detail": "Conflict.",
  "code": "conflict_status"
}
{
  "detail": "Request was rate limited.",
  "code": "rate_limited",
  "url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}
{
  "detail": "Server error.",
  "code": "error"
}
{
  "detail": "Bad Gateway.",
  "code": "bad_gateway"
}
{
  "detail": "Service Unavailable.",
  "code": "service_unavailable"
}
{
  "detail": "Gateway timeout.",
  "code": "gateway_timeout"
}

Response

204No Content

No Content

No response body.

400Bad Request

Invalid input data.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

401Unauthorized

The username/password is invalid or token is invalid (e.g. expired).

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

403Forbidden

Insufficient permission, missing authentication, invalid CSRF token and similar issue.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

404Not Found

The specified resource was not found.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

409Conflict

Conflict

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

429Too Many Requests

Request rate is too high, wait before sending more requests. See Rate Limiting for more details.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

url
read-only
string

Link to the rate limiting documentation

500Internal Server Error

Server failure while processing the request.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

502Bad Gateway

Invalid response from the upstream server.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

503Service Unavailable

We're temporarily offline for maintenance. Please try again later.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

504

Upstream server could not complete the request in time.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

Update rule

PUT api / v1 / rules / {ruleID}

Update rule object.

PUT
/api/v1/rules/{ruleID}
curl -X PUT "https://example.rossum.app/api/v1/rules/0" \  -H "Content-Type: application/json" \  -d '{    "name": "rule"  }'
{
  "id": 123,
  "url": "https://example.rossum.app/api/v1/rules/123",
  "name": "rule",
  "description": "Flags invoices missing a required purchase order number.",
  "enabled": true,
  "organization": "string",
  "queues": [
    "https://example.rossum.app/api/v1/queues/101",
    "https://example.rossum.app/api/v1/queues/102"
  ],
  "trigger_condition": "True",
  "created_by": "https://example.rossum.app/api/v1/users/9524",
  "created_at": "2022-01-01T15:02:25.653324Z",
  "modified_by": "https://example.rossum.app/api/v1/users/10775",
  "modified_at": "2021-04-26T10:08:03.856648Z",
  "actions": [
    {
      "id": "f3c43f16-b5f1-4ac8-b789-17d4c26463d7",
      "enabled": true,
      "type": "show_message",
      "event": "validation",
      "payload": {
        "type": "error",
        "content": "No vendor found!",
        "schema_id": "vendor_id"
      }
    }
  ]
}
{
  "detail": "Bad Request.",
  "code": "bad_request"
}
{
  "detail": "Invalid token.",
  "code": "authentication_failed"
}
{
  "detail": "Access to the requested resource is forbidden.",
  "code": "access_forbidden"
}
{
  "detail": "Not found.",
  "code": "not_found"
}
{
  "detail": "Conflict.",
  "code": "conflict_status"
}
{
  "detail": "Payload Too Large.",
  "code": "payload_too_large"
}
{
  "detail": "Request was rate limited.",
  "code": "rate_limited",
  "url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}
{
  "detail": "Server error.",
  "code": "error"
}
{
  "detail": "Bad Gateway.",
  "code": "bad_gateway"
}
{
  "detail": "Service Unavailable.",
  "code": "service_unavailable"
}
{
  "detail": "Gateway timeout.",
  "code": "gateway_timeout"
}

Request Body

application/json

Attribute
Type
Description
name*
string

Name of the rule.

description
string

Description of the rule.

Default: ""
enabled
boolean

If false the rule is disabled.

Default: true
organization
URL

Organization URL.

queues
list[URL]

List of queues the rule belongs to.

trigger_condition
string

A condition for triggering the rule's actions. This is a formula evaluated by Rossum TxScript. See Trigger Condition for details.

Default: "True"
created_by
URL

User who created the rule.

created_at
datetime

Timestamp of the rule creation.

actions
list[object]

List of the rule action objects.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

type
"error" | "warning" | "info"

Type of message

content
string

Message content to be displayed.

schema_id
string

Optional message target field (omit for document scope message).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_automation_blocker can be set up for one rule object.

content
string

Automation blocker content to be displayed.

schema_id
string

Optional automation blocker target field id (omit for document scope automation blocker).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on annotation_imported event only.

Note: at most one action of type change_status can be set up for one rule object.

method
"postpone" | "export" | "delete" | "confirm" | "reject"

Method.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

This action moves the annotation to another queue with or without re-extraction of the data (see the reimport flag).

Event: Can be configured to trigger on annotation_imported, annotation_confirmed or annotation_exported.

Note: at most one action of type change_queue can be set up for one rule object.

reimport
boolean

Flag that controls whether the annotation will be reimported during the action execution.

queue
URL

Target queue.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type remove_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"add_remove_label"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload.

labels*
list[URL]

URLs of label objects to be linked to the processed annotation.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type show_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to show (set hidden attribute to false).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type hide_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to hide (set hidden attribute to true).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_hide_field"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload. The affected schema fields are visible when the condition is satisfied, and hidden otherwise.

schema_ids*
list[string]

List of schema IDs of fields to show/hide according to condition (sets hidden attribute). See schema content.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Schema depth limit reached.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
email_template
string,null (url)

Email template URL.

attach_document
boolean

When true document linked to the annotation will be sent together with the email as an attachment. Only applicable if email_template is not null.

Default: false
to
list[string]

List of recipients. Only allowed if email_template is not defined. Ignored if email_template is null.

subject
string

Subject of the email. Ignored if email_template is null.

body
string

Body of the email. Ignored if email_template is null.

cc
list[string]

List of cc. Ignored if email_template is null.

bcc
list[string]

List of bcc. Ignored if email_template is null.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"exclude_from_training"
event
"annotation_confirmed" | "annotation_exported"

Response

200OK

OK

Attribute
Type
Description
id*
read-only
integer

Rule object ID.

url*
read-only
URL

Rule object URL.

name*
string

Name of the rule.

description*
string

Description of the rule.

Default: ""
enabled*
boolean

If false the rule is disabled.

Default: true
organization*
URL

Organization URL.

queues*
list[URL]

List of queues the rule belongs to.

trigger_condition*
string

A condition for triggering the rule's actions. This is a formula evaluated by Rossum TxScript. See Trigger Condition for details.

Default: "True"
created_by*
URL

User who created the rule.

created_at*
datetime

Timestamp of the rule creation.

modified_by*
read-only
URL

User that last modified the object.

modified_at*
read-only
datetime

Timestamp of last modification.

actions*
list[object]

List of the rule action objects.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

type
"error" | "warning" | "info"

Type of message

content
string

Message content to be displayed.

schema_id
string

Optional message target field (omit for document scope message).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_automation_blocker can be set up for one rule object.

content
string

Automation blocker content to be displayed.

schema_id
string

Optional automation blocker target field id (omit for document scope automation blocker).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on annotation_imported event only.

Note: at most one action of type change_status can be set up for one rule object.

method
"postpone" | "export" | "delete" | "confirm" | "reject"

Method.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

This action moves the annotation to another queue with or without re-extraction of the data (see the reimport flag).

Event: Can be configured to trigger on annotation_imported, annotation_confirmed or annotation_exported.

Note: at most one action of type change_queue can be set up for one rule object.

reimport
boolean

Flag that controls whether the annotation will be reimported during the action execution.

queue
URL

Target queue.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type add_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type remove_label can be set up for one rule object.

labels
list[URL]
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"add_remove_label"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload.

labels*
list[URL]

URLs of label objects to be linked to the processed annotation.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type show_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to show (set hidden attribute to false).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Event: can be triggered on validation event only.

Note: at most one action of type hide_field can be set up for one rule object.

schema_ids
list[string]

List of schema IDs of fields to hide (set hidden attribute to true).

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_hide_field"

Action type.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Action payload. The affected schema fields are visible when the condition is satisfied, and hidden otherwise.

schema_ids*
list[string]

List of schema IDs of fields to show/hide according to condition (sets hidden attribute). See schema content.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object

Schema depth limit reached.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
email_template
string,null (url)

Email template URL.

attach_document
boolean

When true document linked to the annotation will be sent together with the email as an attachment. Only applicable if email_template is not null.

Default: false
to
list[string]

List of recipients. Only allowed if email_template is not defined. Ignored if email_template is null.

subject
string

Subject of the email. Ignored if email_template is null.

body
string

Body of the email. Ignored if email_template is null.

cc
list[string]

List of cc. Ignored if email_template is null.

bcc
list[string]

List of bcc. Ignored if email_template is null.

id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"show_message" | "add_automation_blocker" | "change_status" | "change_queue" | "add_label" | "remove_label" | "show_field" | "hide_field" | "add_validation_source" | "send_email" | "custom" | "exclude_from_training"

Type of the action to be executed.

event
"validation" | "annotation_imported" | "annotation_confirmed" | "annotation_exported"

Event on which the action should be triggered.

payload
object
id
string

Rule action ID. Needs to be unique within the Rule's actions.

enabled
boolean

If false the action is disabled.

Default: true
type
"exclude_from_training"
event
"annotation_confirmed" | "annotation_exported"
400Bad Request

Invalid input data.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

401Unauthorized

The username/password is invalid or token is invalid (e.g. expired).

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

403Forbidden

Insufficient permission, missing authentication, invalid CSRF token and similar issue.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

404Not Found

The specified resource was not found.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

409Conflict

Conflict

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

413

Payload too large (especially for files uploaded).

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

429Too Many Requests

Request rate is too high, wait before sending more requests. See Rate Limiting for more details.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

url
read-only
string

Link to the rate limiting documentation

500Internal Server Error

Server failure while processing the request.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

502Bad Gateway

Invalid response from the upstream server.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

503Service Unavailable

We're temporarily offline for maintenance. Please try again later.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error

504

Upstream server could not complete the request in time.

Attribute
Type
Description
detail
read-only
string

Detail of the error

code
read-only
string

Code of the error