Rossum API (v1)

Download OpenAPI specification:

The Rossum API allows for programmatic access to manage your organization's data and account information.

We do our best to keep things accurate and complete. If you find any inaccuracies or gaps in this guide, please reach out to support@rossum.ai.

Getting Started

Introduction

The Rossum API allows you to programmatically access and manage your organization's Rossum data and account information. The API allows you to do the following programmatically:

On this page, you will find an introduction to the API usage from a developer perspective, and a reference to all the API objects and methods.

Developer Resources

There are several other key resources related to implementing, integrating and extending the Rossum platform:

Note: You may find historical references to the Rossum API as the "Elis Document Management API". Also, formerly a different, Data Extraction API (or DE API) was also available and you may find references to it in some materials. The API is now deprecated.

We have prepared an API Migration Guide for users of the legacy API.

Quick API Tutorial

For a quick tutorial on how to authenticate, upload a document and export extracted data, see the sections below. If you want to skip this quick tutorial, continue directly to the Overview section.

It is a good idea to go through the introduction to the Rossum platform on the Developer Portal first to make sure you are up to speed on the basic Rossum concepts.

If in trouble, feel free to contact us at support@rossum.ai.

Install curl tool

All code samples included in this API documentation use curl, the command line data transfer tool. On MS Windows 10, MacOS X and most Linux distributions, curl should already be pre-installed. If not, please download it from curl.haxx.se). A sample curl command to Rossum API would look like this:

curl -H 'Content-Type: application/json' \
  -d '{"username": "east-west-trading-co@example.com", "password": "aCo2ohghBo8Oghai"}' \
  'https://<example>.rossum.app/api/v1/auth/login'

Example response:

{"key": "db313f24f5738c8e04635e036ec8a45cdd6d6b03"}

You may also want to install jq tool to make curl output human-readable:

curl -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' -H 'Content-Type: application/json' \
  'https://example.rossum.app/api/v1/groups' | jq

Formatted JSON response:

{
  "pagination": {
    ...
  },
  "results": [
    {
      "id": 1,
      "url": "https://example.rossum.app/api/v1/groups/1",
      "name": "viewer"
    },
    ...
  ]
}

Use the API on Windows

This API documentation is written for usage in command line interpreters running on UNIX based operation systems (Linux and Mac). Windows users may need to use the following substitutions when working with API:

Character used in this documentation Meaning/usage Substitute character for Windows users
' single quotes "
" double quotes "" or \"
\ continue the command on the next line ^

Example for Unix-based systems:

curl -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' -H 'Content-Type: application/json' \
  -d '{"target_queue": "https://example.rossum.app/api/v1/queues/8236", "target_status": "to_review"}' \
  'https://example.rossum.app/api/v1/annotations/315777/copy'

Equivalent commands for Windows:

curl -H "Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03" -H "Content-Type: application/json" ^
  -d "{""target_queue"": ""https://example.rossum.app/api/v1/queues/8236"", ""target_status"": ""to_review""}" ^
  "https://example.rossum.app/api/v1/annotations/315777/copy"


curl -H "Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03" -H "Content-Type: application/json" ^
  -d "{\"target_queue\": \"https://example.rossum.app/api/v1/queues/8236\", \"target_status\": \"to_review\"}" ^
  "https://example.rossum.app/api/v1/annotations/315777/copy"

Create an account

In order to interact with the API, you need an account. If you do not have one, you can create one via our self-service portal.

Login to the account

Fill-in your username and password (login credentials to work with API are the same as those to log into your account.). Trigger login endpoint to obtain a key (token), that can be used in subsequent calls.

Example login request:

curl -s -H 'Content-Type: application/json' \
  -d '{"username": "east-west-trading-co@example.com", "password": "aCo2ohghBo8Oghai"}' \
  'https://example.rossum.app/api/v1/auth/login'

Login response:

{"key": "db313f24f5738c8e04635e036ec8a45cdd6d6b03"}

This key will be valid for a default expire time (currently 162 hours) or until you log out from the sessions.

Warning: If you write the whole curl command on a single line rather than several as in our example, do not include the ending "\" character as part of the command.

Upload a document

In order to upload a document (PDF, image, XLSX, XLS, DOCX, DOC) through the API, you need to obtain the id of a queue first:

curl -s -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  'https://example.rossum.app/api/v1/queues?page_size=1' | jq -r .results[0].url

Example response:

https://example.rossum.app/api/v1/queues/8199

Then you can upload document to the queue. Alternatively, you can send documents to a queue-related inbox. See upload for more information about importing files. Example request:

curl -s -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  -F content=@document.pdf 'https://example.rossum.app/api/v1/uploads?queue=8199' | jq -r .url

Example response with task URL:

https://example.rossum.app/api/v1/tasks/9231

Wait for document to be ready and review extracted data

As soon as a document is uploaded, it will show up in the queue and the data extraction will begin. It may take a few seconds to several minutes to process a document. You can check status of the annotation and wait until its status is changed to to_review:

curl -s -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  'https://example.rossum.app/api/v1/annotations/319668' | jq .status

Result:

"to_review"

After that, you can open the Rossum web interface example.rossum.app to review and confirm extracted data.

Download reviewed data

Now you can export extracted data using the export endpoint of the queue. You can select XML, CSV, XLSX or JSON format. For CSV, use URL like:

curl -s -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  'https://example.rossum.app/api/v1/queues/8199/export?status=exported&format=csv&id=319668'

Example response:

Invoice number,Invoice Date,PO Number,Due date,Vendor name,Vendor ID,Customer name,Customer ID,Total amount,
2183760194,2018-06-08,PO2231233,2018-06-08,Alza.cz a.s.,02231233,Rossum,05222322,500.00

Logout

Finally you can dispose token safely using logout endpoint:

curl -s -X POST -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  'https://example.rossum.app/api/v1/auth/logout'

Logout response:

{"detail":"Successfully logged out."}

Overview

HTTP and REST

The Rossum API is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients.

HTTP Verbs

Call the API using the following standard HTTP methods:

  • GET to retrieve an object or multiple objects in a specific category
  • POST to create an object
  • PUT to modify entire object
  • PATCH to modify fields of the object
  • DELETE to delete an object

We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web application. JSON is returned by API responses, including errors (except when another format is requested, e.g. XML).

Note: When making HTTP requests, be sure to use proper header 'Content-Type:application/json'.

Base URL

Base API endpoint URL depends on the account type, deployment and location. Default URL is https://example.rossum.app/api where the example is the domain selected during the account creation. URLs of companies using a dedicated deployment may look like https://acme.rossum.app/api.

If you are not sure about the correct URL you can navigate to https://app.rossum.ai and use your email address to receive your account information via email.

Please note that we previously recommended using the https://api.elis.rossum.ai endpoint to interact with the Rossum API, but now it is deprecated. For new integrations use the new https://example.rossum.app/api endpoint. For accounts created before Nov 2022 use the https://elis.rossum.ai/api.

Authentication

Most of the API endpoints require a user to be authenticated. To login to the Rossum API, post an object with username and password fields. Login returns an access key to be used for token authentication.

Our API also provide possibility to authenticate via One-Time token which is returned after registration. This tokens allows users to authenticate against our API, but after one call, this token will be invalidated. This token can be exchanged for regular access token limited only by the time of validity. For the purpose of token exchange, use the /auth/token endpoint.

Users may delete a token using the logout endpoint or automatically after a configured time (the default expiration time is 162 hours). The default expiration time can be lowered using max_token_lifetime_s field. When the token expires, 401 status is returned. Users are expected to re-login to obtain a new token.

Rossum's API also supports session authentication, where a user session is created inside cookies after login. If enabled, the session lasts 1 day until expired by itself or until logout While the session is valid there is no need to send the authentication token in every request, but the "unsafe" request (POST, PUT, PATCH, DELETE), whose MIME type is different from application/json must include X-CSRFToken header with valid CSRF token, which is returned inside Cookie while loging in. When a session expires, 401 status is returned as with token authentication, and users are expected to re-login to start a new session.

Note: For seamless integration with third-party systems, upload and export endpoints support also basic authentication. Other endpoints does not support basic auth for new organization group by default. If you need to change default behaviour, please contact support@rossum.ai.

Login

POST /v1/auth/login

Example login request:

curl -H 'Content-Type: application/json' \
  -d '{"username": "east-west-trading-co@example.rossum.app", "password": "aCo2ohghBo8Oghai"}' \
  'https://example.rossum.app/api/v1/auth/login'

Example login response:

{
  "key": "db313f24f5738c8e04635e036ec8a45cdd6d6b03",
  "domain": "acme-corp.app.rossum.ai"
}
Attribute Type Required Description
username string true Username of the user to be logged in.
password string true Password of the user.
origin string false For internal use only. Using this field may affect Rate Limiting of your API requests.
max_token_lifetime_s integer false Duration (in seconds) for which the token will be valid. Default is 162 hours which is also the maximum.

Using the token with Bearer authentication:

curl -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  'https://example.rossum.app/api/v1/organizations/406'

Alternative token authentication format:

curl -H 'Authorization: Token db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  'https://example.rossum.app/api/v1/organizations/406'

Login request with custom token lifetime:

curl -H 'Content-Type: application/json' \
  -d '{"username": "east-west-trading-co@example.rossum.app", "password": "aCo2ohghBo8Oghai", "max_token_lifetime_s": 3600}' \
  'https://example.rossum.app/api/v1/auth/login'

Response with custom token lifetime:

{
  "key": "ltcg2p2w7o9vxju313f04rq7lcc4xu2bwso423b3",
  "domain": null
}

Response

Status: 200

Returns object with "key", which is an access token. And the user's domain.

Attribute Type Description
key string Access token.
domain string The domain the token was issued for.

Logout

POST /v1/auth/logout

Logout user, discard auth token. Example request:

curl -X POST -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  'https://example.rossum.app/api/v1/auth/logout'

Example response:

{
  "detail": "Successfully logged out."
}

Response

Status: 200

Token Exchange

POST /v1/auth/token

Example token exchange request:

curl -X POST -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  'https://example.rossum.app/api/v1/auth/token'

Example token exchange response:

{
  "key": "ltcg2p2w7o9vxju313f04rq7lcc4xu2bwso423b3",
  "domain": "example.rossum.app",
  "scope": "default"
}
Attribute Type Required Description
scope string false Supported values are default, approval (for internal use only)
max_token_lifetime_s float false Duration (in seconds) for which the token will be valid (default: lifetime of the current token or 162 hours if the current token is one-time). Can be set to a maximum of 583200 seconds (162 hours).
origin string false For internal use only. Using this field may affect Rate Limiting of your API requests.

This endpoint enables the exchange of a one-time token for a longer lived access token.

It is able to receive either one-time tokens provided after registration, or JWT tokens if you have such a setup configured. The token must be provided in a the Bearer authorization header.

JWT authentication

Note: Talk with a Rossum representative if you are willing to use JWT authentication.

Short-lived JWT tokens can be exchanged for access tokens. A typical use case, for example, is logging in your users via SSO in your own application, and displaying the Rossum app to them embedded.

To enable JWT authentication, one needs to provide Rossum with the public key that shall be used to decode the tokens. Currently only tokens with EdDSA (signed using Ed25519 and Ed448 curves) and RS512 signatures are allowed, and token validity should be 60 seconds maximum.

The expected formats of the header and encoded payload of the JWT token are as follows:

Decoded JWT Header Format

Example JWT header:

{
   "alg":"EdDSA",
   "kid":"urn:rossum.ai:organizations:100",
   "typ":"JWT"
}
Attribute Type Required Description
kid string true Identifier. Must end with :{your Rossum org ID}, e.g. "urn:rossum.ai:organizations:123"
typ string false Type of the token.
alg string true Signature algorithm to be used for decoding the token. Only EdDSA or RS512 values are allowed.

Decoded JWT Payload Format

Example JWT payload:

{
   "ver":"1.0",
   "iss":"ACME Corporation",
   "aud":"https://example.rossum.app",
   "sub":"john.doe@rossum.ai",
   "exp":1514764800,
   "email":"john.doe@rossum.ai",
   "name":"John F. Doe",
   "rossum_org":"100",
   "roles": ["annotator"]
}
Attribute Type Required Description
ver string true Version of the payload format. Available versions: 1.0.
iss string true Name of the issuer of the token (e.g. company name).
aud string true Target domain used for API queries (e.g. https://example.rossum.app)
sub string true User email that will be matched against username in Rossum.
exp int true UNIX timestamp of the JWT token expiration. Must be set to 60 seconds after current UTC time at maximum.
email string true User email.
name string true User's first name and last name separated by space. Will be used for creation of new users if auto-provisioning is enabled.
rossum_org string true Rossum organization id.
roles list[string] false Name of the user roles that will be assigned to user created by auto-provisioning. Must be a subset of the roles stated in the auto-provisioning configuration for the organization.

Response

Status: 200

Attribute Type Description
key string Access token.
domain string The domain the token was issued for.
scope string Supported values are default, approval (for internal use only)

Single Sign-On (SSO)

Rossum allows customers to integrate with their own identity provider, such as Google, Azure AD or any other provider using OAuth2 OpenID Connect protocol (OIDC). Rossum then acts as a service provider.

Note: Talk with a Rossum representative about enabling this feature.

When SSO is enabled for an organization, user is redirected to a configured identity provider login page and only allowed to access Rossum application when successfully authenticated. Identity provider user claim (e.g. email (default), sub, preferred_username, unique_name) is used to match a user account in Rossum. If auto-provisioning is enabled for the organization, user accounts in Rossum will be automatically created for users without accounts.

Required setup of the OIDC identity provider:

  • Redirect URI (also known as Reply URL): https://example.rossum.app/api/v1/oauth/code

Required information to allow OIDC setup for the Rossum service provider:

If you need to setup SSO for your organization, please contact support@rossum.ai.

Note: By default, oidc_id is matched case sensitive. In case email claim is used, case insensitive matching is used. In addition, if email claim is used and oidc_id is null, username is matched instead.

Pagination

All object list operations are paged by default, so you may need several API calls to obtain all objects of given type.

Parameter Default Maximum Description
page_size 20 100 (*) Number of results per page
page 1 Page of results

(*) Maximum page size differs for some endpoints:

  • 1,000 for exporting data in CSV format via POST on /annotations
  • 500 for searching in annotations via annotations/search (if sideload=content is not included)

Rate Limiting

To ensure optimal performance and fair usage across the platform, the API implements rate limiting features. If a client exceeds the allowed number of API requests Rossum API will respond with a 429 status code and a Retry-After header. The header specifies the number of seconds the client should wait before retrying the request. To avoid being rate limited, ensure your usage complies with our Acceptable Use Schedule as described in the Rossum Terms of Use.

When the client receives a 429 status code, the response header Retry-After will have the following format:

Retry-After: 10

This example means the client should wait for 10 seconds before attempting another request.

The recommended approach for handling rate limited requests is to manage 429 status codes gracefully and use exponential backoff for retries, respecting the Retry-After header.

Current Rate Limits

The current default rate limits for Rossum API are as follows:

Limit Description
10 reqs / second Overall API rate limit.
10 reqs / minute Limit specific for the annotations/{id}/page_data/translate endpoint.

Filters and ordering

Example of filtering and ordering queues:

curl -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  'https://example.rossum.app/api/v1/queues?workspace=7540&locale=en_US&ordering=name&pages=1,2'

Lists may be filtered using various attributes.

Multiple attributes are combined with & in the URL, which results in more specific response. Please refer to the particular object description.

Multiple values within the same attribute can be used, resulting in OR condition. Use comma to separate values.

Note: All filter parameters that refer to object expect only id (instead of URL) of the object.

Ordering of results may be enforced by the ordering parameter and one or more keys delimited by a comma. Preceding key with a minus sign - enforces descending order.

Metadata

Example document object with metadata:

{
  "id": 319768,
  "url": "https://example.rossum.app/api/v1/documents/319768",
  "s3_name": "05feca6b90d13e389c31c8fdeb7fea26",
  "annotations": [
    "https://example.rossum.app/api/v1/annotations/319668"
  ],
  "mime_type": "application/pdf",
  "arrived_at": "2019-02-11T19:22:33.993427Z",
  "original_file_name": "document.pdf",
  "content": "https://example.rossum.app/api/v1/documents/319768/content",
  "metadata": {
    "customer-id": "f205ec8a-5597-4dbb-8d66-5a53ea96cdea",
    "source": 9581,
    "authors": ["Joe Smith", "Peter Doe"]
  }
}

When working with API objects, it may be useful to attach some information to the object (e.g. customer id to a document). You can store custom JSON object in a metadata section available in most objects.

List of objects with metadata support: organization, workspace, user, queue, schema, connector, inbox, document, annotation, page, survey.

Total metadata size may be up to 4 kB per object.

Versioning

API Version is part of the URL, e.g. https://example.rossum.app/api/v1/users.

To allow API progress, we consider addition of a field in a JSON object as well as addition of a new item in an enum object to be backward-compatible operations that may be introduced at any time. Clients are expected to deal with such changes.

Beta

Some endpoints and attributes in our API are marked with a Beta label. This indicates that the functionality is currently in beta and may be subject to changes in the future. While we encourage you to try out these features, please be aware that:

  • The API contract may change in backward-incompatible ways
  • Features might be modified or removed in future releases

We welcome your feedback on these beta features to help us improve them before they reach general availability.

Dates

All dates fields are represented as ISO 8601 formatted strings, e.g. 2018-06-01T21:36:42.223415Z. All returned dates are in UTC timezone.

Errors

Our API uses conventional HTTP response codes to indicate the success or failure of an API request.

Code Status Meaning
400 Bad Request Invalid input data or error from connector.
401 Unauthorized The username/password is invalid or token is invalid (e.g. expired).
403 Forbidden Insufficient permission, missing authentication, invalid CSRF token and similar issues.
404 Not Found Entity not found (e.g. already deleted).
405 Method Not Allowed You tried to access an endpoint with an invalid method.
409 Conflict Trying to change annotation that was not started by the current user.
413 Payload Too Large for too large payload (especially for files uploaded).
429 Too Many Requests The allowed number of requests per minute has been exceeded. Please wait before sending more requests.
500 Internal Server Error We had a problem with the server. Please try again later.
502 Bad Gateway We had a problem with the server. Please try again later.
503 Service Unavailable We're temporarily offline for maintenance. Please try again later.
504 Gateway Timeout We had a problem with the server. Please try again later.

Import and Export

Documents may be imported into Rossum using the REST API and email gateway. Supported file formats are PDF, PNG, JPEG, TIFF, XLSX/XLS, DOCX/DOC and HTML. Maximum supported file size is 40 MB (this limit applies also to the uncompressed size of the files within a .zip archive).

In order to get the best results from Rossum the documents should be in A4 format of at least 150 DPI (in case of scans/photos). Read more about import recommendations.

HTML File Sanitization: HTML files uploaded via upload endpoints, document creation API, or email import are automatically sanitized for security purposes. Some elements, attributes and styles are removed. The sanitization process can break HTML validity.

Importing non-standard MIME types

Support for additional MIME types may be added by handling upload.created webhook event. With this setup, user is able to pre-process uploaded files (e.g. XML or JSON formats) into a format that Rossum understands. Those usually need to be enabled on queue level first (by adding appropriate mimetype to accepted_mime_types in queue settings attributes).

List of enabled MIME types:

  • application/EDI-X12
  • application/EDIFACT
  • application/json
  • application/msword
  • application/pdf
  • application/pgp-encrypted
  • application/vnd.ms-excel
  • application/vnd.ms-outlook
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • application/xml
  • application/zip
  • image/*
  • message/rfc822
  • text/csv
  • text/html (automatically sanitized - see note above)
  • text/plain
  • text/xml

If you find your document MIME types not supported please contact Rossum support team for more information.

Upload API

You can upload a document to the queue using upload endpoint with one or more files to be uploaded. You can also specify additional field values in upload endpoint, e.g. your internal document id. As soon as a document is uploaded, data extraction is started.

Upload endpoint supports basic authentication to enable easy integration with third-party systems.

Import by Email

It is also possible to send documents by email using a properly configured inbox that is associated with a queue. Users then only need to know the email address to forward emails to.

For every incoming email, Rossum extracts PDF documents, images and zip files, stores them in the queue and starts data extraction process.

The size limit for incoming emails is 50 MB (the raw email message with base64 encoded attachments).

All the files from the root of the archive are extracted. In case the root only contains one directory (and no other files) the whole directory is extracted. The zip files and all extracted files must be allowed in accepted_mime_types (see queue settings) and must pass inbox filtering rules (see document rejection conditions) in order for annotations to be created.

Invalid characters in attachment file names (e.g. /) are replaced with underscores.

Small images (up to 100x100 pixels) are ignored, see inbox for reference.

You can use selected email header data (e.g. Subject) to initialize additional field values, see rir_field_names attribute description for details.

Zip attachment limits:

  • the uncompressed size of the files within a .zip archive may not exceed 40 MB
  • only archives containing less than 1000 files are processed
  • only files in the root of the archive are processed (or files inside a first level directory if it's the only one there)

Export

In order to export extracted and confirmed data you can call export endpoint. You can specify status, time-range filters and annotation id list to limit returned results.

Export endpoint supports basic authentication to enable easy integration with third-party systems.

Auto-split of document

It is possible to process a single PDF file that contains several invoices. Just insert a special separator page between the documents. You can print this page and insert it between documents while scanning.

Rossum will recognize a QR code on the page and split the PDF into individual documents automatically. Produced documents are imported to the queue, while the original document is set to a split state.

Document Schema

Every queue has an associated schema that specifies which fields will be extracted from documents as well as the structure of the data sent to connector and exported from the platform.

Note: See the introduction to Rossum customization for a high-level overview of configuring the captured fields and managing schemas.

The best visual guide to the schema JSON that will get you started tweaking it in the Rossum app is our tutorial on editing the extraction schema. Especially when maintaining long dropdown select boxes.

Rossum schema supports data fields with single values (datapoint), fields with multiple values (multivalue) or tuples of fields (tuple). At the topmost level, each schema consists of sections, which may either directly contain actual data fields (datapoints) or use nested multivalues and tuples as containers for single datapoints.

But while schema may theoretically consist of an arbitrary number of nested containers, the Rossum UI supports only certain particular combinations of datapoint types. The supported shapes are:

  • simple: atomic datapoints of type number, string, date or enum
  • list: simple datapoint within a multivalue
  • tabular: simple datapoint within a "multivalue tuple" (a multivalue list containing a tuple for every row)

Schema content

Schema content consists of a list of section objects.

Common attributes

The following attributes are common for all schema objects:

Attribute Type Description Required
category string Category of an object, one of section, multivalue, tuple or datapoint. yes
id string Unique identifier of an object. Maximum length is 50 characters. yes
label string User-friendly label for an object, shown in the user interface yes
hidden boolean If set to true, the object is not visible in the user interface, but remains stored in the database and may be exported. Default is false. Note that section is hidden if all its children are hidden. no
disable_prediction boolean Can be set to true to disable field extraction, while still preserving the data shape. Ignored by aurora engines. no

Section

Example section object:

{
  "category": "section",
  "id": "amounts_section",
  "label": "Amounts",
  "children": [...],
  "icon": ""
}

Section represents a logical part of the document, such as amounts or vendor info. It is allowed only at the top level. Schema allows multiple sections, and there should be at least one section in the schema.

Attribute Type Description Required
children list[object] Specifies objects grouped under a given section. It can contain multivalue or datapoint objects. yes
icon string The icon that appears on the left panel in the UI for a given section (not yet supported on UI).

Datapoint

A datapoint represents a single value, typically a field of a document or some global document information. Fields common to all datapoint types:

Attribute Type Description Required
type string Data type of the object, must be one of the following: string, number, date, enum, button yes
can_export boolean If set to false, datapoint is not exported through export endpoint. Default is true.
can_collapse boolean If set to true, tabular (multivalue-tuple) datapoint may be collapsed in the UI. Default is false.
rir_field_names list[string] List of references used to initialize an object value. See below for the description.
default_value string Default value used either for fields that do not use hints from AI engine predictions (i.e. rir_field_names are not specified), or when the AI engine does not return any data for the field.
constraints object A map of various constraints for the field. See Value constraints.
ui_configuration object A group of settings affecting behaviour of the field in the application. See UI configuration.
width integer Width of the column (in characters). Default widths are: number: 8, string: 20, date: 10, enum: 20. Only supported for table datapoints.
stretch boolean If total width of columns doesn't fill up the screen, datapoints with stretch set to true will be expanded proportionally to other stretching columns. Only supported for table datapoints.
width_chars integer (Deprecated) Use width and stretch properties instead.
score_threshold float [0;1] Threshold used to automatically validate field content based on AI confidence scores. If not set, queue.default_score_threshold is used.
formula string[0;2000] Formula definition, required only for fields of type formula, see Formula Fields. rir_field_names should also be empty for these fields.
prompt string[0;2000] Prompt definition, required only for fields of type reasoning.
context list[string] Context for the prompt, required only for fields of type reasoning see Logical Types.

rir_field_names attribute allows to specify source of initial value of the object. List items may be:

  • one of extracted field types to use the AI engine prediction value
  • upload:id to identify a value specified while uploading the document
  • edit:id to identify a value specified in edit_pages endpoint
  • email_header:<id> to use a value extracted from email headers. Supported email headers: from, to, reply-to, subject, message-id, date.
  • email_body:<id> to select email body. Supported values are text_html for HTML body or text_plain for plain text body.
  • email:<id> to identify a value specified in email.received hook response
  • emails_import:<id> to identify a value specified in the values parameter when importing an email.

If more list items in rir_field_names are specified, the first available value will be used.

String type

Example string type datapoint with constraints:

{
  "category": "datapoint",
  "id": "document_id",
  "label": "Invoice ID",
  "type": "string",
  "default_value": null,
  "rir_field_names": ["document_id"],
  "constraints": {
    "length": {
      "exact": null,
      "max": 16,
      "min": null
    },
    "regexp": {
      "pattern": "^INV[0-9]+$"
    },
    "required": false
  }
}

String datapoint does not have any special attribute.

Date type

Example date type datapoint:

{
  "id": "item_delivered",
  "type": "date",
  "label": "Item Delivered",
  "format": "MM/DD/YYYY",
  "category": "datapoint"
}

Attributes specific to Date datapoint:

Attribute Type Description Required
format string Enforces a format for date datapoint on the UI. See Date format below for more details. Default is YYYY-MM-DD.

Date format supported: available tokens

Example date formats:

  • D/M/YYYY: e.g. 23/1/2019
  • MM/DD/YYYY: e.g. 01/23/2019
  • YYYY-MM-DD: e.g. 2019-01-23 (ISO date format)

Number type

Example number type datapoint:

{
  "id": "item_quantity",
  "type": "number",
  "label": "Quantity",
  "format": "#,##0.#",
  "category": "datapoint"
}

Attributes specific to Number datapoint:

Attribute Type Default Description Required
format string # ##0.# Available choices for number format show table below. null value is allowed.
aggregations object A map of various aggregations for the field. See aggregations.

The following table shows numeric formats with their examples.

Format Example
# ##0,# 1 234,5 or 1234,5
# ##0.# 1 234.5 or 1234.5
#,##0.# 1,234.5 or 1234.5
#'##0.# 1'234.5 or 1234.5
#.##0,# 1.234,5 or 1234,5
# ##0 1 234 or 1234
#,##0 1,234 or 1234
#'##0 1'234 or 1234
#.##0 1.234 or 1234
Aggregations

Example number type datapoint with sum aggregation:

{
  "id": "quantity",
  "type": "number",
  "label": "Quantity",
  "category": "datapoint",
  "aggregations": {
    "sum": {
      "label": "Total"
    }
  },
  "default_value": null,
  "rir_field_names": []
}

Aggregations allow computation of some informative values, e.g. a sum of a table column with numeric values. These are returned among messages when /v1/annotations/{id}/content/validate endpoint is called. Aggregations can be computed only for tables (multivalues of tuples).

Attribute Type Description Required
sum object Sum of values in a column. Default label: "Sum".

All aggregation objects can have an attribute label that will be shown in the UI.

Enum type

Example enum type datapoint with options:

{
  "id": "document_type",
  "type": "enum",
  "label": "Document type",
  "hidden": false,
  "category": "datapoint",
  "options": [
    {
      "label": "Invoice Received",
      "value": "21"
    },
    {
      "label": "Invoice Sent",
      "value": "22"
    },
    {
      "label": "Receipt",
      "value": "23"
    }
  ],
  "default_value": "21",
  "rir_field_names": [],
  "enum_value_type": "number"
}

Attributes specific to Enum datapoint:

Attribute Type Description Required
options object See object description below. yes
enum_value_type string Data type of the option's value attribute. Must be one of the following: string, number, date no

Every option consists of an object with keys:

Attribute Type Description Required
value string Value of the option. yes
label string User-friendly label for the option, shown in the UI. yes

Enum datapoint value is matched in a case insensitive mode, e.g. EUR currency value returned by the AI Core Engine is matched successfully against {"value": "eur", "label": "Euro"} option.

Button type Beta

Specifies a button shown in Rossum UI. For more details please refer to custom UI extension.

Example button type datapoint:

{
  "id": "show_email",
  "type": "button",
  "category": "datapoint",
  "popup_url": "http://example.com/show_customer_data",
  "can_obtain_token": true
}

Buttons cannot be direct children of multivalues (simple multivalues with buttons are not allowed. In tables, buttons are children of tuples). Despite being a datapoint object, button currently cannot hold any value. Therefore, the set of available Button datapoint attributes is limited to:

Attribute Type Description Required
type string Data type of the object, must be one of the following: string, number, date, enum, button yes
can_export boolean If set to false, datapoint is not exported through export endpoint. Default is true.
can_collapse boolean If set to true, tabular (multivalue-tuple) datapoint may be collapsed in the UI. Default is false.
popup_url string URL of a popup window to be opened when button is pressed.
can_obtain_token boolean If set to true the popup window is allowed to ask the main Rossum window for authorization token

Value constraints

Example datapoint with value constraints:

{
  "id": "document_id",
  "type": "string",
  "label": "Invoice ID",
  "category": "datapoint",
  "constraints": {
    "length": {
      "max": 32,
      "min": 5
    },
    "required": false
  },
  "default_value": null,
  "rir_field_names": [
    "document_id"
  ]
}

Constraints limit allowed values. When constraints is not satisfied, annotation is considered invalid and cannot be exported.

Attribute Type Description Required
length object Defines minimum, maximum or exact length for the datapoint value. By default, minimum and maximum are 0 and infinity, respectively. Supported attributes: min, max and exact
regexp object When specified, content must match a regular expression. Supported attributes: pattern. To ensure that entire value matches, surround your regular expression with ^ and $.
required boolean Specifies if the datapoint is required by the schema. Default value is true.

UI configuration

Example datapoint with UI configuration:

{
  "id": "document_id",
  "type": "string",
  "label": "Invoice ID",
  "category": "datapoint",
  "ui_configuration": {
    "type":  "captured",
    "edit": "disabled"
  },
  "default_value": null,
  "rir_field_names": [
    "document_id"
  ]
}

UI configuration provides a group of settings, which alter behaviour of the field in the application. This does not affect behaviour of the field via the API. For example, disabling edit prohibits changing a value of the datapoint in the application, but the value can still be modified through API.

Attribute Type Description Required
type string Logical type of the datapoint. Possible values are: captured, data, manual, formula, reasoning or null. Default value is null. false
edit string When set to disabled, value of the datapoint is not editable via UI. When set to enabled_without_warning, no warnings are displayed in the UI regarding this fields editing behaviour. Default value is enabled, this option enables field editing, but user receives dismissible warnings when doing so. false

Logical types

  • Captured field represents information retrieved by the OCR model. If combined with edit option disabled, user can't overwrite field's value, but is able to redraw field's bounding box and select another value from the document by such an action.
  • Data field represents information filled by extensions. This field is not mapped to the AI model, so it does not have a bounding box, neither it's possible to create one. If combined with edit option disabled the field can't be modified from the UI.
  • Manual field behaves exactly like Data field, without the mapping to extensions. This field should be used for sharing information between users or to transfer information to downstream systems.
  • Formula field This field will be updated according to its formula definition, see Formula Fields. If the edit option is not disabled the field value can be overridden from the UI (see no_recalculation).
  • Reasoning fields This field will be updated according to its prompt and context. context supports adding related schema fields in a format of TxScript strings (e.g. field.invoice_id, also self.attr.label and self.attr.description are supported). If the edit option is not disabled the field value can be overridden from the UI (see no_recalculation).
  • null value is displayed in UI as Unset and behaves similar to the Captured field.

Multivalue

Example simple multivalue:

{
  "category": "multivalue",
  "id": "po_numbers",
  "label": "PO numbers",
  "children": {
    ...
  },
  "show_grid_by_default": false,
  "min_occurrences": null,
  "max_occurrences": null,
  "rir_field_names": null
}

Example multivalue with grid configuration:

{
  "category": "multivalue",
  "id": "line_item",
  "label": "Line Item",
  "children": {
    ...
  },
  "grid": {
    "row_types": [
      "header", "data", "footer"
    ],
    "default_row_type": "data",
    "row_types_to_extract": [
      "data"
    ]
  },
  "min_occurrences": null,
  "max_occurrences": null,
  "rir_field_names": ["line_items"]
}

Multivalue is list of datapoints or tuples of the same type. It represents a container for data with multiple occurrences (such as line items) and can contain only objects with the same id.

Attribute Type Description Required
children object Object specifying type of children. It can contain only objects with categories tuple or datapoint. yes
min_occurrences integer Minimum number of occurrences of nested objects. If condition of min_occurrences is violated corresponding fields should be manually reviewed. Minimum required value for the field is 0. If not specified, it is set to 0 by default.
max_occurrences integer Maximum number of occurrences of nested objects. All additional rows above max_occurrences are removed by extraction process. Minimum required value for the field is 1. If not specified, it is set to 1000 by default.
grid object Configure magic-grid feature properties, see below.
show_grid_by_default boolean If set to true, the magic-grid is opened instead of footer upon entering the multivalue. Default false. Applied only in UI. Useful when annotating documents for custom training.
rir_field_names list[string] List of names used to initialize content from the AI engine predictions. If specified, the value of the first field from the array is used, otherwise default name line_items is used. Attribute can be set only for multivalue containing objects with category tuple. no

Multivalue grid object

Multivalue grid object allows to specify a row type for each row of the grid. For data representation of actual grid data rows see Grid object description.

Attribute Type Description Default Required
row_types list[string] List of allowed row type values. ["data"] yes
default_row_type string Row type to be used by default data yes
row_types_to_extract list[string] Types of rows to be extracted to related table ["data"] yes

For example to distinguish two header types and a footer in the validation interface, following row types may be used: header, subsection_header, data and footer.

Currently, data extraction classifies every row as either data or header (additional row types may be introduced in the future). We remove rows returned by data extraction that are not in row_types list (e.g. header by default) and are on the top/bottom of the table. When they are in the middle of the table, we mark them as skipped (null).

There are three visual modes, based on row_types quantity:

  • More than two row types defined: User selects row types freely to any non-default row type. Clearing row type resets to a default row type. We support up to 6 colors to easily distinguish row types visually.
  • Two row types defined (header and default): User only marks header and skipped rows. Clearing row type resets to a default row type.
  • One row type defined: User is only able to mark row as skipped (null value in data). This is also a default behavior when no grid row types configuration is specified in the schema.

Note: Only rows marked as one of row_types_to_extract values are transfered to a table by pressing "Read data from table" button in the Rossum UI (calling grid-to-table conversion API endpoint).

Tuple

Example tuple object:

{
  "category": "tuple",
  "id": "tax_details",
  "label": "Tax Details",
  "children": [
    ...
  ],
  "rir_field_names": [
    "tax_details"
  ]
}

Container representing tabular data with related values, such as tax details. A tuple must be nested within a multivalue object, but unlike multivalue, it may consist of objects with different ids.

Attribute Type Description Required
children list[object] Array specifying objects that belong to a given tuple. It can contain only objects with category datapoint. yes
rir_field_names list[string] List of names used to initialize content from the AI engine predictions. If specified, the value of the first extracted field from the array is used, otherwise, no AI engine initialization is done for the object.

Updating Schema

When project evolves, it is a common practice to enhance or change the extracted field set. This is done by updating the schema object.

By design, Rossum supports multiple schema versions at the same time. However, each document annotation is related to only one of those schemas. If the schema is updated, all related document annotations are updated accordingly. See preserving data on schema change below for limitations of schema updates.

In addition, every queue is linked to a schema, which is used for all newly imported documents.

When updating a schema, there are two possible approaches:

  • Update the schema object (PUT/PATCH). All related annotations will be updated to match current schema shape (even exported and deleted documents).
  • Create a new schema object (POST) and link it to the queue. In such case, only newly created objects will use the current schema. All previously created objects will remain in the shape of their linked schema.

Note: Formerly, we recommended to always create a new schema object when changing the set of extracted fields. This is no longer necessary since updating of the current schema object (PUT/PATCH) can be used instead. See use-cases below if not sure which approach is appropriate.

Use case 1 - Initial setting of a schema

Use case 2 - Updating attributes of a field (label, constraints, options, etc.)

  • Situation: User is updating field, e.g. changing label, number format, constraints, enum options, hidden flag, etc.
  • Recommendation: Edit existing schema (see Use case 1).

Use case 3 - Adding new field to a schema, even for already imported documents.

  • Situation: User is extending a production schema by adding a new field. Moreover, user would like to see all annotations (to_review, postponed, exported, deleted, etc. states) in the look of the newly extended schema.
  • Recommendation: Edit existing schema (see Use case 1). Data of already created annotations will be transformed to the shape of the updated schema. New fields of annotations in to_review and postponed state that are linked to extracted fields types will be filled by AI Engine, if available. New fields for already exported or deleted annotations (also purged, exporting and failed_export) will be filled with empty or default values.

Use case 4 - Adding new field to schema, only for newly imported documents

  • Situation: User is extending a production schema by adding a new field. However, with the intention that the user does not want to see the newly added field on previously created annotations.
  • Recommendation: Create a new schema object (POST) and link it to the queue. Annotation data of previously created annotations will be preserved according to the original schema. This approach is recommended if there is an organizational need to keep different field sets before and after the schema update.

Use case 5 - Deleting schema field, even for already imported documents.

  • Situation: User is changing a production schema by removing a field that was used previously. However, user would like to see all annotations (to_review, postponed, exported, deleted, etc. states) in the look of the newly extended schema. There is no need to see the original fields in already exported annotations.
  • Recommendation: Edit existing schema (see Use case 1).

Use case 6 - Deleting schema field, only for newly imported documents

  • Situation: User is changing a production schema by removing a field that was used previously. However, with the intention that the user will still be able to see the removed fields on previously created annotations.
  • Recommendation: Create a new schema object (see Use case 4). Annotation data of previously created annotations will be preserved according to the original schema. This approach is recommended if there is an organizational need to retrieve the data in the original state.

Warning: When copying an annotation or moving it to a new queue by patching its queue attribute, the annotation in the new queue will still be associated with the old schema.

Preserving data on schema change

In order to transfer annotation field values properly during the schema update, a datapoint's category and schema_id must be preserved.

Supported operations that preserve fields values are:

  • adding a new datapoint (filled from AI Engine, if available)
  • reordering datapoints on the same level
  • moving datapoints from section to another section
  • moving datapoints to and from a tuple
  • reordering datapoints inside a tuple
  • making datapoint a multivalue (original datapoint is the only value in a new multivalue container)
  • making datapoint non-multivalue (only first datapoint value is preserved)

Note: Schema can be updated also manually using the command-line tool rossum. See our guide on schema configuration for more information.

Extracted field types

AI engine currently automatically extracts the following fields at the all endpoint, subject to ongoing expansion.

Identifiers

Attr. rir_field_names Field label Description
account_num Bank Account Bank account number. Whitespaces are stripped.
bank_num Sort Code Sort code. Numerical code of the bank.
iban IBAN Bank account number in IBAN format.
bic BIC/SWIFT Bank BIC or SWIFT code.
const_sym Constant Symbol Statistical code on payment order.
spec_sym Specific Symbol Payee id on the payment order, or similar.
var_sym Variable symbol In some countries used by the supplier to match the payment received against the invoice. Possible non-numeric characters are stripped.
terms Terms Payment terms as written on the document (e.g. "45 days", "upon receipt").
payment_method Payment method Payment method defined on a document (e.g. 'Cheque', 'Pay order', 'Before delivery')
customer_id Customer Number The number by which the customer is registered in the system of the supplier. Whitespaces are stripped.
date_due Date Due The due date of the invoice.
date_issue Issue Date Date of issue of the document.
date_uzp Tax Point Date The date of taxable event.
document_id Document Identifier Document number. Whitespaces are stripped.
order_id Order Number Purchase order identification (Order Numbers not captured as "sender_order_id"). Whitespaces are stripped.
recipient_address Recipient Address Address of the customer.
recipient_dic Recipient Tax Number Tax identification number of the customer. Whitespaces are stripped.
recipient_ic Recipient Company ID Company identification number of the customer. Possible non-numeric characters are stripped.
recipient_name Recipient Name Name of the customer.
recipient_vat_id Recipient VAT Number Customer VAT Number
recipient_delivery_name Recipient Delivery Name Name of the recipient to whom the goods will be delivered.
recipient_delivery_address Recipient Delivery Address Address of the reciepient where the goods will be delivered.
sender_address Supplier Address Address of the supplier.
sender_dic Supplier Tax Number Tax identification number of the supplier. Whitespaces are stripped.
sender_ic Supplier Company ID Business/organization identification number of the supplier. Possible non-numeric characters are stripped.
sender_name Supplier Name Name of the supplier.
sender_vat_id Supplier VAT Number VAT identification number of the supplier.
sender_email Supplier Email Email of the sender.
sender_order_id Supplier's Order ID Internal order ID in the suppliers system.
delivery_note_id Delivery Note ID Delivery note ID defined on the invoice.
supply_place Place of Supply Place of supply (the name of the city or state where the goods will be supplied).

Note: Starting from July 2020 field invoice_id was renamed to document_id. However, the invoice_id name will still be supported for backwards compatibility. For future, we would recommend switching to document_id in your extraction schemas.

Document attributes

Attr. rir_field_names Field label Description
currency Currency The currency which the invoice is to be paid in. Possible values: AED, ARS, AUD, BGN, BRL, CAD, CHF, CLP, CNY, COP, CRC, CZK, DKK, EUR, GBP, GTQ, HKD, HUF, IDR, ILS, INR, ISK, JMD, JPY, KRW, MXN, MYR, NOK, NZD, PEN, PHP, PLN, RON, RSD, SAR, SEK, SGD, THB, TRY, TWD, UAH, USD, VES, VND, ZAR or other. May be also in lowercase.
document_type Document Type Possible values: credit_note, debit_note, tax_invoice (most typical), proforma, receipt, delivery_note, order or other.
language Language The language which the document was written in. Values are ISO 639-3 language codes, e.g.: eng, fra, deu, zho. See Lanugages Supported By Rossum
payment_method_type Payment Method Type Payment method used for the transaction. Possible values: card, cash.

Note: Starting from May 2020 the invoice_type document attribute was renamed to document_type. However, the invoice_type name will still be supported for backwards compatibility. For future, we would recommend switching to document_type in your extraction schemas.

Amounts

Attr. rir_field_names Field label Description
amount_due Amount Due Final amount including tax to be paid after deducting all discounts and advances.
amount_rounding Amount Rounding Remainder after rounding amount_total.
amount_total Total Amount Subtotal over all items, including tax.
amount_paid Amount paid Amount paid already.
amount_total_base Tax Base Total Base amount for tax calculation.
amount_total_tax Tax Total Total tax amount.

Typical relations (may depend on local laws):

amount_total = amount_total_base + amount_total_tax
amount_rounding = amount_total - round(amount_total)
amount_due = amount_total - amount_paid + amount_rounding

All amounts are in the main currency of the invoice (as identified in the currency response field). Amounts in other currencies are generally excluded.

Tables

At the moment, the AI engine automatically extracts 2 types of tables. In order to pick one of the possible choices, set rir_field_names attribute on multivalue.

Attr. rir_field_names Table
tax_details Tax details
line_items Line items

Note: For backwards compatibility, the rir_field_names on multivalue are by default set to line_items. However, if any of column schema rir_field_names contain a string starting with tax_detail_ then the table is assumed to be tax_details.

Tax details

Tax details table and breakdown by tax rates.

Attr. rir_field_names Field label Description
tax_detail_base Tax Base Sum of tax bases for items with the same tax rate.
tax_detail_rate Tax Rate One of the tax rates in the tax breakdown.
tax_detail_tax Tax Amount Sum of taxes for items with the same tax rate.
tax_detail_total Tax Total Total amount including tax for all items with the same tax rate.
tax_detail_code Tax Code Beta Text on document describing tax code of the tax rate (e.g. 'GST', 'CGST', 'DPH', 'TVA'). If multiple tax rates belong to one tax code on the document, the tax code will be assigned only to the first tax rate. (in future such tax code will be distributed to all matching tax rates.)

Line items

AI engine currently automatically extracts line item table content and recognizes row and column types as detailed below. Invoice line items come in a wide variety of different shapes and forms. The current implementation can deal with (or learn) most layouts, with borders or not, different spacings, header rows, etc. We currently make two further assumptions:

  • The table generally follows a grid structure - that is, columns and rows may be represented as rectangle spans. In practice, this means that we may currently cut off text that overlaps from one cell to the next column. We are also not optimizing for table rows that are wrapped to multiple physical lines.
  • The table contains just a flat structure of line items, without subsection headers, nested tables, etc.

We plan to gradually remove both assumptions in the future.

Attribute rir_field_names Field label Description
table_column_code Item Code/Id Can be the SKU, EAN, a custom code (string of letters/numbers) or even just the line number.
table_column_description Item Description Line item description. Can be multi-line with details.
table_column_quantity Item Quantity Quantity of the item.
table_column_uom Item Unit of Measure Unit of measure of the item (kg, container, piece, gallon, ...).
table_column_rate Item Rate Tax rate for the line item.
table_column_tax Item Tax Tax amount for the line. Rule of thumb: tax = rate * amount_base.
table_column_amount_base Amount Base Unit price without tax. (This is the primary unit price extracted.)
table_column_amount Amount Unit price with tax. Rule of thumb: amount = amount_base + tax.
table_column_amount_total_base Amount Total Base The total amount to be paid for all the items excluding the tax. Rule of thumb: amount_total_base = amount_base * quantity.
table_column_amount_total Amount Total The total amount to be paid for all the items including the tax. Rule of thumb: amount_total = amount * quantity.
table_column_other Other Unrecognized data type.

Annotation Lifecycle

When a document is submitted to Rossum within a given queue, an annotation object is assigned to it. An annotation goes through a variety of states as it is processed, and eventually exported.

State Description
created Annotation was created manually via POST to annotations endpoint. Annotation created this way may be switched to importing state only at the end of the upload.created event (this happens automatically).
importing Document is being processed by the AI Engine for data extraction.
failed_import Import failed e.g. due to a malformed document file.
split Annotation was split in user interface or via API and new annotations were created from it.
to_review Initial extraction step is done and the annotation is waiting for user validation.
reviewing Annotation is undergoing validation in the user interface.
in_workflow Annotation is being processed in a workflow. Annotation content cannot be modified while in this state. Please note that any manual interaction with this status may introduce confilicts with Rossum automated workflows. Read more about Rossum Workflows here.
confirmed Annotation is validated and confirmed by the user. This status must be explicitly enabled on the queue to be present.
rejected Annotation was rejected by user. This status must be explicitly enabled on the queue to be present. You can read about when a rejection is possible here.
exporting Annotation is validated and is now awaiting the completion of connector save call. See connector extension for more information on this status.
exported Annotation is validated and successfully passed all hooks; this is the typical terminal state of an annotation.
failed_export When the connector returned an error.
postponed Operator has chosen to postpone the annotation instead of exporting it.
deleted When the annotation was deleted by the user.
purged Only metadata was preserved after a deletion. This status is terminal and cannot be further changed. See purge deleted if you want to know how to purge an annotation.

This diagram shows exact flow between the annotation states whole working with the UI.

Annotation Lifecycle Diagram

Note: See our article on the annotation lifecycle for more information.

Warning: We strongly discourage users from PATCHing the annotation statuses due to possible causes of unwanted behavior concerning working with the Rossum application. The diagram below shows how the annotation attributes change during the annotation's lifecycle, clearly showing why not to PATCH only the status. We strongly advise users to use predefined endpoints to manipulate the annotation statuses.

Annotation Attributes Change Diagram

Usage report

In order to obtain an overview of the Rossum usage, you can download Csv file with basic Rossum statistics.

The statistics contains following attributes:

  • Username (may be empty in case document was not modified by any user)
  • Workspace name
  • Queue name
  • User url
  • Queue url
  • Workspace url
  • Imported: count of all documents that were imported during the time period
  • Confirmed: count of all documents that were confirmed during the time period
  • Rejected: count of all documents that were rejected during the time period
  • Rejected automatically: count of all documents that were automatically rejected during the time period
  • Rejected manually: count of all documents that were manually rejected during the time period
  • Deleted: count of documents that were deleted during the time period
  • Exported: count of documents that were successfully exported during the time period
  • Net time: total time spent by a user validating the successfully exported documents

Example usage report request:

curl -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  'https://example.rossum.app/api/annotations/usage_report?from=2019-01-01&to=2019-01-31'

Csv file (csv) may be downloaded from https://example.rossum.app/api/v1/annotations/usage_report?format=csv.

You may specify date range using from and to parameters (inclusive). If not specified, a report for last 12 months is generated.

Note: Please note that direct access to the API may require you to login using Rossum credentials. User must have admin or manager role.

Request

POST /v1/annotations/usage_report

Attribute Type Description
filter object Filters to be applied on documents used for the computation of usage report
filter.users list[URL] Filter documents modified by the specified users (not applied to imported_count)
filter.queues list[URL] Filter documents from the specified queues
filter.begin_date datetime Filter documents that has date (arrived_at for imported_count; deleted_at for deleted_count; rejected_at for rejected_count; or exported_at for the rest) greater than specified.
filter.end_date datetime Filter documents that has date (arrived_at for imported_count; deleted_at for deleted_count; rejected_at for rejected_count; or exported_at for the rest) lower than specified.
exported_on_time_threshold_s float Threshold (in seconds) under which are documents denoted as on_time.
group_by list[string] List of attributes by which the series is to be grouped. Possible values: user, workspace, queue, month, week, day.

Example request body with filters:

{
  "filter": {
    "users": [
      "https://example.rossum.app/api/v1/users/173"
    ],
    "queues": [
      "https://example.rossum.app/api/v1/queues/8199"
    ],
    "begin_date": "2019-12-01",
    "end_date": "2020-01-31"
  },
  "exported_on_time_threshold_s": 86400,
  "group_by": [
    "user",
    "workspace",
    "queue",
    "month"
  ]
}

Note: Please note that direct access to the API may require you to login using Rossum credentials. User must have admin or manager role.

Response

The response consists of two parts: totalsand series.

Status: 200

Example usage report response:

{
  "series": [
    {
      "begin_date": "2019-12-01",
      "end_date": "2020-01-01",
      "queue": "https://example.rossum.app/api/v1/queues/8199",
      "workspace": "https://example.rossum.app/api/v1/workspaces/7540",
      "values": {
        "imported_count": 2,
        "confirmed_count": 6,
        "rejected_count": 2,
        "rejected_automatically_count": 1,
        "rejected_manually_count": 1,
        "deleted_count": null,
        "exported_count": null,
        "turnaround_avg_s": null,
        "corrections_per_document_avg": null,
        "exported_on_time_count": null,
        "exported_late_count": null,
        "time_per_document_avg_s": null,
        "time_per_document_active_avg_s": null,
        "time_and_corrections_per_field": []
      }
    },
    {
      "begin_date": "2020-01-01",
      "end_date": "2020-02-01",
      "queue": "https://example.rossum.app/api/v1/queues/8199",
      "workspace": "https://example.rossum.app/api/v1/workspaces/7540",
      "user": "https://example.rossum.app/api/v1/users/173",
      "values": {
        "imported_count": null,
        "confirmed_count": 6,
        "rejected_count": 3,
        "rejected_automatically_count": 2,
        "rejected_manually_count": 1,
        "deleted_count": 2,
        "exported_count": 2,
        "turnaround_avg_s": 1341000,
        "corrections_per_document_avg": 1.0,
        "exported_on_time_count": 1,
        "exported_late_count": 1,
        "time_per_document_avg_s": 70.0,
        "time_per_document_active_avg_s": 50.0,
        "time_and_corrections_per_field": [
          {
            "schema_id": "date_due",
            "label": "Date due",
            "total_count": 1,
            "corrected_ratio": 0.0,
            "time_spent_avg_s": 0.0
          },
          ...
        ]
      }
    },
    ...
  ],
  "totals": {
    "imported_count": 7,
    "confirmed_count": 6,
    "rejected_count": 5,
    "rejected_automatically_count": 3,
    "rejected_manually_count": 2,
    "deleted_count": 2,
    "exported_count": 3,
    "turnaround_avg_s": 894000,
    "corrections_per_document_avg": 1.0,
    "exported_on_time_count": 2,
    "exported_late_count": 1,
    "time_per_document_avg_s": 70.0,
    "time_per_document_active_avg_s": 50.0
  }
}

Totals

Totals contain summary information for the whole period (between begin_date and end_date).

Attribute Type Description
imported_count int Count of documents that were uploaded to Rossum
confirmed_count int Count of documents that were confirmed
rejected_count int Count of documents that were rejected
rejected_automatically_count int Count of documents that were automatically rejected
rejected_manually_count int Count of documents that were manually rejected
deleted_count int Count of documents that were deleted
exported_count int Count of documents that were successfully exported
turnaround_avg_s float Average time (in seconds) that a document spends in Rossum (computed as time exported_at - arrived_at)
corrections_per_document_avg float Average count of corrections on documents
exported_on_time_count int Number of documents of which turnaround was under exported_on_time_threshold
exported_late_count int Number of documents of which turnaround was above exported_on_time_threshold
time_per_document_avg_s float Average time (in seconds) that users spent validating documents. Based on the time_spent_overall metric, see annotation processing duration
time_per_document_active_avg_s float Average active time (in seconds) that users spent validating documents. Based on the time_spent_active metric, see annotation processing duration

Series

Series contain information grouped by fields defined in group_by. The data (see above) are wrapped in values object, and accompanied by the values of attributes that were used for grouping.

Attribute Type Description
user URL User, who modified documents within the group
workspace URL Workspace, in which are the documents within the group
queue URL Queue, in which are the documents within the group
begin_date date Start date, of the documents within the group
end_date date Final date, of the documents within the group
values object Contains the data of totals and time_and_corrections_per_field list (for details see below).

In addition to the totals data, series contain time_and_corrections_per_field list that provides detailed data about statistics on each field.

Series details

The detail object contains statistics grouped per field (schema_id).

Attribute Type Description
schema_id string Reference mapping of the data object to the schema tree
label string Label of the data object (taken from schema).
total_count int Number of data objects
corrected_ratio* float [0;1] Ratio of data objects that must have been corrected after automatic extraction.
time_spent_avg_s float Average time (in seconds) spent on validating the data objects

*Corrected ratio is calculated based on human corrections. If any kind of automation (Hook, Webhook, etc) is ran on the datapoints, even after a human correction took a place, the corrected_ration will not be calculated -> Is set to 0.

Extensions

The Rossum platform may be extended via third-party, externally running services or custom serverless functions. These extensions are registered to receive callbacks from the Rossum platform on various occasions and allow to modify the platform behavior. Currently we support these callback extensions: Webhooks, Serverless Functions, and Connectors.

Webhooks and connectors require a third-party service accessible through an HTTP endpoint. This may incur additional operational and implementation costs. User-defined serverless functions, on the contrary, are executed within Rossum platform and no additional setup is necessary. They share the interface (input and output data format, error handling) with webhooks.

See the Building Your Own Extension set of guides in Rossum's developer portal for an introduction to Rossum extensions.

Webhook Extension

The webhook component is the most flexible extension. It covers all the most frequent use cases:

  • displaying messages to users in validation screen,
  • applying custom business rules to check, change, or autofill missing values,
  • reacting to document status change in your workflow,
  • sending reviewed data to an external systems.

Note: Webhooks are more recent and flexible alternative to connectors. For new implementations, consider using webhooks.

Implement a webhook

Webhooks are designed to be implemented using a push-model using common HTTPS protocol. When an event is triggered, the webhook endpoint is called with a relevant request payload. The webhook must be deployed with a public IP address so that the Rossum platform can call its endpoints; for testing, a middleware like ngrok or serveo may come useful.

Note: The Extension Howto on our Developer Hub is a good starting point when building your own extension. You can also find a high-level description of hooks in our here or investigate other examples of webhook implementations:

Webhook vs. Connector

Webhook extensions are similar to connectors, but they are more flexible and easier to use. A webhook is notified when a defined type of webhook event occurs for a related queue.

Advantages of webhooks over connectors:

  • There may be multiple webhooks defined for a single queue
  • No hard-coded endpoint names (/validate, /save)
  • Robust retry mechanism in case of webhook failure
  • If webhooks are connected via the run_after parameter, the results from the predecessor webhook are passed to its successor

Webhooks are defined using a hook object of type webhook. For a description how to create and manage hooks, see the Hook API.

Webhook Events

Webhook events specify when the hook should be notified. They can be defined as following:

  • either as whole event containing all supported actions for its type (for example annotation_status)
  • or as separately named actions for specified event (for example annotation_status.changed)

Example webhook request payload for annotation_status.changed event:

{
  "request_id": "ae7bc8dd-73bd-489b-a3d2-f5514b209591",
  "timestamp": "2020-01-01T00:00:00.000000Z",
  "base_url": "https://example.rossum.app",
  "rossum_authorization_token": "1024873d424a007d8eebff7b3684d283abdf7d0d",
  "hook": "https://example.rossum.app/api/v1/hooks/789",
  "settings": {
    "example_target_service_type": "SFTP",
    "example_target_hostname": "sftp.elis.rossum.ai"
  },
  "secrets": {
    "username": "my-rossum-importer",
    "password": "secret-importer-user-password"
  },
  "action": "changed",
  "event": "annotation_status",
  "annotation": {
    "document": "https://example.rossum.app/api/v1/documents/314621",
    "id": 314521,
    "queue": "https://example.rossum.app/api/v1/queues/8236",
    "schema": "https://example.rossum.app/api/v1/schemas/223",
    "pages": [
      "https://example.rossum.app/api/v1/pages/551518"
    ],
    "creator": "https://example.rossum.app/api/v1/users/1",
    "modifier": null,
    "assigned_at": null,
    "created_at": "2021-04-26T10:08:03.856648Z",
    "confirmed_at": null,
    "deleted_at": null,
    "exported_at": null,
    "export_failed_at": null,
    "modified_at": null,
    "purged_at": null,
    "rejected_at": null,
    "confirmed_by": null,
    "deleted_by": null,
    "exported_by": null,
    "purged_by": null,
    "rejected_by": null,
    "status": "to_review",
    "previous_status": "importing",
    "rir_poll_id": "54f6b91cfb751289e71ddf12",
    "messages": null,
    "url": "https://example.rossum.app/api/v1/annotations/314521",
    "content": "https://example.rossum.app/api/v1/annotations/314521/content",
    "time_spent": 0,
    "metadata": {},
    "organization": "https://example.rossum.app/api/v1/organizations/1"
  },
  "document": {
    "id": 314621,
    "url": "https://example.rossum.app/api/v1/documents/314621",
    "s3_name": "272c2f41ae84a4f19a422cb432a490bb",
    "mime_type": "application/pdf",
    "arrived_at": "2019-02-06T23:04:00.933658Z",
    "original_file_name": "test_invoice_1.pdf",
    "content": "https://example.rossum.app/api/v1/documents/314621/content",
    "metadata": {}
  }
}

Example webhook request payload for annotation_content.updated event:

{
  "request_id": "ae7bc8dd-73bd-489b-a3d2-f5214b209591",
  "timestamp": "2020-01-01T00:00:00.000000Z",
  "base_url": "https://example.rossum.app",
  "rossum_authorization_token": "1024873d424a007d8eebff7b3684d283abdf7d0d",
  "hook": "https://example.rossum.app/api/v1/hooks/781",
  "settings": {
    "example_target_hostname": "sftp.elis.rossum.ai"
  },
  "secrets": {
    "password": "secret-importer-user-password"
  },
  "action": "updated",
  "event": "annotation_content",
  "annotation": {
    "document": "https://example.rossum.app/api/v1/documents/314621",
    "id": 314521,
    "queue": "https://example.rossum.app/api/v1/queues/8236",
    "schema": "https://example.rossum.app/api/v1/schemas/223",
    "pages": [
      "https://example.rossum.app/api/v1/pages/551518"
    ],
    "creator": "https://example.rossum.app/api/v1/users/1",
    "modifier": null,
    "assigned_at": null,
    "created_at": "2021-04-26T10:08:03.856648Z",
    "confirmed_at": null,
    "deleted_at": null,
    "exported_at": null,
    "export_failed_at": null,
    "modified_at": null,
    "purged_at": null,
    "rejected_at": null,
    "confirmed_by": null,
    "deleted_by": null,
    "exported_by": null,
    "purged_by": null,
    "rejected_by": null,
    "status": "to_review",
    "previous_status": "importing",
    "rir_poll_id": "54f6b91cfb751289e71ddf12",
    "messages": null,
    "url": "https://example.rossum.app/api/v1/annotations/314521",
    "organization": "https://example.rossum.app/api/v1/organizations/1",
    "content": [
      {
        "id": 1123123,
        "url": "https://example.rossum.app/api/v1/annotations/314521/content/1123123",
        "schema_id": "basic_info",
        "category": "section",
        "children": [
          {
            "id": 20456864,
            "url": "https://example.rossum.app/api/v1/annotations/1/content/20456864",
            "content": {
              "value": "18 492.48",
              "normalized_value": "18492.48",
              "page": 2
            },
            "category": "datapoint",
            "schema_id": "number",
            "validation_sources": [
              "checks",
              "score"
            ],
            "time_spent": 0
          }
        ]
      }
    ],
    "time_spent": 0,
    "metadata": {}
  },
  "document": {
    "id": 314621,
    "url": "https://example.rossum.app/api/v1/documents/314621",
    "s3_name": "272c2f41ae84a4f19a422cb432a490bb",
    "mime_type": "application/pdf",
    "arrived_at": "2019-02-06T23:04:00.933658Z",
    "original_file_name": "test_invoice_1.pdf",
    "content": "https://example.rossum.app/api/v1/documents/314621/content",
    "metadata": {}
  },
  "updated_datapoints": [11213211, 11213212]
}

Example webhook response with messages and operations:

{
  "messages": [
    {
      "content": "Invalid invoice number format",
      "id": 197467,
      "type": "error"
    }
  ],
  "operations": [
    {
      "op": "replace",
      "id": 198143,
      "value": {
        "content": {
          "value": "John",
          "position": [103, 110, 121, 122],
          "page": 1
        },
        "hidden": false,
        "options": [],
        "validation_sources": ["human"]
      }
    },
    {
      "op": "remove",
      "id": 884061
    },
    {
      "op": "add",
      "id": 884060,
      "value": [
        {
          "schema_id": "item_description",
          "content": {
            "page": 1,
            "position": [162, 852, 371, 875],
            "value": "Bottle"
          }
        }
      ]
    }
  ]
}

Supported events and their actions

Event and Action Payload (outside default attributes) Response Description Retry on failure
annotation_status.changed annotation, document N/A Annotation status change occurred yes
annotation_content.initialize annotation + content, document, updated_datapoints operations, messages Annotation was initialized (data extracted) yes
annotation_content.started annotation + content, document, updated_datapoints (empty) operations, messages User entered validation screen no (interactive)
annotation_content.user_update annotation + content, document, updated_datapoints operations, messages (Deprecated in favor of annotation_content.updated) Annotation was updated by the user no (interactive)
annotation_content.updated annotation + content, document, updated_datapoints operations, messages Annotation data was updated by the user no (interactive)
annotation_content.confirm annotation + content, document, updated_datapoints (empty) operations, messages User confirmed validation screen no (interactive)
annotation_content.export annotation + content, document, updated_datapoints (empty) operations, messages Annotation is being moved to exported state yes
upload.created files, documents, metadata, email, upload files Upload object was created yes
email.received files, headers, body, email, queue files (*) Email with attachments was received yes
invocation.scheduled N/A N/A Hook was invoked at the scheduled time yes

(*) May also contain other optional attributes - read more in this section.

Example webhook request payload for email.received event:

{
  "request_id": "ae7bc8dd-73bd-489b-a3d2-f5214b209591",
  "timestamp": "2020-01-01T00:00:00.000000Z",
  "base_url": "https://example.rossum.app",
  "rossum_authorization_token": "1024873d424a007d8eebff7b3684d283abdf7d0d",
  "hook": "https://example.rossum.app/api/v1/hooks/781",
  "settings": {
    "example_target_hostname": "sftp.elis.rossum.ai"
  },
  "secrets": {
    "password": "secret-importer-user-password"
  },
  "action": "received",
  "event": "email",
  "email": "https://example.rossum.app/api/v1/emails/987",
  "queue": "https://example.rossum.app/api/v1/queues/41",
  "files": [
    {
      "id": "1",
      "filename": "image.png",
      "mime_type": "image/png",
      "n_pages": 1,
      "height_px": 100.0,
      "width_px": 150.0,
      "document": "https://example.rossum.app/api/v1/documents/427"
    },
    {
      "id": "2",
      "filename": "MS word.docx",
      "mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
      "n_pages": 1,
      "height_px": null,
      "width_px": null,
      "document": "https://example.rossum.app/api/v1/documents/428"
    },
    {
      "id": "3",
      "filename": "A4 pdf.pdf",
      "mime_type": "application/pdf",
      "n_pages": 3,
      "height_px": 3510.0,
      "width_px": 2480.0,
      "document": "https://example.rossum.app/api/v1/documents/429"
    },
    {
      "id": "4",
      "filename": "unknown_file",
      "mime_type": "text/xml",
      "n_pages": 1,
      "height_px": null,
      "width_px": null,
      "document": "https://example.rossum.app/api/v1/documents/430"
    }
  ],
  "headers": {
    "from": "test@example.com",
    "to": "east-west-trading-co-a34f3a@example.rossum.app",
    "reply-to": "support@example.com",
    "subject": "Some subject",
    "date": "Mon, 04 May 2020 11:01:32 +0200",
    "message-id": "15909e7e68e4b5f56fd78a3b4263c4765df6cc4d",
    "authentication-results": "example.com;\n    dmarc=pass d=example.com"
  },
  "body": {
    "body_text_plain": "Some body",
    "body_text_html": "<div dir=\"ltr\">Some body</div>"
  }
}

Example webhook response for email.received event:

{
  "files": [
    {
      "id": "3",
      "values": [
        {
          "id": "email:invoice_id",
          "value": "INV001234"
        },
        {
          "id": "email:customer_name",
          "value": "John Doe"
        }
      ]
    }
  ],
  "additional_files": [
    {
      "document": "https://example.rossum.app/api/v1/documents/987",
      "import_document": true,
      "values": [
        {
          "id": "email:internal_id",
          "value": "0045654"
        }
      ]
    }
  ]
}

Example webhook request payload for invocation.scheduled event:

{
  "request_id": "ae7bc8dd-73bd-489b-a3d2-f5514b209591",
  "timestamp": "2020-01-01T00:00:00.000000Z",
  "base_url": "https://example.rossum.app",
  "rossum_authorization_token": "1024873d424a007d8eebff7b3684d283abdf7d0d",
  "hook": "https://example.rossum.app/api/v1/hooks/789",
  "settings": {
    "example_target_service_type": "SFTP",
    "example_target_hostname": "sftp.elis.rossum.ai"
  },
  "secrets": {
    "username": "my-rossum-importer",
    "password": "secret-importer-user-password"
  },
  "action": "scheduled",
  "event": "invocation"
}

Example webhook request payload for upload.created event:

{
  "request_id": "ae7bc8dd-73bd-489b-a3d2-f5214b209591",
  "timestamp": "2020-01-01T00:00:00.000000Z",
  "base_url": "https://example.rossum.app",
  "rossum_authorization_token": "1024873d424a007d8eebff7b3684d283abdf7d0d",
  "hook": "https://example.rossum.app/api/v1/hooks/781",
  "settings": {},
  "secrets": {},
  "action": "created",
  "event": "upload",
  "email": "https://example.rossum.app/api/v1/emails/987",
  "upload": "https://example.rossum.app/api/v1/uploads/2046",
  "metadata": {},
  "files": [
    {
      "document": "https://example.rossum.app/api/v1/documents/427",
      "prevent_importing": false,
      "values": [],
      "queue": "https://example.rossum.app/api/v1/queues/41",
      "annotation": null
    },
    {
      "document": "https://example.rossum.app/api/v1/documents/428",
      "prevent_importing": true,
      "values": [],
      "queue": "https://example.rossum.app/api/v1/queues/41",
      "annotation": "https://example.rossum.app/api/v1/annotations/1638"
    }
  ],
  "documents": [
    {
      "id": 427,
      "url": "https://example.rossum.app/api/v1/documents/427",
      "mime_type": "application/pdf"
    },
    {
      "id": 428,
      "url": "https://example.rossum.app/api/v1/documents/428",
      "mime_type": "application/json"
    }
  ]
}

Example webhook response for upload.created event:

{
  "files": [
    {
      "document": "https://example.rossum.app/api/v1/documents/427",
      "prevent_importing": false,
      "messages": [
        {"type": "error", "content": "Some error message."}
      ]
    },
    {
      "document": "https://example.rossum.app/api/v1/documents/428",
      "prevent_importing": true
    },
    {
      "document": "https://example.rossum.app/api/v1/documents/429"
    },
    {
      "document": "https://example.rossum.app/api/v1/documents/430",
      "messages": [
        {"type": "info", "content": "Some info message."}
      ]
    }
  ]
}

Note: The annotation_content.started, annotation_content.updated and the deprecated annotation_content.user_update are triggered from the backend within the /validate resource call.

  • When annotation_content.export action fails, annotation is switched to the failed_export state.
  • When response from webhook on annotation_content.export contains a message of type error, the annotation is switched to the failed_export state.
  • The updated_datapoints list is never empty for annotation_content.updated only triggered by interactive date changes actions.
  • The updated_datapoints list is always empty for the annotation_content.export action.
  • The updated_datapoints list is empty for the annotation_content.initialize action if run_after=[], but it can have data from its predecessor if chained via run_after.
  • The updated_datapoints list may also be empty for annotation_content.user_update in case of an action triggered interactively by a user, but with no data changes (e.g. after opening validation screen or eventually at its confirmation issued by the Rossum UI).

Timeouts and retries

  • For each webhook call there is a 30 seconds timeout by default (this applies to all events and actions). It can be modified in config with attribute timeout_s (min=0, max=60, only for non-interactive webhooks).
  • In case a non-interactive webhook call fails (check the configuration of retry_on_any_non_2xx attribute of the webhook to see what statuses this includes), it is retried within 30 seconds by default. There are up to 5 attempts performed. This number can be modified in config with attribute retry_count (min=0, max=4, only for non-interactive webhooks).

Warning: In case of an interactive webhook call, the attribute timeout_s in config will be overwritten to default value 30 seconds.

Asynchronous webhooks

Non-interactive webhooks can use also asynchronous framework:

  • Webhook returns an HTTP status 202 and url for polling in the response Location header.
  • The provided polling url is polled every 30 seconds until a response with 201 status code is received. The response body is then taken as the hook call result.
  • The polling continues until 201 response is received or until the maximum polling time is exceeded. See the max_polling_time_s attribute of the hook.config for more details.
  • In case the polling request returns one of the following status codes: 408, 429, 500, 502, 503, 504, it is retried and the polling continues. (This is not considered a polling failure.)
  • In case the polling request fails (returns any error status code other than 408, 429, 500, 502, 503, 504 or exceeds the maximum polling time), the original webhook call is retried (by default). The number of retry attempts is set by the retry_count attribute of the hook.config.
  • Retries after polling can be enabled/disabled by the retry_after_polling_failure attribute of the hook.config.

Webhook Events Occurrence Diagram

To show an overview of the Hook events and when they are happening, this diagram was created.

Hook Events Diagram

Hooks common attributes

Key Type Description
request_id UUID Hook call request ID
timestamp datetime Timestamp when the hook was called
hook URL Hook's url
action string Hook's action
event string Hook's event
settings object Copy of hook.settings attribute

Annotation status event data format

annotation_status event contains following additional event specific attributes.

Key Type Description
annotation object Annotation object (enriched with attribute previous_status)
document object Document object (attribute annotations is excluded)
queues* list[object] list of related queue objects
modifiers* list[object] list of related modifier objects
schemas* list[object] list of related schema objects
emails* list[object] list of related email objects (for annotations created after email ingestion)
related_emails* list[object] list of related emails objects (other related emails)
relations* list[object] list of related relation objects
child_relations* list[object] list of related child_relation objects
suggested_edits* list[object] list of related suggested_edits objects
assignees* list[object] list of related assignee objects
pages* list[object] list of related pages objects
notes* list[object] list of related notes objects
labels* list[object] list of related labels objects
automation_blockers* list[object] list of related automation_blockers objects

* Attribute is only included in the request when specified in hook.sideload. Please note that sideloading of modifier object from different organization is not supported and that sideloading can decrease performance. See also annotation sideloading section.

Example webhook request payload with sideloaded queues:

{
  "request_id": "ae7bc8dd-73bd-489b-a3d2-f5214b209591",
  "timestamp": "2020-01-01T00:00:00.000000Z",
  "base_url": "https://example.rossum.app",
  "hook": "https://example.rossum.app/api/v1/hooks/781",
  "action": "changed",
  "event": "annotation_status",
  "queues": [
    {
      "id": 8198,
      "name": "Received invoices",
      "url": "https://example.rossum.app/api/v1/queues/8198",
      "metadata": {},
      "use_confirmed_state": false,
      "settings": {}
    }
  ]
}

Annotation content event data format

annotation_content event contains following additional event specific attributes.

Key Type Description
annotation object Annotation object. Content is pre-loaded with annotation data. Annotation data are enriched with normalized_value, see example.
document object Document object (attribute annotations is excluded)
updated_datapoints** list[int] List of IDs of datapoints that were changed by last or all predecessor events.
queues* list[object] list of related queue objects
modifiers* list[object] list of related modifier objects
schemas* list[object] list of related schema objects
emails* list[object] list of related email objects (for annotations created after email ingestion)
related_emails* list[object] list of related emails objects (other related emails)
relations* list[object] list of related relation objects
child_relations* list[object] list of related child_relation objects
suggested_edits* list[object] list of related suggested_edits objects
assignees* list[object] list of related assignee objects
pages* list[object] list of related pages objects
notes* list[object] list of related notes objects
labels* list[object] list of related labels objects
automation_blockers* list[object] list of related automation_blockers objects

* Attribute is only included in the request when specified in hook.sideload. Please note that sideloading of modifier object from different organization is not supported and that sideloading can decrease performance. See also annotation sideloading section.

** If the run_after attribute chains the hooks, the updated_datapoints will contain a list of all datapoint ids that were updated by any of the predecessive hooks. Moreover, in case of add operation on a multivalue table, the updated_datapoints will contain the id of the multivalue, the id of the new tuple datapoints and the id of all the newly created cell datapoints.

Annotation content event response format

All of the annotation_content events expect a JSON object with the following optional lists in the response: messages and operations

The message object contains attributes:

Key Type Description
id integer Optional unique id of the relevant datapoint; omit for a document-wide issues
type enum One of: error, warning or info.
content string A descriptive message to be shown to the user
detail object Detail object that enhances the response from a hook. (For more info refer to message detail)

For example, you may use error for fatals like a missing required field, whereas info is suitable to decorate a supplier company id with its name as looked up in the supplier's database.

The operations object describes operation to be performed on the annotation data (replace, add, remove). Format of the operations key is the same as for bulk update of annotations, please refer to the annotation data API for complete description.

Note: User visible messages that are returned from the hooks can contain the following list of HTML markup elements: b, strong, a, ul, ol, li, i, br. This markup enables better readability of the message to the user.

Parsable error response format

It's possible to use the same format even with non-2XX response codes. In this type of response, operations are not considered.

Example payload for parsable error response:

{
  "messages": [
    {
      "id": "all",
      "type": "error",
      "content": "custom error message to be displayed in the UI"
    }
  ]
}

initialize event of annotation_content action additionally accepts list of automation_blockers objects. This allows for manual creation of automation blockers of type extension and therefore stops the automation without the need to create an error message.

The automation_blockers object contains attributes

Key Type Description
id integer Optional unique id of the relevant datapoint; omit for a document-wide issues
content str A descriptive message to be stored as an automation blocker

Example response payload with automation blockers:

{
  "messages": [],
  "operations": [],
  "automation_blockers": [
    {
      "id": 1357,
      "content": "Unregistered vendor"
    },
    {
      "content": "PO not found in the master data!"
    }
  ]
}

Email received event data format

email event contains following additional event specific attributes.

Key Type Description
files list[object] List of objects with metadata of each attachment contained in the arriving email.
headers object Headers extracted from the arriving email.
body object Body extracted from the arriving email.
email URL URL of the arriving email.
queue URL URL of the arriving email's queue.

The files object contains attributes:

Key Type Description
id string Some arbitrary identifier.
filename string Name of the attachment.
mime_type string MIME type of the attachment.
n_pages integer Number of pages (defaults to 1 if it could not be acquired).
height_px float Height in pixels (300 DPI is assumed for PDF files, defaults to null if it could not be acquired).
width_px float Width in pixels (300 DPI is assumed for PDF files, defaults to null if it could not be acquired).
document URL URL of related document object.

The headers object contains the same values as are available for initialization of values in email_header:<id> (namely: from, to, reply-to, subject, message-id, date).

The body object contains the body_text_plain and body_text_html.

Email received event response format

All of the email events expect a JSON object with the following lists in the response: files, additional_files, extracted_original_sender

The files object contains attributes:

Key Type Description
id int id of file that will be used for creating an annotation
values list[object] This is used to initialize datapoint values. See values object description below

The values object consists of the following:

Key Type Description
id string Id of value - must start with email: prefix (to use this value refer to it in rir_field_names field in the schema similarly as described here).
value string String value to be used when annotation content is being constructed

This is useful for filtering out unwanted files by some measures that are not available in Rossum by default.

Note: When all files are to be used for creating annotations (ie no filtering should occur), all have to appear in the files list.

Note: If there are multiple hooks configured for the event, annotations are created only for files mentioned in all the responses (their values are merged together with the latest called hooks having the highest priority).

The additional_files object contains attributes:

Key Type Default Required Description
document URL yes URL of the document object that should be included. If document belongs to an annotation it must also belong to the same queue as email inbox.
values list[object] [] no This is used to initialize datapoint values. See values object description above
import_document bool false no Set to true if Rossum should import document and create an annotation for it, otherwise it will be just linked as an email attachment. Only applicable if document hasn't already an annotation attached.

The extracted_original_sender object looks as follows:

Key Type Description
extracted_original_sender email_address_object Information about sender containing keys email and name.

This is useful for updating the email address field on email object with a new sender name and email address.

Note: If there are multiple hooks configured for the event, the extracted_original_sender results are merged together (with the latest called hooks having the highest priority).

Upload created event data format

upload event contains following additional event specific attributes.

Key Type Description
files list[object] List of objects with metadata of each uploaded document.
documents list[object] List of document objects corresponding with the files object.
upload object Object representing the upload.
metadata object Client data passed in through the upload resource to create annotations with.
email URL URL of the arriving email or null if the document was uploaded via API.

The files object contains attributes:

Key Type Description
document URL URL of the uploaded document object.
prevent_importing bool If set no annotation is going to be created for the document or if already existing it is not going to be switched to importing status.
values list[object] This is used to initialize datapoint values. See values object description below
queue URL URL of the queue the document is being uploaded to.
annotation URL URL of the documents annotation or null if it doesn't exist.

The values object consists of the following:

Key Type Description
id string Id of value (to use this value refer to it in rir_field_names field in the schema similarly as described here).
value string String value to be used when annotation content is being constructed

Upload created event response format

All of the upload events expect a JSON object with the files object list in the response.

The files object contains attributes:

Key Type Description Required
document URL URL of the uploaded document object. true
prevent_importing bool If set no annotation is going to be created for the document or if already exists it is not going to be switched to importing status. Optional, default false. false
messages list[object] List of messages that will be appended to the related annotation. false

Validating payloads from Rossum

Example of a webhook payload validator written in Python:

import hashlib
import hmac

from flask import Flask, request, abort

app = Flask(__name__)

SECRET_KEY = "<Your secret key stored in hook.config.secret>"

@app.route("/test_hook", methods=["POST"])
def test_hook():
    digest = hmac.new(SECRET_KEY.encode(), request.data, hashlib.sha256).hexdigest()
    try:
        prefix, signature = request.headers["X-Rossum-Signature-SHA256"].split("=")
    except ValueError:
        abort(401, "Incorrect header format")

    if not (prefix == "sha256" and hmac.compare_digest(signature, digest)):
        abort(401, "Authorization failed.")
    return

For authorization of payloads, the shared secret method is used. When a secret token is set in hook.config.secret, Rossum uses it to create a hash signature with each payload. This hash signature is passed along with each request in the headers as X-Rossum-Signature-SHA256.

The goal is to compute a hash using hook.config.secret and the request body, and ensure that the signature produced by Rossum is the same. Rossum uses HMAC SHA256 signature by default.

Previously, Rossum was using SHA1 algorithm to sign the payload. This option is still available as a legacy X-Elis-Signature header. Please contact Rossum support to enable this header in case it is missing.

Note: The algorithm used is the same as the one of Github.

Webhook requests may also be authenticated using a client SSL certificate, see Hook API for reference.

Access to Rossum API

You can access Rossum API from the Webhook. Each execution gets unique API key. The key is valid for 10 minutes or until Rossum receives a response from the Webhook. You can set token_lifetime_s up to 2 hours to keep the token valid longer. The API key and the environment's base URL are passed to webhooks as a first-level attributes rossum_authorization_token and base_url within the webhook payload.

Serverless Function Extension

Serverless functions allow to extend Rossum functionality without setup and maintenance of additional services.

Webhooks and Serverless functions share a basic setup: input and output data format and error handling. They are both configured using a hook API object.

Unlike webhooks, serverless functions do not send the event and action notifications to a specific URL. Instead, the function's code snippet is executed within the Rossum platform. See function API description for details about how to set up a serverless function and connect it to the queue.

Supported events and their actions

For description of supported events, actions and input/output data examples, please refer to Webhook Extensions section.

Supported runtimes

Currently, Rossum supports NodeJS and Python to execute serverless functions. See the table below for a full list of supported runtimes. If you would like to use another runtime, please let us know at product@rossum.ai.

Please be aware that we may eventually deprecate and remove runtimes in the future.

Name Identifier Deprecation date Block function creation date Removal date Note
Python 3.12 python3.12 not scheduled not scheduled not scheduled
NodeJS 22 nodejs22.x not scheduled not scheduled not scheduled

Runtime deprecations

We schedule runtime deprecation when it is being phased out by the serverless vendors. The recommended action is to upgrade to one of the up-to-date runtimes.

See the table above for specific deprecation dates of individual runtimes.

  • Deprecation date - Date when the deprecation is announced.
  • Block function creation date - From this date, it will not be possible to create new extensions with the deprecated runtime. Existing extensions can be used as they are and their code can be updated until the removal date.
  • Removal date - All extensions will be automatically switched to the up-to-date runtime on this date. We recommend making the switch earlier to test and update the code if needed, to avoid any issues.

Python Runtime and Rossum Transaction Scripts

The python3.12 runtime includes a txscript module that provides convenience functionality for working with Rossum objects, in particular in the context of the annotation_content event.

Implementation

'''
This custom serverless function example demonstrates showing messages to the
user on the validation screen, updating values of specific fields, and
executing actions on the annotation.

See https://elis.rossum.ai/api/docs/#rossum-transaction-scripts for more examples.
'''

from txscript import TxScript, default_to, substitute

def rossum_hook_request_handler(payload: dict) -> dict:
    t = TxScript.from_payload(payload)

    for row in t.field.line_items:
        if default_to(row.item_amount_base, 0) >= 1000000:
            t.show_warning('Value is too big', row.item_amount_base)

    t.field.document_id = substitute(r'-', '', t.field.document_id)

    if default_to(t.field.amount_total, 0) > 1000000:
        print("postponing")
        t.annotation.action("postpone")
        return t.hook_response()

    return t.hook_response()
// This serverless function example can be used for annotation_content events
// (e.g. updated action). annotation_content events provide annotation
// content tree as the input.
//
// The function below shows how to:
// 1. Display a warning message to the user if "item_amount_base" field of
//    a line item exceeds a predefined threshold
// 2. Removes all dashes from the "invoice_id" field
//
// item_amount_base and invoice_id should be fields defined in a schema.

exports.rossum_hook_request_handler = async (payload) => {
  const content = payload.annotation.content;

  try {
    const TOO_BIG_THRESHOLD = 1000000;

    const amountBaseColumnDatapoints = findBySchemaId(
      content,
      'item_amount_base',
    );

    const messages = [];
    for (var i = 0; i < amountBaseColumnDatapoints.length; i++) {

      if (amountBaseColumnDatapoints[i].content.normalized_value >= TOO_BIG_THRESHOLD) {
        messages.push(
          createMessage(
            'warning',
            'Value is too big',
            amountBaseColumnDatapoints[i].id,
          ),
        );
      }
    }

    const [invoiceIdDatapoint] = findBySchemaId(content, 'invoice_id');

    const operations = [
      createReplaceOperation(
        invoiceIdDatapoint,
        invoiceIdDatapoint.content.value.replace(/-/g, ''),
      ),
    ];

    return {
      messages,
      operations,
    };
  } catch (e) {
    const messages = [
      createMessage('error', 'Serverless Function: ' + e.message)
    ];
    return {
      messages,
    };
  }
};

const findBySchemaId = (content, schemaId) =>
  content.reduce(
    (results, dp) =>
    dp.schema_id === schemaId ? [...results, dp] :
    dp.children ? [...results, ...findBySchemaId(dp.children, schemaId)] :
    results,
    [],
  );

const createMessage = (type, content, datapointId = null) => ({
  content: content,
  type: type,
  id: datapointId,
});

const createReplaceOperation = (datapoint, newValue) => ({
  op: 'replace',
  id: datapoint.id,
  value: {
    content: {
      value: newValue,
    },
  },
});

To implement a serverless function, create a hook object of type function. Use code object config attribute to specify a serialized source code. You can use a code editor built-in to the Rossum UI, which also allows to test and debug the function before updating the code of the function itself.

See Python and NodeJS examples of a serverless function implementation next to this section or check out this article (and others in the relevant section).

Warning: Please note that users are responsible for their code that is being executed. Be sure not to expose any sensitive data or trigger excessive usage of the function API. In case of violation of the Rossum terms of use, the organization account may be suspended.

If there is an issue with an extension code itself, it will be displayed as CallFunctionException in the annotation view. Raising this exception usually means issues such as:

  • undefined variables are called in the code
  • the code is raising an exception as a response rather than returning a proper response

Testing

To write, test and debug a serverless function, you can refer to this guide.

Limitations

By default, no internet access is allowed from a serverless function, except the Rossum API. If your functions require internet access to work properly, e.g. when exporting data over API to ERP system, please let us know at product@rossum.ai.

Access Rossum API

The Rossum API can be accessed directly from serverless functions. See examples below for how to access the Rossum API from a serverless function.

import json
import urllib.request

def rossum_hook_request_handler(payload):
    request = urllib.request.Request(
      "https://example.rossum.app/api/v1/queues",
      headers={"Authorization": "Bearer " + payload["rossum_authorization_token"]}
    )
    with urllib.request.urlopen(request) as response:
        queues = json.loads(response.read())
    queue_names = (q["name"] for q in queues["results"])
    return {"messages": [{"type": "info", "content": ", ".join(queue_names)}]}
const https = require('https');

exports.rossum_hook_request_handler = async (payload) => {
  const token = payload.rossum_authorization_token;

  queues = JSON.parse(await getFromRossumApi("https://example.rossum.app/api/v1/queues", token));
  queue_names = queues.results.map(q => q.name).join(", ")
  return { "messages": [{"type": "info", "content": queue_names}] };
}

const getFromRossumApi = async (url, token) => {
  const parsedUrl = new URL(url);
  const options = {
    hostname: parsedUrl.hostname,
    path: parsedUrl.pathname + parsedUrl.search,
    method: 'GET',
    headers: {
      'Authorization': 'Bearer ' + token,
    },
  };
  const response = await new Promise((resolve, reject) => {
    let dataString = '';
    const req = https.request(options, function(res) {
      res.on('data', chunk => {
        dataString += chunk;
      });
      res.on('end', () => {
        resolve({
          statusCode: 200,
          body: dataString
        });
      });
    });
    req.on('error', (e) => {
      reject({
        statusCode: 500,
        body: 'Something went wrong!'
      });
    });
    req.end()
  });
  return response.body
}

Connector Extension

Note: Webhooks are more recent and flexible alternative to connectors. For new implementations, consider using webhooks.

The connector component is aimed at two main use-cases: applying custom business rules during data validation, and direct integration of Rossum with downstream systems.

The connector component receives two types of callbacks - an on-the-fly validation callback on every update of captured data, and an on-export save callback when the document capture is finalized.

The custom business rules take use chiefly of the on-the-fly validation callback. The connector can auto-validate and transform both the initial AI-based extractions and each user operator edit within the validation screen; based on the input, it can push user-visible messages and value updates back to Rossum. This allows for both simple tweaks (like verifying that two amounts sum together or transforming decimal points to thousand separators) and complex functionality like intelligent PO match.

The integration with downstream systems on the other hand relies mainly on the save callback. At the same moment a document is exported from Rossum, it can be imported to a downstream system. Since there are typically constraints on the captured data, these constraints can be enforced even within the validation callback.

Implement a connector

Note: The Extension Howto on our Developer Hub is a good starting point when building your own connector.

Connectors are designed to be implemented using a push-model using common HTTPS protocol. When annotation data is changed, or when data export is triggered, specific connector endpoint is called with annotation data as a request payload. The connector must be deployed with a public IP address so that the Rossum platform can call its endpoints; for testing, a middleware like ngrok or serveo may come useful.

Example of a valid no-op (empty) validate response:

{"messages": [], "updated_datapoints": []}

Example of a valid no-op (empty) save response:

{}

Example data sent to connector (validate, save):

{
  "meta": {
    "document_url": "https://example.rossum.app/api/v1/documents/6780",
    "arrived_at": "2019-01-30T07:55:13.208304Z",
    "original_file": "https://example.rossum.app/api/v1/original/bf0db41937df8525aa7f3f9b18a562f3",
    "original_filename": "Invoice.pdf",
    "queue_name": "Invoices",
    "workspace_name": "EU",
    "organization_name": "East West Trading Co",
    "annotation": "https://example.rossum.app/api/v1/annotations/4710",
    "queue": "https://example.rossum.app/api/v1/queues/63",
    "workspace": "https://example.rossum.app/api/v1/workspaces/62",
    "organization": "https://example.rossum.app/api/v1/organizations/1",
    "modifier": "https://example.rossum.app/api/v1/users/27",
    "updated_datapoint_ids": ["197468"],
    "modifier_metadata": {},
    "queue_metadata": {},
    "annotation_metadata": {},
    "rir_poll_id": "54f6b9ecfa751789f71ddf12",
    "automated": false
  },
  "content": [
    {
      "id": "197466",
      "category": "section",
      "schema_id": "invoice_info_section",
      "children": [
        {
          "id": "197467",
          "category": "datapoint",
          "schema_id": "invoice_number",
          "page": 1,
          "position": [916, 168, 1190, 222],
          "rir_position": [916, 168, 1190, 222],
          "rir_confidence": 0.97657,
          "value": "FV103828806S",
          "validation_sources": ["score"],
          "type": "string"
        },
        {
          "id": "197468",
          "category": "datapoint",
          "schema_id": "date_due",
          "page": 1,
          "position": [938, 618, 1000, 654],
          "rir_position": [940, 618, 1020, 655],
          "rir_confidence": 0.98279,
          "value": "12/22/2018",
          "validation_sources": ["score"],
          "type": "date"
        },
        {
          "id": "197469",
          "category": "datapoint",
          "schema_id": "amount_due",
          "page": 1,
          "position": [1134, 1050, 1190, 1080],
          "rir_position": [1134, 1050, 1190, 1080],
          "rir_confidence": 0.74237,
          "value": "55.20",
          "validation_sources": ["human"],
          "type": "number"
        }
      ]
    },
    {
      "id": "197500",
      "category": "section",
      "schema_id": "line_items_section",
      "children": [
        {
          "id": "197501",
          "category": "multivalue",
          "schema_id": "line_items",
          "children": [
            {
              "id": "198139",
              "category": "tuple",
              "schema_id": "line_item",
              "children": [
                {
                  "id": "198140",
                  "category": "datapoint",
                  "schema_id": "item_desc",
                  "page": 1,
                  "position": [173, 883, 395, 904],
                  "rir_position": null,
                  "rir_confidence": null,
                  "value": "Red Rose",
                  "validation_sources": [],
                  "type": "string"
                },
                {
                  "id": "198142",
                  "category": "datapoint",
                  "schema_id": "item_net_unit_price",
                  "page": 1,
                  "position": [714, 846, 768, 870],
                  "rir_position": null,
                  "rir_confidence": null,
                  "value": "1532.02",
                  "validation_sources": ["human"],
                  "type": "number"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

The connector API consists of two endpoints, validate and save, described below. A connector must always implement both endpoints (though they may not necessarily perform a function in a particular connector - see the right column for an empty reply example), the platform raises an error if it is not able to run an endpoint.

Note: In case a custom connector extension is deployed by a user in production, it should follow our best practices:

  • run on HTTPS and have a valid public certificate
  • be fast enough to keep up the pace with Rossum interactive behavior
  • be able to receive traffic from any IP address. (Source IP address may change over time.)
  • require authentication by authentication token to prevent data leaks or forgery

Setup a connector

The next step after implementing the first version of a connector is configuring it in the Rossum platform.

In Rossum, a connector object defines service_url and params for construction of HTTPS requests and authorization_token that is passed in every request to authenticate the caller as the actual Rossum server. It may also uniquely identify the organization when multiple Rossum organizations share the same connector server.

To set up a connector for a queue, create a connector object using either our API or the rossum tool – follow these instructions. A connector object may be associated with one or more queues. One queue can only have one connector object associated with it.

Connector API

All connector endpoints, representing particular points in the document lifetime, are simple verbs that receive a JSON POSTed and potentially expect a JSON returned in turn.

The authorization type and authorization token is passed as an Authorization HTTP header. Authorization type may be secret_key (shared secret) or Basic for HTTP basic authentication.

Please note that for Basic authentication, authorization_token is passed as-is, therefore it must be set to a correct base64 encoded value. For example username connector and password secure123 is encoded as Y29ubmVjdG9yOnNlY3VyZTEyMw== authorization token.

Connector requests may be authenticated using a client SSL certificate, see Connector API for reference.

Errors

If a connector does not implement an endpoint, it may return HTTP status 404. An endpoint may fail, returning either HTTP 4xx or HTTP 5xx; for some endpoints (like validate and save), this may trigger a user interface message; either the error key of a JSON response is used, or the response body itself in case it is not JSON. The connector endpoint save can be called in asynchronous (default) as well as synchronous mode (useful for embedded mode).

Data format

The received JSON object contains two keys, meta carrying the metadata and content carrying endpoint-specific content.

The metadata identify the concerned document, containing attributes:

Key Type Description
document_url URL document URL
arrived_at timestamp A time of document arrival in Rossum (ISO 8601)
original_file URL Permanent URL for the document original file
original_filename string Filename of the document on arrival in Rossum
queue_name string Name of the document's queue
workspace_name string Name of the document's workspace
organization_name string Name of the document's organization
annotation URL Annotation URL
queue URL Document's queue URL
workspace URL Document's workspace URL
organization URL Document's organization URL
modifier URL Modifier URL
modifier_metadata object Metadata attribute of the modifier, see metadata
queue_metadata object Metadata attribute of the queue, see metadata
annotation_metadata object Metadata attribute of the annotation, see metadata
rir_poll_id string Internal extractor processing id
updated_datapoint_ids list[string] Ids of objects that were recently modified by user
automated bool Flag whether annotation was automated

A common class of content is the annotation tree, which is a JSON object that can contain nested datapoint objects, and matches the schema datapoint tree.

Intermediate nodes have the following structure:

Key Type Description
id integer A unique id of the given node
schema_id string Reference mapping the node to the schema tree
category string One of section, multivalue, tuple
children list A list of other nodes

Datapoint (leaf) nodes structure contains actual data:

Key Type Description
id integer A unique id of the given node
schema_id string Reference mapping the node to the schema tree
category string datapoint
type string One of string, date or number, as specified in the schema
value string The datapoint value, string represented but normalizes, to that they are machine readable: ISO format for dates, a decimal for numbers
page integer A 1-based integer index of the page, optional
position list[float] List of four floats describing the x1, y1, x2, y2 bounding box coordinates
rir_position list[float] Bounding box of the value as detected by the data extractor. Format is the same as for position.
rir_confidence float Confidence (estimated probability) that this field was extracted correctly.

Note: Note that for both meta and content the set of keys returned is subject to extension.

Annotation lifecycle with a connector

If an asynchronous connector is deployed to a queue, an annotation status will change from reviewing to exporting and subsequently to exported or failed_export. If no connector extension is deployed to a queue or if the attribute asynchronous is set to false, an annotation status will change from reviewing to exported (or failed_export) directly.

Endpoint: validate

This endpoint is called after the document processing has finished, when operator opens a document in the Rossum verification interface and then every time after operator updates a field. After the processing is finished, the initial validate call is marked with initial=true URL parameter. For the other calls, only /validate without the parameter is called. Note that after document processing, initial validation is followed by business rules execution for both validation and annotation_imported events.

The request path is fixed to /validate and cannot be changed.

It may:

  • validate the given annotation tree and return a list of messages commenting on it (e.g. pointing out errors or showing matched suppliers).
  • update the annotation tree by returning a list of replace, add and remove operations

Both the messages and the updated data are shown in the verification interface. Moreover, the messages may block confirmation in the case of errors.

This endpoint should be fast as it is part of an interactive workflow.

Receives an annotation tree as content.

Returns a JSON object with the lists: messages, operations and updated_datapoints.

Keys messages, operations (optional)

The description of these keys was moved to the Hook Extension. See the description here.

Key updated_datapoints (optional, deprecated)

We also support a simplified version of updates using updated_datapoints response key. It only supports updates (no add or remove operations) and is now deprecated. The updated datapoint object contains attributes:

Key Type Description
id string A unique id of the relevant datapoint, currently only datapoints of category datapoint can be updated
value string New value of the datapoint. Value is formatted according to the datapoint type (e.g. date is string representation of ISO 8601 format).
hidden boolean Toggle for hiding/showing of the datapoint, see datapoint
options list[object] Options of the datapoint -- valid only for type=enum, see enum options
position list[float] New position of the datapoint, list of four numbers.

Validate endpoint should always return 200 OK status.

An error message returned from the connector prevents user from confirming the document.

Endpoint: save

This endpoint is called when the invoice transitions to the exported state. Connector may process the final document annotation and save it to the target system. It receives an annotation tree as content. The request path is fixed to /save and cannot be changed.

The save endpoint is called asynchronously (unless synchronous mode is set) in related connector object. Timeout of the save endpoint is 60 seconds.

Note: The save endpoint configuration influences the document state flow - when the document leaves the reviewing state, it enters the exporting state in case the save endpoint is called asynchronously. Otherwise, it transitions straight to the exported state.

For successful export, the request should have 2xx status.

Example of successful save responses without messages in UI:

HTTP/1.1 204 No Content
HTTP/1.1 200 OK
Content-Type: text/plain

this response body is ignored
HTTP/1.1 200 OK
Content-Type: application/json

{
  "messages": []
}

When messages are expected to be displayed in the UI, they should be sent in the same format as in validate endpoint.

Example of successful save response with messages in UI:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "messages": [
    {
      "content": "Everything is OK.",
      "id": null,
      "type": "info"
    }
  ]
}

If the endpoint fails with an HTTP error and/or message of type error is received, the document transitions to the failed_export state - it is then available to the operators for manual review and re-queueing to the to_review state in the user interface. Re-queueing may be done also programmatically via the API using a PATCH call to set to_review annotation status. Patching annotation status to exporting state triggers an export retry.

Example of failed save response with messages in UI:

HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json

{
  "messages": [
    {
      "content": "Even though this message is info, the export will fail due to the status code.",
      "id": null,
      "type": "info"
    }
  ]
}

Example of failed save response with messages in UI:

HTTP/1.1 500 Internal Server Error
Content-Type: text/plain

An errror message "Export failed." will show up in the UI

Example of failed save response with messages in UI:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "messages": [
    {
      "content": "Proper status code could not be set.",
      "id": null,
      "type": "error"
    }
  ]
}

Note: In the future, 5xx error status may cause automatic retries on the Rossum side. Currently, no automatic retries are performed.

Custom UI Extension

Sometimes users might want to extend the behavior of UI validation view with something special. That should be the goal of custom UI extensions.

Buttons

Currently, there are two different ways of using a custom button:

  1. Popup Button - opens a specific URL in the web browser
  2. Validate Button - triggers a standard validate call to connector

If you would like to read more about how to create a button, see the Button schema.

Popup Button opens a website completely managed by the user in a separate tab. It runs in parallel to the validation interface session in the app. Such website can be used for any interface that will assist operators in the reviewing process.

Example Use Cases of Popup Button:

  1. opening an email linked to the annotated document
  2. creating a new item in external database according to extracted data

Communication with the Validation Interface

Note: Calling Rossum API from a popup outside the scope of the calls described below is not possible.

You can communicate with the validation interface directly using standard browser API of window.postMessage. You will need to use window.addEventListeners in order to receive messages from the validation interface:

window.addEventListener('message', ({ data: { type, result } }) => {
  // logic
});

The shape of the result key is the same as the top level content attribute of the annotation data response.

Once the listener is in place, you can post one of supported message types:

  • GET_DATAPOINTS - returns the same tree structure you'd get by requesting annotation data
window.opener.postMessage(
  { type: 'GET_DATAPOINTS' },
  'https://example.rossum.app'
)
  • UPDATE_DATAPOINT - sends updated value to a Rossum datapoint. Only one datapoint value can be updated at a time.
window.opener.postMessage(
  {
    type: 'UPDATE_DATAPOINT',
    data: {id: DATAPOINT_ID, value: "Updated value"}
  },
  'https://example.rossum.app'
)
  • FINISH - informs the Rossum app that the popup process is ready to be closed. After this message is posted, popup will be closed and Rossum app will trigger a validate call.
window.opener.postMessage(
  { type: 'FINISH' },
  'https://example.rossum.app'
);

Providing message type to postMessage lets Rossum interface know what operation user requests and determines the type of the answer which could be used to match appropriate response.

Validate button

If popup_url key is missing in button's schema, clicking the button will trigger a standard validate call to connector. In such call, updated_datapoint_ids will contain the ID of the pressed button.

Note: if you're missing some annotation data that you'd like to receive in a similar way, do contact our support team. We're collecting feedback to further expand this list.

Extension Logs

For easy and efficient development process of the extensions, our backend logs requests, responses (if enabled) and additional information, when the hook is being called.

Hook Log

The hook log objects consist of following attributes, where it also differentiates between the hook events as follows:

Base Hook Log object

These attributes are included in all the logs independent of the hook event

Key Type Description Optional
timestamp* str Timestamp of the log-record
request_id UUID Hook call request ID
event string Hook's event
action string Hook's action
organization_id int ID of the associated Organization.
queue_id int ID of the associated Queue. true
hook_id int ID of the associated Hook.
hook_type str Hook type. Possible values: webhook, function
log_level str Log-level. Possible values: INFO, ERROR, WARNING
message str A log-message
request str Raw request sent to the Hook true
response str Raw response received from the Hook true

*Timestamp is of the ISO 8601 format with UTC timezone e.g. 2023-04-21T07:58:49.312655

Annotation Content or Annotation Status Hook Events

In addition to the Base Hook Log object, the annotation content and annotation status event hook logs contains the following attributes:

Key Type Description Optional
annotation_id int ID of the associated Annotation. true

Email Hook Events

In addition to the Base Hook Log object, the email event hook logs contains the following attributes:

Key Type Description Optional
email_id int ID of the associated Email. true

Source IP Address ranges

Rossum will use these source IP addresses for outgoing connections to your services (e.g. when sending requests to a webhook URL):

Europe (Ireland):

  • 34.254.110.123
  • 52.209.175.153
  • 54.217.193.239
  • 54.246.127.143

Europe 2 (Frankfurt):

  • 3.75.26.254
  • 3.126.211.68
  • 3.126.98.96
  • 3.76.159.143

US (N. Virginia):

  • 3.222.161.192
  • 50.19.104.88
  • 52.2.120.212
  • 18.213.174.191

JP (Tokyo):

  • 3.115.38.171
  • 35.74.141.62
  • 35.75.49.12
  • 52.194.128.167

You can use the list to limit incoming connections on a firewall. The list may be updated eventually, please update your configuration at least once per three months.

Rossum Transaction Scripts

The Rossum platform can evaluate snippets of Python code that can manipulate business transactions processed by Rossum - Transaction Scripts (or TxScripts). The principal use of these TxScript snippets is to automatically fill in computed values of formula type fields. The code can be also evaluated as a serverless function based extension that is hooked to the annotation_content event.

The TxScript Python environment is based on Python 3.12 or newer, in addition including a variety of additional predefined functions and variables. The environment has been designed so that code operating on Rossum objects is very short, easy to read and write by both humans and LLMs, and many simple tasks are doable even by non-programmers (who could however e.g. build an Excel spreadsheet).

The environment is special in the following ways:

  • Predefined variables allowing easy access to Rossum objects.

  • Some environment-specific helper functions and aliases.

  • How code is evaluated specifically in formula field context to yield a computed value.

Warning: Right now, the TxScript environment is geared just towards the annotation_content event. Ultimately, we plan to provide TxScript coverage for all provided events.

The TxScript environment provides accessors to Rossum objects associated with the event that triggered the code evaluation. The event context is generally available through a txscript.TxScript object; calling the object methods and modifying the attributes (such as raising messages or modifying field values) controls the event hook response.

Basic TxScript usage in a serverless function:

from txscript import TxScript

def rossum_hook_request_handler(payload: dict) -> dict:
    t = TxScript.from_payload(payload)
    print(t)
    return t.hook_response()

In serverless functions, this object must be explicitly imported and instantiated using a .from_payload() function. The .hook_response() method yields a dict representing the prescribed event hook response (with keys such as "messages", "operations" etc.) that can be directly returned from the handler.

Meanwhile, in formula fields it is instantiated automatically and its existence is entirely transparent to the developer as the object's attributes and methods are directly available as globals of the formula fields code.

Note: The txscript package is published on PyPI. You can install it yourself with pip install txscript and execute scripts locally.

Pythonized Rossum objects

The TxScript environment provides instances of several pertinent Rossum objects. These instances are directly available in globals namespace in formula fields, and as atributes of the TxScript instance within serverless functions.

Fields Object

A field object is provided that allows access to the fields of annotation content.

Attributes

Object attributes correspond to annotation fields, e.g. field.amount_total will evaluate to the value of the amount_total field. The attributes behave specially:

  • The field value types are pythonized. String fields are str type, number fields are float type, date fields are datetime.date instances.

  • Since number fields are of type float, they should always be rounded when tested for equality (because e.g. 0.1 + 0.2 isn't exactly 0.3 in floating-point arithmetics): round(field.amount_total, 2) == round(field.amount_total_base, 2)

Example using all_values property:

if all(not is_empty(field.item_amount_base.all_values)):
    sum(default_to(field.item_amount_tax.all_values, 0) * 0.9 + field.item_amount_base.all_values)
  • You can access all in-multivalue field ids (table columns or simple multivalues) via the .all_values property (e.g. field.item_amount.all_values). Its value is a special sequence object TableColumn that behaves similarly to a list, but with operators applying elementwise or distributive to scalars (NumPy-like). Outside a single row context, the .all_values property is the only legal way to work with these field ids. It is also a way to access a row of another multivalue from a multivalue formula.

Example iterating over multivalue rows in a formula:

for row in field.line_items:
    if not is_empty(row.item_amount) and row.item_amount < 0:
        show_warning("Negative amount", row.item_amount)

Example iterating over multivalue rows in a serverless function:

from txscript import TxScript, is_empty

def rossum_hook_request_handler(payload: dict) -> dict:
    t = TxScript.from_payload(payload)
    for row in t.field.line_items:
        if not is_empty(row.item_amount) and row.item_amount < 0:
            t.show_warning("Negative amount", row.item_amount)
    return t.hook_response()
  • You can access individual multivalue tuple rows by accessing the multivalue or tuple field id, which provides a list of field-like objects that provide in-row tuple field members as attributes named by their field id.

  • While field.amount_total evaluates to a float-like value (or other types), the value also provides an attr attribute that gives access to all field schema, field object value and field object value content API object attributes (i.e. one can write field.amount_total.attr.rir_confidence). Attributes position, page, validation_sources, hidden and options are read-write.

  • Fields that are not set (or are in an error state due to an invalid value) evaluate to a None-like value (except strings which evaluate to ""), but because of the above they are in fact not pure Python Nones. Therefore, they must not be tested for using is None. Instead, convenience helpers is_empty(field.amount_total) and default_to(field.amount_total, 0) should be used. These helpers also behave correctly on string fields as well.

Example using is_empty and default_to helpers:

from txscript import TxScript, is_empty, default_to

def rossum_hook_request_handler(payload: dict) -> dict:
    t = TxScript.from_payload(payload)

    if not is_empty(t.field.amount_tax_base):
        # Note: This type of operation is strongly discouraged in serverless
        # functions, since the modification is non-transparent to the user and
        # it is hard to trace down which hook modified the field.
        # Always prefer making amount_total a formula field!
        t.field.amount_total = t.field.amount_tax_base + default_to(t.field.amount_tax, 0)

    # Merge po_number_external to the po_numbers multivalue
    if not is_empty(t.field.po_number_external):
        t.field.po_numbers.all_values.remove(t.field.po_number_external)
        t.automation_blocker("External PO", t.field.po_numbers)
    else:
        t.field.po_number_external.attr.hidden = True

    # Filter out non-empty line items and add a discount line item
    t.field.line_items = [row for row in t.field.line_items if not is_empty(row.item_amount)]
    if "10% discount" in t.field.terms and not is_empty(t.field.amount_total):
        t.field.line_items.append({"item_amount": -t.field.amount_total * 0.1, "item_description": "10% discount"})
        t.field.line_items[-1].item_amount.attr.validation_sources.append("connector")
        t.field.line_items[-1].item_description.attr.validation_sources.append("connector")

    t.field.po_match.attr.options = [{"label": f"PO: {po}", "value": po} for po in t.field.po_numbers.all_values]
    t.field.po_match.attr.options += t.field.default_po_enum.attr.options
    # Update the currently selected enum option if the value fell out of the list
    if (
        len(t.field.po_match.attr.options) > 0
        and t.field.po_match not in [po.value for po in t.field.po_match.attr.options]
    ):
        t.field.po_match = t.field.po_match.attr.options[0].value

    return t.hook_response()
  • You can assign values to the field attributes and modify the multivalue lists, which will be reflected back in the app once your hook finishes. (This is not permitted in the read-only context of formula fields.) You may construct values of tuple rows as dicts indexed by column schema ids.

  • You can modify the field.*.attr.validation_sources list and it will be reflected back in the app once your hook finishes. It is not recommended to perform any operation except .append("connector") (automates the field).

  • For enum type fields, you can modify the field.*.attr.options list and it will be reflected back in the app once your hook finishes. Elements of the list are objects with the label and value attribute each. You may construct new elements as dicts with the label and value keys.

  • Outside of formula fields, you may access fields dynamically by computed schema id (for example based on configuration variables) by using standard Python's getattr(field, schema_id). Note that inside formula fields, such dynamic access is not supported as it breaks automatic dependency tracking and formula field value would not be recomputed once the referred field value changes.

  • You may also access the parent of nested fields (within multivalues and/or tuples) via their .parent attribute, or the enclosing multivalue field via .parent_multivalue. This is useful when combined with the getattr dynamic field access. For example, in the default Rossum schema naming setup, getattr(field, "item_quantity").parent_multivalue == field.line_items.

Warning: When referring to formula field values within TxScript, note that their value may be out of date in case one of their inputs was modified during the same TxScript context - their value is recomputed only once TxScript evaluation finishes. (However, at the beginning of each hook, all formula field values are guaranteed to be up to date.) Please note that any of this behavior may change in the future.

Annotation Object

An annotation object is provided, representing the pertinent annotation.

Attributes

The available attributes are: id, url, status previous_status, automated, automatically_rejected, einvoice, metadata, created_at, modified_at, exported_at, confirmed_at, assigned_at, export_failed_at, deleted_at, rejected_at, purged_at

The timestamp attributes, such as created_at, are represented as a python datetime instance.

Note: You can format a python datetime to your format of choice using annotation.created_at.strftime("%m/%d/%Y, %H:%M:%S").

The raw_data attribute is a dict containing all attributes of the annotation API object.

The annotation also has a document attribute. The document itself has the following attributes: id, url, arrived_at, created_at, original_file_name, metadata, mime-type, see document for more details. raw_data is also provided.

This enables txscript code such as annotation.document.original_file_name.

The annotation also has an optional email attribute. The email itself has the following attributes: id, url, created_at, last_thread_email_created_at, subject, email_from (identical to from on API), to, cc, bcc, body_text_plain, body_text_html, metadata, annotation_counts, type, labels, filtered_out_document_count, see email for more details. raw_data is also provided.

This enables txscript code such as annotation.email.subject.

Note: In a hook context, the email is available only if emails are sideloaded.

Example of rejecting an annotation:

from txscript import TxScript

def rossum_hook_request_handler(payload: dict) -> dict:
    t = TxScript.from_payload(payload)
    if round(t.field.amount_total) != round(t.field.amount_total_base + t.field.amount_tax):
        annotation.action("reject", note_content="Amounts do not match")
    if t.field.amount_total > 100000:
        annotation.action("postpone")
    return t.hook_response()

Methods

The action(verb: str, **args) method issues a POST on the annotation API object for a given verb in the form POST /v1/annotations/{id}/{verb}, passing additional arguments as specified. (Notable verbs are reject, postpone and delete.)

Note that Rossum authorization token passing must be enabled on the hook.

TxScript Functions

Several functions are provided that map 1:1 to common extension hook return values. These functions are directly available in globals namespace in formula fields, and as methods of the TxScript instance within serverless functions.

Example of raising a message in a formula field:

if field.date_issue < date(2024, 1, 1):
    show_warning("Issue date long in the past", field.date_issue)

Example of raising a message in serverless function hook:

from txscript import TxScript

def rossum_hook_request_handler(payload: dict) -> dict:
    t = TxScript.from_payload(payload)
    if t.field.date_issue < date(2024, 1, 1):
        t.show_warning("Issue date long in the past", field.date_issue)
    return t.hook_response()

The show_error(), show_warning() and show_info() functions raise a message, either document-wide or attached to a particular field. As arguments, they take the message text (content key) and optionally the field to attach the message to (converted to the id key). If no field is passed or if the field references a multivalue column, a document-level message is created.

For example, you may use show_error() for fatals like a missing required field, whereas show_info() is suitable to decorate a supplier company id with its name as looked up in the suppliers database.

Example of a formula raising an automation blocker:

if not is_empty(field.amount_total) and field.amount_total < 0:
    automation_blocker("Total amount is negative", field.amount_total)

The automation_blocker() function analogously raises an automation blocker, creating automation blockers of type extension and therefore stopping the automation without the need to create an error message. The function signature is the same as for the show... methods above.

Helper Functions and Aliases

Whenever a helper function is available, it should be used preferentially. This is for the sake of better usability for admin users, but also because these functions are e.g. designed to seamlessly work with TableColumn instances.

All identifiers below are directly available in globals namespace in formula fields. Within serverless functions, they can be imported as from txscript import ... (or all of them obtained via from txscript import *).

Helper Functions

The is_empty(field.amount_total) boolean function returns True if the given field has no value set. Use this instead of testing for None.

The default_to(field.order_id, "INVALID") returns either the field value, or a fallback value (string INVALID in this example) in case it is not set.

Convenience Aliases

All string manipulations should be performed using substitute(...), which is an alias for re.sub.

These identifiers are automatically imported:

from datetime import date, timedelta

import re

Formula Fields

The Rossum Transaction Scripts can be evaluated in the context of a formula-type field to automatically compute its value.

In this context, the field object is read-only, i.e. side-effects on values of other fields are prohibited (though you can still attach a message or automation blocker to another field). The annotation object is not available.

This example sets the formula field value to either 0 or the output of the specified regex substitution:

if field.order_id == "INVALID":
    show_warning("Falling back to zero", field.order_id)
    "0"
else:
    substitute(r"[^0-9]", r"", field.order_id)

The Python code is evaluated just as Python's interactive mode would run it, using the last would-be printed value as the formula field value. In other words, the value of the last evaluated expression in the code is used as the new value of the field.

In case the field is within a multivalue tuple, it is evaluated for each cell of that column, i.e. within each row. Referring to other fields within the row via the field object accesses the value of the respective single row cell (just like the row object when iterating over multivalue tuple rows). Referring to fields outside the multivalue tuple via the field object still works as usual. Thus, in a definition of field.item_amount formula, field.item_quantity refers to the quantity value of the current row, while you can still also access field.amount_total header field. Further, field._index provides the row number.

Field dependencies of formula fields are determined automatically. The only caveat is that in case you iterate over line item rows within the formula field code, you must name your iterator row.

Automation

All imported documents are processed by the data extraction process to obtain values of fields specified in the schema. Extracted values are then available for validation in the UI.

Using per-queue automation settings, it is possible to skip manual UI validation step and automatically switch document to confirmed state or proceed with the export of the document. Decision to export document or switch it to confirmed state is based on Queue settings.

Currently, there are three levels of automation:

  • No automation: User has to review all documents in the UI to validate extracted data (default).

  • Confidence automation: User only reviews documents with low data extraction confidence ("tick" icon is not displayed for one or more fields) or validation errors. By default, we automate documents that are duplicates and do not automate documents that edits (split) is proposed. You can change this in per-queue automation settings

  • Full automation: All documents with no validation errors are exported or switched to confirmed state only if they do not contain a suggested edit (split). You can change this in per-queue automation settings

    An error triggered by a schema field constraint or connector validation blocks auto-export even in full-automation level. In such case, non-required fields with validation errors are cleared and validation is performed again. In case the error persists, the document must be reviewed manually, otherwise it is exported or switched to confirmed state.

Note: Rossum never exports a document that contains validation errors. If you want to export all documents, it is necessary to set-up schema and connector in a way that no validation error may occur. Validation errors come up if the extracted data does not pass the validation rules set-up in the schema or connector.. the format is incorrect, constraints are not followed, etc.). Please note that hidden fields are not validated and do not affect document automation.

Read more about the Automation framework on our developer hub.

Sources of field validation

Low-confidence fields are considered to be not validated. On the API level they have an empty validation_sources list.

Validation of a field may be introduced by various sources: data extraction confidence above a threshold, computation of various checksums (e.g. VAT rate, net amount and gross amount) or a human review. These validations are recorded in the validation_source list. The data extraction confidence threshold may be adjusted, see validation sources for details.

AI Confidence Scores

While there are multiple ways to automatically pre-validate fields, the most prominent one is score-based validation based on AI Core Engine confidence scores.

The confidence score predicted for each AI-extractd field is stored in the rir_confidence attribute. The score is a number between 0 and 1, and is calibrated in such a way that it corresponds to the probability of a given value to be correct. In other words, a field with score 0.80 is expected to be correct 4 out of 5 times.

The value of the score_threshold (can be set on queue, or individually per datapoint in schema; default is 0.8) attribute represents the minimum score that triggers automatic validation. Because of the score meaning, this directly corresponds to the achieved accuracy. For example, if a score threshold for validation is set at 0.8, that gives an expected error rate of 20% for that field.

Warning: An exception to the confidence score semantics may be Dedicated AI Engines based on low amounts of training data, which might not be calibrated. Please ask your Rossum technical contact about confidence scores in your case if you are using a Dedicated AI Engine.

Autopilot

Autopilot is a automatic process removing "eye" icon from fields. This process is based on past occurrence of field value on documents which has been already processed in the same queue.

Read more about this Automation component on our developer hub.

Autopilot configuration

Example autopilot configuration:

{
  "autopilot": {
    "enabled": true,

    "search_history":{
      "rir_field_names": ["sender_ic", "sender_dic", "account_num", "iban", "sender_name"],
      "matching_fields_threshold": 2
    },
    "automate_fields":{
      "rir_field_names": [
        "account_num",
        "bank_num",
        "iban",
        "bic",
        "sender_dic",
        "sender_ic",
        "recipient_dic",
        "recipient_ic",
        "const_sym"
      ],
      "field_repeated_min": 3
    }
  }
}

Autopilot configuration can be modified in Queue.settings where you can set rules for each queue. If Autopilot is not explicitly disabled by switch enabled set to false, Autopilot is enabled.

Configuration is divided into two sections:

This section configures process of finding documents from the same sender as the document which is currently being processed. Annotation is considered from the same sender if it contains fields with same rir_field_name and value as the current document.

Example history search configuration:

{
  "search_history":{
    "rir_field_names": ["sender_ic", "sender_dic", "account_num"],
    "matching_fields_threshold": 2
  }
}
Attribute Type Description
rir_field_names list List of rir_field_names used to find annotations from the same sender. This should contain fields which are unique for each sender. For example sender_ic or sender_dic.
Please note that due to technical reasons it is not possible to use document_type in this field and it will be ignored.
matching_fields_threshold int At least matching_fields_threshold fields must match current annotation in order to be considered from the same sender. See example on the right side.

Automate fields

This section describes rules which will be applied on annotations found in previous step History search. Field will have "eye" icon removed, if we have found at least field_repeated_min fields with same rir_field_name and value on documents found in step History search.

Attribute Type Description
rir_field_names list List of rir_field_names which can be validated based on past occurrence
field_repeated_min int Number of times field must be repeated in order to be validated

If any config section is missing, default value which you can see on the right side is applied.

Using Triggers

Trigger REST operations can be found here

When an event occurs, all triggers of that type will perform actions of their related objects:

Related object Action Description
Email template Send email with the template to the event triggerer if automate=true Automatically respond to document vendors based on the document's content. The document has to come from an email
Delete recommendations Stop automation if one of the validation rules applies to the processed document Based on the user's rules for delete recommendations, stop automation for the document which applies to these rules. The document requires manual evaluation

Note: If you have a Hook and a Trigger configured for same event, the Hook action will be executed first

Trigger Event Types

Beta

Trigger objects can have one of the following event types:

Trigger Event type Description (Trigger for an event of)
email_with_no_processable_attachments An Email has been received without any processable attachments
annotation_created Processing of the Annotation started (Rossum received the Annotation)
annotation_imported Annotation data have been extracted by Rossum
annotation_confirmed Annotation was checked and confirmed by user (or automated)
annotation_exported Annotation was exported
validation Document is being validated

Trigger Events Occurrence Diagram

To show an overview of the Trigger events and when they are happening, this diagram was created.

Trigger Events Diagram

Trigger Condition

A subset of MongoDB Query Language. The annotation will get converted into JSON records behind the scenes. The trigger gets activated if at least one such record matches the condition according to the MQL query rules. A null condition matches any record, just like {}. Record format:

   {
     "field": {
       "{schema_id}": string | null,
     },
     "required_field_missing": boolean,
     "missing_fields": string[],
   }

Example trigger condition with AND operator:

{
  "$and": [
    {
      "field.vendor_id": {
        "$and": [
          {"$exists": true},
          {"$regex": "Meat ltd\\."}
        ]
      }
    }
  ]
}

Example on how to check if any of the required fields are missing:

{
  "$and": [
    {"required_field_missing": true}
  ]
}

This example shows how to use the AND operator to check for multiple conditions. In this case, the trigger will be activated if the vendor ID exists and matches the regex pattern "Milk( inc\.)?" and if the required field is missing.

{
  "$and": [
    {
      "field.vendor_id": {
        "$and": [
          {"$exists": true},
          {"$regex": "Milk( inc\\.)?"}
        ]
      }
    },
    {"required_field_missing": true}
  ]
}

Example checking for specific document type:

{
  "$or": [
    {
      "field.document_type": {"$eq": "invoice"}
    }
  ]
}

Example checking field value range:

{
  "$or": [
    {
      "field.vendor_id": {
        "$or": [
          {"$regex": "Milk( inc\\.)?"},
          {"$regex": "Barn( inc\\.)?"}  
        ]
      }
    }
  ]
}

Example checking for high amount:

{
  "$or": [
    {
      "number_of_pages": {
        "$gt": 10
      }
    }
  ]
}

Supported MQL subset based on the trigger event type:

All trigger event types:

   {}

Only annotation_imported, annotation_confirmed, and annotation_exported trigger event types:

   {
     "$and": [
       {"field.{schema_id}": {"$and": [{"$exists": true}, REGEX]}}
     ]
   }

Only annotation_imported trigger event type:

   {
     "$and": [
       {"field.{schema_id}": {"$and": [{"$exists": true}, REGEX]}},
       {"required_field_missing": true},
       {"missing_fields": {"$elemMatch": {"$in": list[str[schema_id]]}}
     ]
   }

Only validation trigger event type:

   {
     "$or": [
       {"field.document_type": {"$in": list[str[document_type]]},
       {"field.language": {"$in": list[str[language]]},
       {"field.currency": {"$in": list[str[currency]]},
       {"number_of_pages": {"$gt": 10},
       {"filename": REGEX}
     ]
   }
   {
     "$or": [
       {"field.document_type": {"$in": list[str[document_type]]},
       {"field.language": {"$in": list[str[language]]},
       {"field.currency": {"$in": list[str[currency]]},
       {"number_of_pages": {"$gt": 10},
       {"filename": {"$or": [REGEX, REGEX]}
     ]
   }
Field Required Description
field.{schema_id} A field contained in the Annotation data. The schema_id is the schema id it got extracted under
required_field_missing Any of the schema-required fields is missing. (*) Can not be combined with missing_fields
missing_fields At least one of the schema fields is missing. (*) Can not be combined with required_field_missing
field.{validation_field} A field contained a list of Delete Recommendation data. The validation_field is the schema id it got extracted under
number_of_pages A threshold value for the number of pages. A document with more pages is matched by the trigger.
filename The filename or subset of filenames of the document is to match.
REGEX true Either {"$regex": re2} or {"$not": {"$regex": re2}}**. Uses re2 regex syntax

(*) A field is considered missing if any of the two following conditions is met

  • the field has ui_configuration of type captured or null and no value was extracted for it and rir_cofidence score is at least 0.95

  • the field has ui_configuration of other types (data, manual, formula, ...) and has an empty value

(**) The $not option for REGEX is not valid for the validation trigger.

Triggering Email Templates

Email template REST operations can be found here.

To set up email template trigger automation, link an email template object to a trigger object and set its automate attribute to true. Currently, only one trigger can be linked. To set up the recipient(s) of the automated emails, you can use built-in placeholders or direct values in the to, cc, and bcc fields in email templates.

Only some email template types and some trigger event types can be linked together:

Template type Allowed trigger events
custom *
email_with_no_processable_attachments email_with_no_processable_attachments
rejection annotation_imported
rejection_default annotation_imported

Email templates of type rejection and rejection_default will also reject the associated annotation when triggered.

Every newly created queue has default email templates. Some of them have a trigger linked, including an email template of type email_with_no_processable_attachments which can not have its trigger unlinked or linked to another trigger. To disable its automation, set its automate attribute to false.

Triggering Validation

Delete Recommendation REST operations can be found here.

To set up validation trigger automation, specify the rules for validation and set its enabled attribute to true.

This trigger is only valid for the validation trigger event.

Hooks and Triggers Workflow

Sometimes it may happen that there is a need to know, what triggers and hooks and when are they run. That can be found in this workflow.

Hook and Trigger Events Order Diagram

Workflow Guide

Beta This feature must be explicitly enabled in queue settings.

Note: Talk with a Rossum representative about enabling this feature.

Approval workflows

Approval workflows allow you to define multiple steps of approval process.

The workflow is started when the data extraction process is done (annotation is confirmed) - it enters in_workflow status. Then the annotation must be approved by defined approvers in order to be moved further (confirmed or exported status).

The annotation is moved to rejected status if one of the assignees rejects it.

Note: The resources used for configuration of workflows (workflow, workflow step) have read-only API at the moment. Please, contact Rossum support if you wish to change it.

The current status of workflow is stored in workflow run object. All the events that happened during workflow can be tracked down by workflow activity resources.

Embedded Mode

In some use-cases, it is desirable to use only the per-annotation validation view of the Rossum application. Rossum may be integrated with other systems using so-called embedded mode.

In embedded mode, special URL is constructed and then used in iframe or popup browser window to show Rossum annotation view. Some view navigation widgets are hidden (such as home, postpone and delete buttons), so that user is only allowed to update and confirm all field values.

Embedded mode can be used to view annotations only in status to_review, reviewing, postponed, or confirmed.

For security reasons it is strongly recommended to use annotator_embedded user role for this feature as this user role has limited permissions to only be able to interact with resources necessary for embedded validation screen.

Note: See the embedded mode in action in our embedded demo sample.

Note: Talk with a Rossum representative about enabling this feature.

Embedded mode workflow

The host application first uploads a document using standard Rossum API. During this process, an annotation object is created. It is possible to obtain a status of the annotation object and wait for the status to become to_review (ready for checking) using annotation endpoint.

As soon as importing of the annotation object has finished, an authenticated user may call start_embedded endpoint to obtain a URL that is to be included in iframe or popup browser window of the host application. Parameters of the call are return_url and cancel_url that are used to redirect to in a browser when user finishes the annotation.

The URL contains security token that is used by embedded Rossum application to access Rossum API. When the checking of the document has finished, user clicks on done button and host application is notified about finished annotation through save endpoint of the connector HTTP API. By default, this call is made asynchronously, which causes a lag (up to a few seconds) between the click on done button and the call to save endpoint. However, it is possible to switch the calls to synchronous mode by switching the connector asynchronous toggle to false (see connector for reference).

FAQ

SSL connection errors

Rossum API only supports TLS 1.2 to ensure that up-to-date algorithms and ciphers are used.

Older SSL libraries may not work properly with TLS 1.2. If you encounter SSL/TLS compatibility issue, please make sure the library supports TLS 1.2 and the support is switched on.

Annotation Content

Annotation content is used by the Rossum UI to display annotation content. Be aware that values in attribute value are not normalized (e.g. numbers, dates) and data structure may be changed to accommodate UI requirements.

Use export endpoint to download extracted data using a stable interface with normalized values. It supports various data formats (JSON, XML, CSV).

Time Spent

Time spent on datapoint are in seconds and are stored on datapoint object, for category multivalue or datapoint. For time spent on the annotation level, see annotation processing duration.

Active time spent is stored in time_spent. Overall time spent is stored in time_spent_overall. Active time spent with an active magic grid is stored in time_spent_grid. Overall time spent with an active magic grid is stored in time_spent_grid_overall.

Measuring starts when an annotation is not in a read-only mode after selecting a datapoint.

Measuring ends when:

  • Another datapoint is selected. Selecting of datapoints when showing automation blockers doesn’t end or affect the measuring.
  • The user leaves an annotation (for the same reasons as measuring ends on an annotation)
  • The user goes to edit mode

When a measuring ends time_spent of the previously selected datapoint is incremented by measured time_spent and the result is patched together with adding a human validation source to validation sources.

Formula Datapoints

For datapoint category fields which have their schema UI configuration's type property set to formula the datapoint content and attributes are being updated automatically based on the provided formula code.

For editable formula fields (i.e. the corresponding UI configuration's edit property is not set to disabled option) the automatic recalculation can be disabled by setting the datapoint no_recalculation flag to true. To re-enable the formula automatic recalculation set the no_recalculation flag to false.

Updates of formula datapoints properties and values via API are only available for invocations done from the UI.

Validation Source

The validation_sources property is a list of sources that verified the extracted data. When the list is non-empty, datapoint is considered to be validated (and no eye-icon is displayed next to it in the Rossum UI).

Currently, these are the sources of validation:

  • score: confidence score coming from the AI Core Engine was higher than a preset score threshold (can be set on queue, or individually per datapoint in schema; default is 0.8).
  • checks: Data extractor does several checks like summing up tax_details, which can verify that the data were extracted correctly.
  • not_found: Value was not found by the AI engine. As we do not report confidence in such cases yet, we add a validation source instead. It will be removed as soon as we have confidence present for field that were not found.
  • data_matching: Set by a hook when, for example, the datapoint matches some other database.
  • history: Several fields can be confirmed from historical data in exported documents (can be turned on/off on per queue basis using autopilot section in its settings).
  • connector: A connector verified the validity.
  • table_suggester: Used internally for the complex line items user interface.
  • rules: Added from rules and actions on a queue.
  • human: An operator visited the field in validation interface (assumed just verifying the value, not necessarily making any corrections).
  • non_required: Value was not found, is non-required and has no rir_field_name set.
  • NA: Validation sources are "Not Applicable" and may now occur only for button datapoints.

The list is subject to ongoing expansion.

Grid

Grid object (for internal use only) is used to store table vertical and horizontal separators and related attributes. Every grid consists of zero or more parts.

Currently, it is only allowed to have one part per page (for a particular grid).

If two or more tables that should be extracted are present on one page, the grid object should be placed over the area of all of them. The parts that do not include the needed data should be marked as a row with "type": null value of the grid object.

Annotation Content object

Array of objects (annotation_content_section)

Represents the full content of an annotation, composed of sections and datapoints.

{
  • "content": [
    • {
      • "id": 197466,
      • "schema_id": "invoice_info_section",
      • "category": "section",
      • "children": [
        ]
      }
    ]
}

Retrieve annotation content

Returns annotation content in a form of datapoint tree.

When deprecated_fields=false query parameter is used, only content is returned from the endpoint, omitting results in the response. Please note that this parameter is for internal use and may change in the future.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer <int64>

Annotation ID

Responses

Response samples

Content type
application/json
{
  • "content": [
    • {
      • "id": 197466,
      • "schema_id": "invoice_info_section",
      • "category": "section",
      • "children": [
        ]
      }
    ],
  • "results": [ ]
}

Update annotation content Beta

Update annotation content. The format is the same as for GET, datapoints missing in the uploaded content are preserved.

Please note that tuples must contain all children datapoints. Otherwise the behavior is undefined (original and updated datapoints may be mixed).

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer <int64>

Annotation ID

Request Body schema: application/json
Array of objects (annotation_content_section)

Represents the full content of an annotation, composed of sections and datapoints.

Responses

Request samples

Content type
application/json
{
  • "content": [
    • {
      • "schema_id": "invoice_info_section",
      • "category": "section",
      • "children": [
        ]
      }
    ]
}

Response samples

Content type
application/json
{
  • "content": [
    • {
      • "id": 197466,
      • "schema_id": "invoice_info_section",
      • "category": "section",
      • "children": [
        ]
      }
    ]
}

Add row to multivalue datapoint

Adds a row to a multivalue table. This row will not be connected to the grid and modifications of the grid will not trigger any OCR on the cells of this row.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer <int64>

Annotation ID

nodeId
required
integer

ID of the multivalue node

query Parameters
deprecated_fields
boolean

When false, only content is returned from the endpoint, omitting results in the response. For internal use only.

Responses

Response samples

Content type
application/json
{ }

Bulk update annotation content

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

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

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

When deprecated_fields=false query parameter is used, only content is returned from the endpoint, omitting results in the response. Please note that this parameter is for internal use and may change in the future.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer <int64>

Annotation ID

Request Body schema: application/json
required
required
Array of operation_replace (object) or operation_add (object) or operation_remove (object)

List of operations to perform on annotation content

Responses

Request samples

Content type
application/json

Example showing how to perform multiple operations in a single request:

  • Replace a datapoint value
  • Remove a datapoint
  • Add a new row to a line items table
{
  • "operations": [
    • {
      • "op": "replace",
      • "id": 198143,
      • "value": {
        }
      },
    • {
      • "op": "remove",
      • "id": 884061
      },
    • {
      • "op": "add",
      • "id": 884060,
      • "value": [
        ]
      }
    ]
}

Response samples

Content type
application/json
{
  • "content": [
    • {
      • "id": 197466,
      • "schema_id": "invoice_info_section",
      • "category": "section",
      • "children": [
        ]
      }
    ]
}

Convert grid to table data

Transform grid structure to tabular data of related multivalue object.

Warning: This endpoint will be deprecated in the near future. It will be fully removed in the future. Please use the grid operations and partial grid operations endpoints.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer <int64>

Annotation ID

nodeId
required
integer

ID of the multivalue node

query Parameters
deprecated_fields
boolean

When false, only content is returned from the endpoint, omitting results in the response. For internal use only.

Responses

Response samples

Content type
application/json
{ }

Grid operations

This endpoint applies multiple operations on multiple grids for one multivalue and performs OCR if required, and updates the multivalue with the resulting grid.

For update operation the position of the grid and its rows and columns can be changed, the column layout can be changed, but the row structure must be unchanged.

The operations are applied sequentially. The grid_index corresponds to the index of the grid parts when the operation is applied. Combining different types of operations is not supported.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer <int64>

Annotation ID

multivalueId
required
integer

ID of the multivalue

Request Body schema: application/json
required
required
Array of objects

List of operations to apply to the grid

Responses

Request samples

Content type
application/json

Example showing how to update a grid structure for a line items table, including column positions, schema mappings, and row definitions.

{
  • "operations": [
    • {
      • "op": "update",
      • "grid_index": 0,
      • "grid": {
        }
      }
    ]
}

Response samples

Content type
application/json
{
  • "id": 27801931,
  • "schema_id": "line_items",
  • "category": "multivalue",
  • "validation_sources": [
    • "score"
    ],
  • "time_spent": 0.1,
  • "time_spent_overall": 0.1,
  • "hidden": true,
  • "children": [
    • {
      • "id": 27801932,
      • "schema_id": "line_items_row",
      • "category": "tuple",
      • "validation_sources": [
        ],
      • "time_spent": 0.1,
      • "time_spent_overall": 0.1,
      • "hidden": true,
      • "children": [
        ]
      }
    ],
  • "grid": {
    • "parts": [
      • {
        }
      ]
    },
  • "time_spent_grid": 0.1,
  • "time_spent_grid_overall": 0.1
}

Partial update grid

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

Operations are grouped in rows operations and columns operations.

Possible operations:

axis op required parameters OCR Result
columns update schema_id Yes Update column datapoints
columns delete schema_id No Set content to empty for column datapoints
rows create row_index Yes Insert a new row, create datapoints and perform OCR
rows update row_index, tuple_id Yes Update datapoints via OCR
rows delete tuple_id No Delete the tuple associated to this row

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

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer <int64>

Annotation ID

multivalueId
required
integer

ID of the multivalue

query Parameters
full_response
boolean
Default: false

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

Request Body schema: application/json
required
grid_index
required
integer

Index of the grid part

required
object (grid_part)

A single grid part representing table structure on a page

required
object

Operations to apply to the grid

Responses

Request samples

Content type
application/json

Example showing how to perform partial updates on a grid structure, including updating a row via OCR and updating a column.

{
  • "grid_index": 0,
  • "grid": {
    • "page": 1,
    • "columns": [
      • {
        },
      • {
        },
      • {
        }
      ],
    • "rows": [
      • {
        },
      • {
        }
      ],
    • "width": 500,
    • "height": 200
    },
  • "operations": {
    • "rows": [
      • {
        }
      ],
    • "columns": [
      • {
        }
      ]
    }
}

Response samples

Content type
application/json
{
  • "id": 27801931,
  • "schema_id": "line_items",
  • "category": "multivalue",
  • "validation_sources": [
    • "score"
    ],
  • "time_spent": 0.1,
  • "time_spent_overall": 0.1,
  • "hidden": true,
  • "children": [
    • {
      • "id": 27801932,
      • "schema_id": "line_items_row",
      • "category": "tuple",
      • "validation_sources": [
        ],
      • "time_spent": 0.1,
      • "time_spent_overall": 0.1,
      • "hidden": true,
      • "children": [
        ]
      }
    ],
  • "grid": {
    • "parts": [
      • {
        }
      ]
    },
  • "time_spent_grid": 0.1,
  • "time_spent_grid_overall": 0.1
}

Replace annotation content by OCR

Replace annotation content by OCR extracted from the rectangle of the document page.

When the rectangle size is unsuitable for OCR (any rectangle side is smaller than 4 px), rectangle is extended to cover the text that overlaps with the rectangle.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer <int64>

Annotation ID

nodeId
required
integer

ID of the child node

Request Body schema: application/json
required
rectangle
required
Array of numbers = 4 items

Bounding box of an occurrence (left, top, right, bottom)

page
required
string <uri>

URL of the page of the occurrence

Responses

Request samples

Content type
application/json

Request to extract text via OCR from a specific rectangular area on a document page.

{}

Response samples

Content type
application/json
{
  • "content": [
    • {
      • "id": 197466,
      • "schema_id": "invoice_info_section",
      • "category": "section",
      • "children": [
        ]
      }
    ]
}

Validate annotation content

Validate the content of an annotation. At first, the content is sent to the validate hook of connected extension. Then some standard validations (data type, constraints are checked) are carried out in Rossum. Additionally, if the annotation's respective queue has enabled delete recommendation conditions, they are evaluated as well.

By default, messages for hidden datapoints are omitted. The behavior could be changed using the messages_for_hidden_datapoints=true query parameter.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer <int64>

Annotation ID

query Parameters
messages_for_hidden_datapoints
boolean
Default: false

Include messages for hidden datapoints

Request Body schema: application/json
optional
actions
Array of strings
Default: ["user_update"]
Items Enum: "user_update" "updated" "started"

Validation actions. Possible values: ["user_update"], ["user_update", "updated"] or ["user_update", "started"]

updated_datapoint_ids
Array of integers

List of IDs of datapoints that were changed since last call of this endpoint.

Responses

Request samples

Content type
application/json

Request validation after user has updated specific datapoints (e.g., invoice number and total amount).

{
  • "actions": [
    • "user_update"
    ],
  • "updated_datapoint_ids": [
    • 37507206,
    • 37507215
    ]
}

Response samples

Content type
application/json

Example response showing a validation warning from a hook about a potential issue with the total amount.

{
  • "messages": [
    • {
      • "id": "37507215",
      • "type": "warning",
      • "content": "Total amount seems unusually high for this vendor",
      • "detail": {
        }
      }
    ],
  • "updated_datapoints": [ ],
  • "suggested_operations": [ ],
  • "matched_trigger_rules": [ ]
}

Annotation Processing Durations

Annotation processing duration stores additional time spent information for an Annotation.

Warning: Please note that Annotation Processing Duration is an internal API and can be changed without notice.

Measuring of time spent starts after an annotation is successfully started and datapoints and schema for annotation are fetched.

Measuring ends when:

  • user changes annotation status (confirm, postpone, delete, reject)
  • user leaves validation (goes back to dashboard or another page)
  • user goes to the next annotation
  • user confirms changes in edit mode
  • annotation time expires (checked periodically every 5 minutes if the current annotation is in reviewing state)
  • user closes a tab

time_spent_overall is the total time spent on the annotation, time_spent_active is the same but measurement is stopped after 10 seconds of inactivity (no mouse movement nor key stroke or inactive tab).

Retrieve annotation processing duration

Get annotation processing duration.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer <int64>

Annotation ID

Responses

Response samples

Content type
application/json
{ }

Update annotation processing duration

Update annotation processing duration.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer <int64>

Annotation ID

Request Body schema: application/json
required
object (processing_duration)

Optional processing duration object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

Annotations

An annotation object contains all extracted and verified data related to a document. Every document belongs to a queue and is related to the schema object, that defines datapoint types and overall shape of the extracted data.

Commonly you need to use the upload endpoint to create annotation instances.

Annotation object

id
integer

Id of the annotation.

url
string <uri>

URL of the annotation.

status
string
Enum: "confirmed" "created" "deleted" "exported" "exporting" "failed_export" "failed_import" "importing" "in_workflow" "postponed" "purged" "rejected" "reviewing" "split" "to_review"

Status of the document, see Document Lifecycle for more details.

document
string <uri>

Related document.

queue
string <uri>

A queue that annotation belongs to.

schema
string <uri>

A schema that defines content shape.

relations
Array of strings <uri> [ items <uri > ]
Deprecated

List of relations that annotation belongs to.

pages
Array of strings <uri> [ items <uri > ]

List of rendered pages.

creator
string <uri>

User that created the annotation.

created_at
string <date-time>

Timestamp of object's creation.

modifier
string or null <uri>

User that last modified the annotation.

modified_by
string or null <uri> (modified_by)

URL of the last modifier.

modified_at
string or null <date-time> (modified_at)

Date of the last modification.

assigned_at
string or null <date-time>

Timestamp of last assignment to a user or when the annotation was started being annotated.

confirmed_at
string or null <date-time>

Timestamp when the annotation was moved to status confirmed.

deleted_at
string or null <date-time>

Timestamp when the annotation was moved to status deleted.

exported_at
string or null <date-time>

Timestamp of finished export.

export_failed_at
string or null <date-time>

Timestamp of failed export.

purged_at
string or null <date-time>

Timestamp when was annotation purged.

rejected_at
string or null <date-time>

Timestamp when the annotation was moved to status rejected.

confirmed_by
string or null <uri>

User that confirmed the annotation.

deleted_by
string or null <uri>

User that deleted the annotation.

exported_by
string or null <uri>

User that exported the annotation.

purged_by
string or null <uri>

User that purged the annotation.

rejected_by
string or null <uri>

User that rejected the annotation.

rir_poll_id
string

Internal.

Array of objects or null
Default: []

List of messages from the connector (save).

content
string <uri>

Link to annotation data (datapoint values), see Annotation data.

suggested_edit
string or null <uri>

Link to Suggested edit object.

time_spent
number <float>
Default: 0

Total time spent while validating the annotation.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

automated
boolean
Default: false

Whether annotation was automated.

related_emails
Array of strings <uri> [ items <uri > ]

List of emails related with annotation.

email
string or null <uri>

Related email that the annotation was imported by (for annotations imported by email).

automation_blocker
string or null <uri>

Related automation blocker object.

email_thread
string or null <uri>

Related email thread object.

has_email_thread_with_replies
boolean

Related email thread contains more than one incoming email.

has_email_thread_with_new_replies
boolean

Related email thread contains an unread incoming email.

organization
string <uri>

Link to related organization.

automatically_rejected
boolean

Read-only field of automatically_rejected annotation.

prediction
object or null

Internal.

assignees
Array of strings <uri> [ items <uri > ]

List of assigned users (only for internal purposes).

labels
Array of strings <uri> [ items <uri > ]

List of selected labels.

restricted_access
boolean
Default: false

Access to annotation is restricted.

training_enabled
boolean
Default: true

Flag signalling whether the annotation should be used in the training of the instant learning component.

{}

Sideloading

The annotations API supports efficient data fetching through sideloading. Add the sideload query parameter to include related objects in the response. This parameter accepts comma-separated list of keywords. The response is then enriched by the requested keys, which contain lists of the sideloaded objects.

GET /annotations?sideload=content,relations,assignees,labels

Available sideload options:

  • assignees - Users assigned to the annotation
  • automation_blockers - Automation blockers associated with the annotation
  • confirmed_bys - Users who confirmed the annotation
  • content - Annotation data (datapoints). Required: Must filter by content.schema_id=<id>
  • creators - Users who created the annotation
  • deleted_bys - Users who deleted the annotation
  • documents - Document details
  • emails - Email objects
  • exported_bys - Users who exported the annotation
  • labels - Applied labels
  • modifiers - Users who last modified the annotation
  • notes - Related notes objects
  • organizations - Organization objects
  • pages - Page objects
  • purged_bys - Users who purged the annotation
  • queues - Queue objects
  • rejected_bys - Users who rejected the annotation
  • related_emails - Related email objects
  • relations - Related annotations (parent/child from splits)
  • child_relations - Child relations for split annotations
  • schemas - Schema objects
  • suggested_edits - Suggested edits for the annotation
  • workflow_runs - Workflow details
  • workspaces - Workspace objects

Sideloaded content can be filtered by schema_id to obtain only a subset of datapoints in content part of response, but is a deprecated feature and will be removed in the future. Filter on content can be specified using query parameter content.schema_id that accepts comma-separated list of required schema_ids.

Example with filtering:

GET /annotations?sideload=content&content.schema_id=123&status=to_review

Query Field Filtering

Filter annotations by specific field values using query parameters:

GET /annotations?queue=<queue_url>&status=to_review&modifier=<user_url>

Common filters:

  • queue - Filter by queue URL
  • status - Filter by status (can specify multiple: status=to_review,reviewing)
  • modifier - Filter by user who last modified
  • document__arrived_at_before / document__arrived_at_after - Date range filtering
  • ordering - Sort results (e.g., -created_at for descending)

Key Relationships

  • Document: Every annotation is linked to exactly one document containing the original file and pages
  • Queue: Defines the workflow, schema, and processing rules for the annotation
  • Schema: Defines the structure and datapoint types for extracted data
  • Content (DataPoints): The actual extracted and validated data values
  • Relations: Links to parent/child annotations (for split documents) or related annotations
  • Assignees: Users assigned to review the annotation
  • Labels: Tags for categorization and filtering

Create annotation

Create an annotation object.

Normally you create annotations via the upload endpoint.

This endpoint could be used for creating annotation instances including their content and with status set to an explicitly requested value. Currently only created is supported which is not touched by the rest of the platform and is not visible via the Rossum UI. This allows for subsequent updates before switching the status to importing so that it is passed through the rest of the upload pipeline.

The use-case for this is the upload.created hook event where new annotations could be created and the platform runtime then switches all such annotations' status to importing.

Authorizations:
BearerAuth
Request Body schema: application/json
required
status
required
string
Value: "created"

Requested annotation status. Only created is currently supported.

document
required
string <uri>

Annotation document.

queue
required
string <uri>

Target queue.

content_data
Array of objects

Array of annotation data content objects.

values
object

Values object as described in the upload endpoint.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

training_enabled
boolean
Default: true

Flag signalling whether the annotation should be used in the training of the instant learning component.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

List annotations

Retrieve all annotation objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
string
Example: id=1,2,3

List of ids separated by a comma.

status
string
Example: status=to_review,reviewing

Annotation status, multiple values may be separated using a comma. See Annotation Lifecycle for available statuses.

modifier
integer

User id.

confirmed_by
integer

User id.

deleted_by
integer

User id.

exported_by
integer

User id.

purged_by
integer

User id.

rejected_by
integer

User id.

assignees
string

User id, multiple values may be separated using a comma.

labels
string

Label id, multiple values may be separated using a comma.

document
integer

The document id.

queue
string

List of queue ids separated by a comma.

queue__workspace
string

List of workspace ids separated by a comma.

relations__parent
integer

ID of parent annotation defined in related Relation object.

relations__type
string

Type of Relation that annotation belongs to.

relations__key
string

Key of Relation that annotation belongs to.

arrived_at_before
string <date-time>

ISO 8601 timestamp (e.g. arrived_at_before=2019-11-15).

arrived_at_after
string <date-time>

ISO 8601 timestamp (e.g. arrived_at_after=2019-11-14).

assigned_at_before
string <date-time>

ISO 8601 timestamp (e.g. assigned_at_before=2019-11-15).

assigned_at_after
string <date-time>

ISO 8601 timestamp (e.g. assigned_at_after=2019-11-14).

confirmed_at_before
string <date-time>

ISO 8601 timestamp (e.g. confirmed_at_before=2019-11-15).

confirmed_at_after
string <date-time>

ISO 8601 timestamp (e.g. confirmed_at_after=2019-11-14).

modified_at_before
string <date-time>

ISO 8601 timestamp (e.g. modified_at_before=2019-11-15).

modified_at_after
string <date-time>

ISO 8601 timestamp (e.g. modified_at_after=2019-11-14).

deleted_at_before
string <date-time>

ISO 8601 timestamp (e.g. deleted_at_before=2019-11-15).

deleted_at_after
string <date-time>

ISO 8601 timestamp (e.g. deleted_at_after=2019-11-14).

exported_at_before
string <date-time>

ISO 8601 timestamp (e.g. exported_at_before=2019-11-14 22:00:00).

exported_at_after
string <date-time>

ISO 8601 timestamp (e.g. exported_at_after=2019-11-14 12:00:00).

export_failed_at_before
string <date-time>

ISO 8601 timestamp (e.g. export_failed_at_before=2019-11-14 22:00:00).

export_failed_at_after
string <date-time>

ISO 8601 timestamp (e.g. export_failed_at_after=2019-11-14 12:00:00).

purged_at_before
string <date-time>

ISO 8601 timestamp (e.g. purged_at_before=2019-11-15).

purged_at_after
string <date-time>

ISO 8601 timestamp (e.g. purged_at_after=2019-11-14).

rejected_at_before
string <date-time>

ISO 8601 timestamp (e.g. rejected_at_before=2019-11-15).

rejected_at_after
string <date-time>

ISO 8601 timestamp (e.g. rejected_at_after=2019-11-14).

restricted_access
boolean

Boolean.

automated
boolean

Boolean.

has_email_thread_with_replies
boolean

Boolean (related email thread contains more than one incoming emails).

has_email_thread_with_new_replies
boolean

Boolean (related email thread contains unread incoming email).

search
string <= 256 characters

If this filter is used, annotations are filtered based on full-text search in annotation's datapoint values, original file name, modifier user email and messages.

Some special characters are ignored in the search term.

The results are limited to 10,000, any annotations over this limit will not be possible to list. We suggest narrowing down the search query if there are this many results.

Please beware that updates of the annotation search data are done asynchronously and are eventually consistent. Search may return inconsistent results temporarily (for a few seconds).

ordering
string
Enum: "document" "-document" "document__arrived_at" "-document__arrived_at" "document__original_file_name" "-document__original_file_name" "modifier" "-modifier" "modifier__username" "-modifier__username" "modified_by" "-modified_by" "modified_by__username" "-modified_by__username" "creator" "-creator" "creator__username" "-creator__username" "queue" "-queue" "status" "-status" "created_at" "-created_at" "assigned_at" "-assigned_at" "confirmed_at" "-confirmed_at" "modified_at" "-modified_at" "exported_at" "-exported_at" "export_failed_at" "-export_failed_at" "purged_at" "-purged_at" "rejected_at" "-rejected_at" "deleted_at" "-deleted_at" "confirmed_by" "-confirmed_by" "deleted_by" "-deleted_by" "exported_by" "-exported_by" "purged_by" "-purged_by" "rejected_by" "-rejected_by" "confirmed_by__username" "-confirmed_by__username" "deleted_by__username" "-deleted_by__username" "exported_by__username" "-exported_by__username" "purged_by__username" "-purged_by__username" "rejected_by__username" "-rejected_by__username"

Result ordering.

fields
string

Comma-separated list of attributes to be included in the response. See the Query Field Filtering section for detailed explanation and available options.

fields!
string

Comma-separated list of attributes to be excluded from the response. See the Query Field Filtering section for detailed explanation and available options.

sideload
string

Comma-separated list of related objects to sideload (e.g., modifiers,documents,content). See the Sideloading section for detailed explanation and available options.

content.schema_id
string

Filter sideloaded content by schema_id (comma-separated list).

Responses

Response samples

Content type
application/json
{}

Retrieve annotation

Get an annotation object.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Responses

Response samples

Content type
application/json
{}

Update annotation

Update annotation object.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
status
string
Enum: "confirmed" "created" "deleted" "exported" "exporting" "failed_export" "failed_import" "importing" "in_workflow" "postponed" "purged" "rejected" "reviewing" "split" "to_review"

Status of the document, see Document Lifecycle for more details.

document
required
string <uri>

Related document.

queue
required
string <uri>

A queue that annotation belongs to.

schema
string <uri>

A schema that defines content shape.

relations
Array of strings <uri> [ items <uri > ]
Deprecated

List of relations that annotation belongs to.

modifier
string or null <uri>

User that last modified the annotation.

rir_poll_id
string

Internal.

Array of objects or null
Default: []

List of messages from the connector (save).

time_spent
number <float>
Default: 0

Total time spent while validating the annotation.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

automated
boolean
Default: false

Whether annotation was automated.

training_enabled
boolean
Default: true

Flag signalling whether the annotation should be used in the training of the instant learning component.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Partial update annotation

Update part of annotation object.

Note: One can be tempted by patching the status of the annotation to the confirmed or exported state. However, patching status skips key annotation metadata updates which negatively affects the Dedicated AI Engine training. Use the confirm endpoint for switching annotation to the confirmed or exported state.

Note: Please be aware that annotation status cannot be manually set to purged. Use the purge deleted endpoint. Also note, that once annotation has purged status, it cannot be changed anymore.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
status
string
Enum: "confirmed" "created" "deleted" "exported" "exporting" "failed_export" "failed_import" "importing" "in_workflow" "postponed" "purged" "rejected" "reviewing" "split" "to_review"

Status of the document, see Document Lifecycle for more details.

document
string <uri>

Related document.

queue
string <uri>

A queue that annotation belongs to.

schema
string <uri>

A schema that defines content shape.

relations
Array of strings <uri> [ items <uri > ]
Deprecated

List of relations that annotation belongs to.

modifier
string or null <uri>

User that last modified the annotation.

rir_poll_id
string

Internal.

Array of objects or null
Default: []

List of messages from the connector (save).

time_spent
number <float>
Default: 0

Total time spent while validating the annotation.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

automated
boolean
Default: false

Whether annotation was automated.

training_enabled
boolean
Default: true

Flag signalling whether the annotation should be used in the training of the instant learning component.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Delete annotation

Delete an annotation object from the database. It also deletes the related page objects.

Never call this internal API, mark the annotation as deleted instead.

Note: The exact behavior of this call is undefined, and it must not be used in production usage; it is meant only for internal or experimental usage. In particular, this call is not an appropriate way to reliably purge annotation data from Rossum systems. Use purge deleted instead.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Approve annotation

Approve annotation, switch its status to exporting or confirmed, or it stays in in_workflow, depending on the evaluation of the current workflow step.

Note: Approving is allowed only for documents in states: in_workflow. See Annotation Lifecycle for more information about states.

Only admin, organization group admin, or an assigned user with approver role can approve annotation in this state. A workflow activity record object will be created.

Note: Talk with a Rossum representative about enabling this feature. Read more about workflows.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
optional
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "status": "confirmed"
}

Assign annotation Beta

Change assignees of the annotation.

Note: admin and organization_group_admin user roles can assign to arbitrary set of users. The rest of the roles can only swap themselves for a different user (without changing the others).

Authorizations:
BearerAuth
Request Body schema: application/json
required
annotations
required
Array of strings <uri> [ items <uri > ]

List of annotations to change the assignees of (currenlty we support only one annotation at a time).

assignees
required
Array of strings <uri> [ items <uri > ]

List of users to be added as annotation assignees.

note_content
string
Default: ""

Content of the note that will be added to the workflow activity of action reassign (only applicable for annotation in in_workflow state).

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Cancel edit pages session

Cancels an edit pages session, stopping review on specified child annotations and optionally the parent.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
optional
annotations
Array of strings <uri> [ items <uri > ]

Child annotations to cancel (stop reviewing). Must be in the reviewing state.

cancel_parent
boolean
Default: true

Whether to also cancel the parent annotation

processing_duration
object (processing_duration)

Optional processing duration object

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Cancel validation

Cancel annotation, switch its status back to to_review or postponed.

Cancel annotation can optionally accept time spent data as described in annotation time spent, for internal use only.

Note: Annotation with the status exporting or exported cannot be cancelled. To send an exported annotation back to any previous status, update the annotation status appropriately instead or enable the confirmed state for the particular queue in your workflow instead.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
optional
processing_duration
object (processing_duration)

Optional processing duration object

Responses

Request samples

Content type
application/json
{
  • "processing_duration": { }
}

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Confirm validation

Confirm annotation, switch status to exported (or exporting). If the confirmed state is enabled, this call moves the annotation to the confirmed status.

Confirm annotation can optionally accept time spent data as described in annotation time spent, for internal use only.

Note: The confirm call is the right choice when confirming correctly captured data and switching the annotations to confirmed or exported state. One can be tempted by patching the status of the annotation to the confirmed or exported state. However, patching status skips key annotation metadata updates which negatively affects the Dedicated AI Engine training.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
optional
skip_workflows
boolean
Default: false

Whether to skip workflows evaluation. Read more about workflows here.

The bypass_workflows_allowed must be set to true in workflows queue settings in order to use this feature.

processing_duration
object (processing_duration)

Optional processing duration object

Responses

Request samples

Content type
application/json
{
  • "skip_workflows": false,
  • "processing_duration": { }
}

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Copy annotation

Make a copy of annotation in another queue. All data and metadata are copied.

If you want to directly reimport the copied annotation, you can use reimport=true query parameter (such annotation will be billed).

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

query Parameters
reimport
boolean
Default: false

Whether to reimport the copied annotation.

Request Body schema: application/json
required
target_queue
required
string <uri>

URL of queue, where the copy should be placed.

target_status
string

The status of copied annotation (if not set, it stays the same).

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json

Create embedded URL

Similar to start embedded annotation endpoint but can be called for annotations with all statuses and does not switch status.

Embedded annotation cannot be started by users with admin or organization group admin roles. We strongly recommend creating embedded URLs by users with annotator_embedded user role and permissions for the given queue only to limit the scope of actions that user is able to perform to required minimum.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
optional
return_url
string <uri> <= 2048 characters

URL to redirect to after annotation is confirmed

cancel_url
string <uri> <= 2048 characters

URL to redirect to when annotation is cancelled

delete_url
string <uri> <= 2048 characters

URL to redirect to when annotation is deleted

postpone_url
string <uri> <= 2048 characters

URL to redirect to when annotation is postponed

max_token_lifetime_s
number <float> [ 0 .. 583200 ]

Duration (in seconds) for which the token will be valid. The default is the queue's session_timeout).

Responses

Request samples

Content type
application/json
{}

Response samples

Edit annotation (legacy split)

Legacy endpoint for splitting annotations. Creates new annotations from the original annotation's pages.

Note: This is a legacy endpoint. For new implementations, use the split endpoint instead, which provides the same functionality with a clearer name.

If used on an annotation in a way that after the editing only one document remains, the original annotation will be edited. If multiple documents are to be created after the call, status of the original annotation is switched to split, status of the newly created annotations is importing and the extraction phase begins over again.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
required
required
Array of objects non-empty

Array of documents to create

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json

Edit pages (split and reorganize)

Edit document pages, split and re-split already split document.

When using this endpoint, status of the original annotation (when not editing existing split) is switched to split, status of the newly created annotations is importing and the extraction phase begins over again.

This endpoint can be used for splitting annotations also from webhook listening to annotation_content.initialize event and action.

Operations:

  • edit: Create new annotations from parent pages with optional rotation and values
  • move: Move existing child annotations to different queues
  • delete: Delete child annotations
  • stop_reviewing: Stop review on child annotations without deleting
Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
optional
Array of objects

Create new annotations from parent pages

Array of objects

Move child annotations to different queues

delete
Array of strings <uri> [ items <uri > ]

Child annotations to delete

stop_reviewing
Array of strings <uri> [ items <uri > ]

Child annotations to stop reviewing. Must be in reviewing state.

stop_parent
boolean
Default: true

Whether to stop reviewing the parent annotation

processing_duration
object (processing_duration)

Optional processing duration object

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json

Edit pages in place

Edits pages of an annotation in place by reordering, rotating, or removing pages without creating new annotations.

Unlike the edit_pages endpoint which creates new child annotations, this endpoint modifies the existing annotation directly.

This endpoint can be used for the embedded mode.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
required
required
Array of objects (edit_page) non-empty

List of parent pages with rotation.

target_queue
string <uri>

Target queue URL

object (edit_metadata)

Metadata will be saved in created/edited annotation/document metadata.

processing_duration
object (processing_duration)

Optional processing duration object

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json

Purge deleted annotations

Start the asynchronous process of purging customer's data related to selected annotations with deleted status. The following operations will happen:

This is an asynchronous endpoint, status of annotations is changed to purged and related objects are gradually being deleted.

At least one of annotations, queue fields must be filled in. The resulting set of annotations is the disjunction of queue and annotations filter.

Authorizations:
BearerAuth
Request Body schema: application/json
required
annotations
Array of strings <uri> [ items <uri > ]

List of annotations to be purged.

queue
string <uri>

Queue of which the annotations should be purged.

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Reject annotation

Reject annotation, switch its status to rejected.

Note: Rejection is allowed only for documents in states: to_review, reviewing, postponed, in_workflow. See Document Lifecycle for more information about states.

Reject annotation can optionally accept time spent data as described in the annotation time spent, for internal use only.

If rejecting in in_workflow state, the annotation.workflow_run.workflow_status will also be set to rejected and a workflow activity record object will be created. Only admin, organization group admin, or an assigned user can approve annotation in this state.

Note: Talk with a Rossum representative about enabling this feature. Read more about workflows here.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
optional
note_content
string
Default: ""

Rejection note.

automatically_rejected
boolean
Default: false

For internal use only (designates whether annotation is displayed as automatically rejected) in the statistics.

processing_duration
object (processing_duration)

Optional processing duration object

Responses

Request samples

Content type
application/json
{
  • "note_content": "",
  • "automatically_rejected": false,
  • "processing_duration": { }
}

Response samples

Content type
application/json
{}

Retrieve annotation time spent

Time spent information can be optionally passed along the following annotation endpoints: cancel, confirm, delete, edit, postpone, reject.

Warning: This functionality is intended for internal use only. The API may change in the future without any notice.

See annotation processing duration object for details.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
optional
object

Processing duration object

Responses

Request samples

Content type
application/json
{
  • "processing_duration": {
    • "time_spent_active": 0.1,
    • "time_spent_overall": 0.1,
    • "time_spent_edit": 0.1,
    • "time_spent_blockers": 0.1,
    • "time_spent_emails": 0.1,
    • "time_spent_opening": 0.1
    }
}

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Retrieve page spatial data

Get text content for every page, including position coordinates, considering granularity options like lines, words, characters, or complete page text content.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

query Parameters
page_numbers
string
Example: page_numbers=1,2,3

Comma-separated list of page numbers to retrieve. The default is the first 20 pages of the document. Max. 20 page numbers, if there is more, they are silently ignored.

granularity
required
string
Enum: "words" "lines" "chars" "texts" "barcodes"
Example: granularity=words

Level of text granularity to return

Responses

Response samples

Content type
application/json
{
  • "results": [
    • {
      • "page_number": 1,
      • "granularity": "words",
      • "items": [
        ]
      }
    ]
}

Retrieve suggested email recipients

Retrieves annotations suggested email recipients depending on Queue suggested recipients settings.

Authorizations:
BearerAuth
Request Body schema: application/json
required
annotations
required
Array of strings <uri> [ items <uri > ]

List of annotation URLs.

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{
  • "results": [
    • {
      • "source": "email_header",
      • "email": "user@example.com",
      • "name": "Don Joe"
      }
    ]
}

Rotate annotation

Rotate a document.

Status of the annotation is switched to importing and the extraction phase begins over again. After the new extraction, the value from rotation_deg field is copied to pages rotation field rotation_deg.

Note: The original pages in the annotation are replaced by new pages after the extraction phase is done.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
required
rotation_deg
required
integer
Enum: 0 90 180 270

States degrees by which the document shall be rotated.

Responses

Request samples

Content type
application/json
{
  • "rotation_deg": 0
}

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Search text

Search for a phrase in the document.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

query Parameters
phrase
required
string

A phrase to search for.

tolerance
integer

Allowed Edit distance from the search phrase (number of removal, insertion or substitution operations that need to be performed for strings to match). Only used for OCR invoices (images, such as png or PDF with scanned images). Default value is computed as length(phrase)/4.

Responses

Response samples

Content type
application/json
{
  • "results": [
    • {
      • "rectangle": [
        ],
      • "page": 1
      }
    ]
}

Split annotation

Splits an annotation into multiple separate annotations by reorganizing and possibly also rotating its pages. Each resulting annotation will have its own document with the specified pages.

When using this endpoint, status of the original annotation is switched to split, status of the newly created annotations is importing and the extraction phase begins over again.

This endpoint can be used for splitting annotations also from webhook listening to annotation_content.initialize event and action.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
required
required
Array of objects non-empty

List of documents that should be created from the original annotation.

processing_duration
object (processing_duration)

Optional processing duration object

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json

Start edit pages session

Starts editing the annotation and all its child documents (the documents into which the original document was split). The parent annotation must be in the to_review, split or reviewing state (for the calling user). This call will "lock" the parent and child annotations from being edited.

It returns some basic information about the parent annotation and a list of its children. Children to which the current user does not have rights contains only limited information.

If the parent annotation cannot be "locked", an error is returned. If the child annotation cannot be locked, it is skipped and sent in a response with value started=False.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Responses

Response samples

Content type
application/json
{}

Start validation

Start reviewing annotation by the calling user. Can be called with statuses payload to specify allowed statuses for starting annotation. Returns 409 Conflict if annotation fails to be in one of the specified states.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
optional
statuses
Array of strings
Default: ["to_review","reviewing","postponed","confirmed"]

List of allowed states for the starting annotation to be in.

Responses

Request samples

Content type
application/json
{
  • "statuses": [
    • "to_review",
    • "reviewing",
    • "postponed",
    • "confirmed"
    ]
}

Response samples

Content type
application/json
{}

Start validation for embedded use

Start embedded annotation.

Embedded annotation cannot be started by users with admin or organization group admin roles. We strongly recommend starting embedded annotations by users with annotator_embedded user role and permissions for the given queue only to limit the scope of actions that user is able to perform to required minimum.

Returns object with url that specifies URL to be used in the browser iframe/popup window. URL includes a token that is valid for this document only for a limited period of time.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
optional
return_url
string <uri> <= 2048 characters

URL to redirect to after annotation is confirmed

cancel_url
string <uri> <= 2048 characters

URL to redirect to when annotation is cancelled

delete_url
string <uri> <= 2048 characters

URL to redirect to when annotation is deleted

postpone_url
string <uri> <= 2048 characters

URL to redirect to when annotation is postponed

max_token_lifetime_s
number <float> [ 0 .. 604800 ]

Duration (in seconds) for which the token will be valid. Default is the queue's session_timeout.

Responses

Request samples

Content type
application/json
{}

Response samples

Switch to deleted

Switch annotation status to deleted. Annotation with status deleted is still available in Rossum UI.

Delete annotation can optionally accept time spent data as described in annotation time spent, for internal use only.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
optional
processing_duration
object (processing_duration)

Optional processing duration object

Responses

Request samples

Content type
application/json
{
  • "processing_duration": { }
}

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Switch to postponed

Switch annotation status to postpone.

Postpone annotation can optionally accept time spent data as described in the annotation time spent, for internal use only.

Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
optional
processing_duration
object (processing_duration)

Optional processing duration object

Responses

Request samples

Content type
application/json
{
  • "processing_duration": { }
}

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Translate page spatial data Beta

Get translation for all lines on a page, including position coordinates. Source language of the page is automatically detected. Translated text of a page in a particular language is cached for 60 days.

Requirements:

  • Document translations feature must be enabled for the organization
  • User must have translate permissions
  • Page must have OCR data available

Supported languages:

Key Description
af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
zh Chinese (Simplified)
zh-TW Chinese (Traditional)
hr Croatian
cs Czech
da Danish
fa-AF Dari
nl Dutch
en English
et Estonian
fa Farsi (Persian)
tl Filipino, Tagalog
fi Finnish
fr French
fr-CA French (Canada)
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
he Hebrew
hi Hindi
hu Hungarian
is Icelandic
id Indonesian
ga Irish
it Italian
ja Japanese
kn Kannada
kk Kazakh
ko Korean
lv Latvian
lt Lithuanian
mk Macedonian
ms Malay
ml Malayalam
mt Maltese
mr Marathi
mn Mongolian
no Norwegian (Bokmål)
ps Pashto
pl Polish
pt Portuguese (Brazil)
pt-PT Portuguese (Portugal)
pa Punjabi
ro Romanian
ru Russian
sr Serbian
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
es-MX Spanish (Mexico)
sw Swahili
sv Swedish
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
Authorizations:
BearerAuth
path Parameters
annotationId
required
integer

A unique integer value identifying the annotation.

Request Body schema: application/json
required
page_numbers
required
Array of integers = 1 items [ items >= 1 ]

Single page number to translate (currently only one page at a time is supported)

target_language
required
string [ 2 .. 5 ] characters
Enum: "af" "sq" "am" "ar" "hy" "az" "bn" "bs" "bg" "ca" "zh" "zh-TW" "hr" "cs" "da" "fa-AF" "nl" "en" "et" "fa" "tl" "fi" "fr" "fr-CA" "ka" "de" "el" "gu" "ht" "ha" "he" "hi" "hu" "is" "id" "ga" "it" "ja" "kn" "kk" "ko" "lv" "lt" "mk" "ms" "ml" "mt" "mr" "mn" "no" "ps" "pl" "pt" "pt-PT" "pa" "ro" "ru" "sr" "si" "sk" "sl" "so" "es" "es-MX" "sw" "sv" "ta" "te" "th" "tr" "uk" "ur" "uz" "vi" "cy"

Target language code. Either ISO 639-1 format or a combination of ISO 639-1 two-digit language code followed by an underscore followed by an ISO 3166 2-digit country code.

granularity
required
string
Value: "lines"

Level of text granularity

Responses

Request samples

Content type
application/json
{
  • "page_numbers": [
    • 1
    ],
  • "target_language": "es",
  • "granularity": "lines"
}

Response samples

Content type
application/json
{
  • "results": [
    • {
      • "page_number": 1,
      • "granularity": "lines",
      • "items": [
        ]
      }
    ]
}

Audit Logs

Audit log represents a log record of actions performed by users.

Only admin or organization group admins can access the log records. Logs do not include records about changes made by Rossum representatives via internal systems. The log retention policy is set to 1 year.

Note: Talk with a Rossum representative about enabling this feature.

Audit Log object

organization_id
integer

ID of the organization

timestamp
string <date-time>

Timestamp of the log record.

username
string

Username of the user that performed the action

object_id
integer

ID of the object on which the action was performed

object_type
string
Enum: "document" "annotation" "user"

Type of the object on which the action was performed

action
string

Type of the action performed.

Each object_type has different actions available.

object_type Available actions
document create
annotation update-status
user create, delete, purge, update, destroy, app_load, reset-password, change-password

Note: app_load value represents records of when api/v1/auth/user endpoint was called.

object (content)
{
  • "organization_id": 406,
  • "timestamp": "2024-07-01T07:00:00.000000Z",
  • "username": "john.doe@example.com",
  • "object_id": 131,
  • "object_type": "user",
  • "action": "update",
  • "content": {
    • "path": "api/v1/users/131",
    • "method": "PATCH",
    • "request_id": "0aadfd75-8dcz-4e62-94d9-a23811d0d0b0",
    • "status_code": 200,
    • "details": {
      • "payload": {
        }
      }
    }
}

List audit logs

List audit log records for chosen objects and actions.

Only admin or organization group admins can access the log records.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

object_type
required
string
Enum: "document" "annotation" "user"

Type of the object on which the action was performed. Available types are document, annotation, user

action
string
Example: action=change_password

Type of the action performed.

Each object_type supports filtering by different actions:

object_type Available actions
document create
annotation update-status
user create, delete, purge, update, destroy, app_load, reset-password, change-password

Note: app_load value represents records of when api/v1/auth/user endpoint was called.

object_id
integer <int64>

ID of the object on which the action was performed

timestamp_before
string <date-time>

Filter for log entries before the given timestamp

timestamp_after
string <date-time>

Filter for log entries after the given timestamp

username
string

Username of the user that performed the action

Responses

Response samples

Content type
application/json
{
  • "pagination": {
    • "total": 1,
    • "total_pages": 1,
    • "next": null,
    • "previous": null
    },
  • "results": [
    • {
      • "organization_id": 406,
      • "timestamp": "2024-07-01T07:00:00.000000Z",
      • "username": "john.doe@example.com",
      • "object_id": 131,
      • "object_type": "user",
      • "action": "update",
      • "content": {
        }
      }
    ]
}

Automation Blockers

Automation blocker stores reason why annotation was not automated.

Automation blocker types

  • automation_disabled
  • is_duplicate
    • annotation is a duplicate of another one (there exists a relation of duplicate type) and automate_duplicate queue settings is set to false
    • level: annotation only
  • suggested_edit_present
  • low_score
  • failed_checks
    • schema field constraint or connector validation failed
    • only for level: datapoint
  • no_validation_sources
    • validation source list was reset e.g. by hook, so automation was blocked
    • only for level: datapoint
  • error_message
    • for both levels, annotation and datapoint
    • error type messages received from connector
  • Delete recommendation based on validation trigger match for the document
    • delete_recommendation_filename, delete_recommendation_page_count
      • level: annotation only
      • deletion was recommended based on filename/page count condition of the trigger
    • delete_recommendation_field
      • only for level: datapoint
      • deletion recommended based on a value of given field (defined in the condition of trigger)
  • extension
    • automation blocker created by an extension
    • for both levels - annotation and datapoint
  • human_confirmation_required
    • Annotation was randomly marked for human confirmation
    • level: annotation

Automation Blocker object

id
integer

AutomationBlocker object ID

url
string <uri>

AutomationBlocker object URL

annotation
string <uri>

URL of related Annotation object

Array of objects

List of reasons why automation is blocked

{
  • "id": 1,
  • "content": [
    • {
      • "level": "datapoint",
      • "type": "low_score",
      • "schema_id": "invoice_id",
      • "samples_truncated": false,
      • "samples": [
        ]
      },
    • {
      • "level": "datapoint",
      • "type": "failed_checks",
      • "schema_id": "schema_id",
      • "samples_truncated": false,
      • "samples": [
        ]
      },
    • {
      • "level": "datapoint",
      • "type": "no_validation_sources",
      • "schema_id": "schema_id",
      • "samples_truncated": false,
      • "samples": [
        ]
      },
    • {
      • "level": "annotation",
      • "type": "error_message",
      • "details": {
        }
      },
    • {
      • "level": "datapoint",
      • "type": "error_message",
      • "schema_id": "schema_id",
      • "samples_truncated": false,
      • "samples": [
        ]
      },
    • {
      • "level": "annotation",
      • "type": "delete_recommendation_filename",
      • "details": {
        }
      },
    • {
      • "level": "datapoint",
      • "type": "delete_recommendation_field",
      • "schema_id": "document_type",
      • "samples_truncated": false,
      • "samples": [
        ]
      },
    • {
      • "level": "annotation",
      • "type": "extension",
      • "details": {
        }
      },
    • {
      • "level": "datapoint",
      • "type": "extension",
      • "schema_id": "sender_name",
      • "samples_truncated": false,
      • "samples": [
        ]
      }
    ]
}

List automation blockers

List all automation blocker objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

annotation
integer <int64>

ID of an annotation to filter automation blockers by

ordering
string
Enum: "id" "-id"

Result ordering.

Responses

Response samples

Content type
application/json
{
  • "pagination": {
    • "total": 1,
    • "total_pages": 1,
    • "next": null,
    • "previous": null
    },
  • "results": [
    • {
      • "id": 1,
      • "content": [
        ]
      }
    ]
}

Retrieve automation blocker

Retrieve a specific automation blocker object.

Authorizations:
BearerAuth
path Parameters
id
required
integer <int64>

A unique integer value identifying this automation blocker.

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "content": [
    • {
      • "level": "datapoint",
      • "type": "low_score",
      • "schema_id": "invoice_id",
      • "samples_truncated": false,
      • "samples": [
        ]
      },
    • {
      • "level": "datapoint",
      • "type": "failed_checks",
      • "schema_id": "schema_id",
      • "samples_truncated": false,
      • "samples": [
        ]
      },
    • {
      • "level": "datapoint",
      • "type": "no_validation_sources",
      • "schema_id": "schema_id",
      • "samples_truncated": false,
      • "samples": [
        ]
      },
    • {
      • "level": "annotation",
      • "type": "error_message",
      • "details": {
        }
      },
    • {
      • "level": "datapoint",
      • "type": "error_message",
      • "schema_id": "schema_id",
      • "samples_truncated": false,
      • "samples": [
        ]
      },
    • {
      • "level": "annotation",
      • "type": "delete_recommendation_filename",
      • "details": {
        }
      },
    • {
      • "level": "datapoint",
      • "type": "delete_recommendation_field",
      • "schema_id": "document_type",
      • "samples_truncated": false,
      • "samples": [
        ]
      },
    • {
      • "level": "annotation",
      • "type": "extension",
      • "details": {
        }
      },
    • {
      • "level": "datapoint",
      • "type": "extension",
      • "schema_id": "sender_name",
      • "samples_truncated": false,
      • "samples": [
        ]
      }
    ]
}

Connectors

A connector is an extension of Rossum that allows to validate and modify data during validation and also export data to an external system. A connector object is used to configure external or internal endpoint of such an extension service. For more information see Extensions.

Connector object

id
integer

Id of the connector

name
string

Name of the connector (not visible in UI)

url
string <uri>

URL of the connector

queues
Array of strings <uri> [ items <uri > ]

List of queues that use connector object

service_url
string <uri>

URL of the connector endpoint

params
string or null

Query params appended to the service_url

client_ssl_certificate
string or null

Client SSL certificate used to authenticate requests. Must be PEM encoded.

client_ssl_key
string or null

Client SSL key (write only). Must be PEM encoded. Key may not be encrypted.

authorization_type
string
Default: "secret_key"
Enum: "secret_key" "Basic"

String sent in HTTP header Authorization could be set to secret_key or Basic. For details see Connector API.

authorization_token
string

Token sent to connector in Authorization header to ensure connector was contacted by Rossum (displayed only to admin user).

asynchronous
boolean
Default: true

Affects exporting: when true, confirm endpoint returns immediately and connector's save endpoint is called asynchronously later on.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

modified_by
string or null <uri> (modified_by)

URL of the last modifier.

modified_at
string or null <date-time> (modified_at)

Date of the last modification.

{}

Create connector

Create a new connector object.

Authorizations:
BearerAuth
Request Body schema: application/json
name
required
string

Name of the connector (not visible in UI)

queues
Array of strings <uri> [ items <uri > ]

List of queues that use connector object

service_url
required
string <uri>

URL of the connector endpoint

params
string or null

Query params appended to the service_url

client_ssl_certificate
string or null

Client SSL certificate used to authenticate requests. Must be PEM encoded.

client_ssl_key
string or null

Client SSL key (write only). Must be PEM encoded. Key may not be encrypted.

authorization_type
string
Default: "secret_key"
Enum: "secret_key" "Basic"

String sent in HTTP header Authorization could be set to secret_key or Basic. For details see Connector API.

authorization_token
string

Token sent to connector in Authorization header to ensure connector was contacted by Rossum (displayed only to admin user).

asynchronous
boolean
Default: true

Affects exporting: when true, confirm endpoint returns immediately and connector's save endpoint is called asynchronously later on.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

Responses

Request samples

Content type
application/json
{
  • "name": "MyQ Connector",
  • "params": "strict=true",
  • "client_ssl_certificate": "-----BEGIN CERTIFICATE-----\n...",
  • "client_ssl_key": "string",
  • "authorization_type": "secret_key",
  • "authorization_token": "wuNg0OenyaeK4eenOovi7aiF",
  • "asynchronous": true,
  • "metadata": {
    • "some_key": "some_value"
    }
}

Response samples

Content type
application/json
{}

List connectors

Retrieve all connector objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

name
string

Name of the connector filter

service_url
string <uri>

Service URL of the connector filter

ordering
string
Enum: "id" "-id" "name" "-name" "service_url" "-service_url"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve connector

Get a connector object.

Authorizations:
BearerAuth
path Parameters
connectorId
required
integer <int64>

A unique integer value identifying this connector.

Responses

Response samples

Content type
application/json
{}

Update connector

Update connector object.

Authorizations:
BearerAuth
path Parameters
connectorId
required
integer <int64>

A unique integer value identifying this connector.

Request Body schema: application/json
name
required
string

Name of the connector (not visible in UI)

queues
Array of strings <uri> [ items <uri > ]

List of queues that use connector object

service_url
required
string <uri>

URL of the connector endpoint

params
string or null

Query params appended to the service_url

client_ssl_certificate
string or null

Client SSL certificate used to authenticate requests. Must be PEM encoded.

client_ssl_key
string or null

Client SSL key (write only). Must be PEM encoded. Key may not be encrypted.

authorization_type
string
Default: "secret_key"
Enum: "secret_key" "Basic"

String sent in HTTP header Authorization could be set to secret_key or Basic. For details see Connector API.

authorization_token
string

Token sent to connector in Authorization header to ensure connector was contacted by Rossum (displayed only to admin user).

asynchronous
boolean
Default: true

Affects exporting: when true, confirm endpoint returns immediately and connector's save endpoint is called asynchronously later on.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

Responses

Request samples

Content type
application/json
{
  • "name": "MyQ Connector",
  • "params": "strict=true",
  • "client_ssl_certificate": "-----BEGIN CERTIFICATE-----\n...",
  • "client_ssl_key": "string",
  • "authorization_type": "secret_key",
  • "authorization_token": "wuNg0OenyaeK4eenOovi7aiF",
  • "asynchronous": true,
  • "metadata": {
    • "some_key": "some_value"
    }
}

Response samples

Content type
application/json
{}

Partial update connector

Update part of connector object.

Authorizations:
BearerAuth
path Parameters
connectorId
required
integer <int64>

A unique integer value identifying this connector.

Request Body schema: application/json
name
string

Name of the connector (not visible in UI)

queues
Array of strings <uri> [ items <uri > ]

List of queues that use connector object

service_url
string <uri>

URL of the connector endpoint

params
string or null

Query params appended to the service_url

client_ssl_certificate
string or null

Client SSL certificate used to authenticate requests. Must be PEM encoded.

client_ssl_key
string or null

Client SSL key (write only). Must be PEM encoded. Key may not be encrypted.

authorization_type
string
Default: "secret_key"
Enum: "secret_key" "Basic"

String sent in HTTP header Authorization could be set to secret_key or Basic. For details see Connector API.

authorization_token
string

Token sent to connector in Authorization header to ensure connector was contacted by Rossum (displayed only to admin user).

asynchronous
boolean
Default: true

Affects exporting: when true, confirm endpoint returns immediately and connector's save endpoint is called asynchronously later on.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

Responses

Request samples

Content type
application/json
{
  • "name": "MyQ Connector",
  • "params": "strict=true",
  • "client_ssl_certificate": "-----BEGIN CERTIFICATE-----\n...",
  • "client_ssl_key": "string",
  • "authorization_type": "secret_key",
  • "authorization_token": "wuNg0OenyaeK4eenOovi7aiF",
  • "asynchronous": true,
  • "metadata": {
    • "some_key": "some_value"
    }
}

Response samples

Content type
application/json
{}

Delete connector

Delete connector object.

Authorizations:
BearerAuth
path Parameters
connectorId
required
integer <int64>

A unique integer value identifying this connector.

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Dedicated Engine Schemas

Dedicated Engine Schema object

id
integer

Id of the engine schema.

url
string <uri>

URL of the engine schema.

object (content-2)
{}

Create dedicated engine schema

Create a new dedicated engine schema object.

Please note that Dedicated Engine Schema is an internal API and can be changed without notice.

Authorizations:
BearerAuth
Request Body schema: application/json
required
object (content-2)

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

List dedicated engine schemas

Retrieve all dedicated engine schema objects.

Please note that Dedicated Engine Schema is an internal API and can be changed without notice.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

ordering
string
Enum: "id" "-id"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve dedicated engine schema

Get a dedicated engine schema object.

Please note that Dedicated Engine Schema is an internal API and can be changed without notice.

Authorizations:
BearerAuth
path Parameters
dedicatedEngineSchemaId
required
integer

A unique integer value identifying this dedicated engine schema.

Responses

Response samples

Content type
application/json
{}

Update dedicated engine schema

Update dedicated engine schema object.

Please note that Dedicated Engine Schema is an internal API and can be changed without notice.

Authorizations:
BearerAuth
path Parameters
dedicatedEngineSchemaId
required
integer

A unique integer value identifying this dedicated engine schema.

Request Body schema: application/json
required
object (content-2)

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Partial update dedicated engine schema

Update part of a dedicated engine schema object.

Please note that Dedicated Engine Schema is an internal API and can be changed without notice.

Authorizations:
BearerAuth
path Parameters
dedicatedEngineSchemaId
required
integer

A unique integer value identifying this dedicated engine schema.

Request Body schema: application/json
object (content-2)

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Delete dedicated engine schema

Delete a dedicated engine schema object.

Please note that Dedicated Engine Schema is an internal API and can be changed without notice.

Authorizations:
BearerAuth
path Parameters
dedicatedEngineSchemaId
required
integer

A unique integer value identifying this dedicated engine schema.

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Predict dedicated engine schema

Try to predict a dedicated engine schema based on the provided training queue's schemas. The predicted schema is not guaranteed to pass /v1/dedicated_engine_schemas/validate check, only the checks done on engine schema save.

Returns 200 and predicted dedicated engine schema.

Please note that Dedicated Engine Schema is an internal API and can be changed without notice.

Authorizations:
BearerAuth
Request Body schema: application/json
training_queues
required
Array of strings <uri> [ items <uri > ]

List of Queues that will be used for the training.

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{}

Validate dedicated engine schema

Validate dedicated engine schema object, check for errors. Additionally, to the basic checks done by the CRUD endpoints, this endpoint checks that:

  • The declared engine_output_ids are unique across the whole schema
  • The mapped Queue datapoints (via schema_ids) are of the same type as the declared type
  • The mapped Queue datapoints of enum type have exactly the same option values declared
  • Different shapes of datapoints are not mixed together
  • The mapped Queue datapoints of Multivalue-Tuple fields are of the same grid/freeform type
  • When mapping to a single Multivalue-Tuple field, all the datapoints mapped from one Queue must come from a single tabular datapoint
  • Multiple fields do not link to the same Queue Datapoint
  • A mapped field either maps a Queue Datapoint with null/empty rir_field_names or the engine_output_id matches one of the mapped rir-namespaced rir_field_names (prefixed by rir: or nothing)

Returns 200 and error description in case of validation failure.

Please note that Dedicated Engine Schema is an internal API and can be changed without notice.

Authorizations:
BearerAuth
Request Body schema: application/json
required
object (content-2)

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{ }

Dedicated Engines

A Dedicated Engine object holds specification and a current state of training setup for a Dedicated Engine.

Important Notes:

  • Dedicated Engine is an internal API and can be changed without notice
  • Talk with a Rossum representative about enabling this feature
  • You can create new Dedicated Engine objects, but no Dedicated Engine will be trained unless Dedicated Engines are part of your contract.

Dedicated Engine object

id
integer <int64>

ID of the engine

name
string

Name of the engine

description
string

Description of the engine

url
string <url>

URL of the engine

status
string
Default: "draft"
Enum: "draft" "schema_review" "annotating_initial" "annotating_review" "annotating_training" "training_started" "training_finished" "retraining" "sample_review"

Current status of the engine. If status is not draft, the whole engine and its schema become read-only.

schema
string or null <url>

Related dedicated engine schema URL

queues
Array of strings <url> [ items <url > ]

List of queues using this dedicated engine

{}

Create dedicated engine

Create a new dedicated engine object.

Note: Talk with a Rossum representative about enabling this feature. You can create new Dedicated Engine objects. However, no Dedicated Engine will be trained unless Dedicated Engines are part of your agreement.

Authorizations:
BearerAuth
Request Body schema: application/json
required
name
required
string

Name of the engine

description
string

Description of the engine

schema
string or null <url>

Related dedicated engine schema URL

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

List dedicated engines

Retrieve all dedicated engine objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

ordering
string
Enum: "id" "-id" "name" "-name" "status" "-status"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve dedicated engine

Get a dedicated engine object.

Authorizations:
BearerAuth
path Parameters
dedicatedEngineId
required
integer <int64>
Example: 3000

ID of the dedicated engine

Responses

Response samples

Content type
application/json
{}

Update dedicated engine

Update dedicated engine object.

Note: If status is not draft, the whole engine and its schema become read-only.

Authorizations:
BearerAuth
path Parameters
dedicatedEngineId
required
integer <int64>
Example: 3000

ID of the dedicated engine

Request Body schema: application/json
required
name
required
string

Name of the engine

description
string

Description of the engine

schema
string or null <url>

Related dedicated engine schema URL

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Partial update dedicated engine

Update part of a dedicated engine object.

Note: If status is not draft, the whole engine and its schema become read-only.

Authorizations:
BearerAuth
path Parameters
dedicatedEngineId
required
integer <int64>
Example: 3000

ID of the dedicated engine

Request Body schema: application/json
required
name
string

Name of the engine

description
string

Description of the engine

schema
string or null <url>

Related dedicated engine schema URL

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Delete dedicated engine

Delete dedicated engine object.

Authorizations:
BearerAuth
path Parameters
dedicatedEngineId
required
integer <int64>
Example: 3000

ID of the dedicated engine

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Request dedicated engine

Request training of a new Dedicated Engine using a form (multipart/form-data).

Note: Talk with a Rossum representative about enabling this feature. You can create new Dedicated Engine objects. However, no Dedicated Engine will be trained unless Dedicated Engines are part of your agreement.

Authorizations:
BearerAuth
Request Body schema: multipart/form-data
required
document_type
required
string

Type of the document the engine should predict

document_language
required
string

Language of the documents

volume
required
integer

Estimated volume per year

sample_uploads
Array of strings <binary> [ items <binary > ]

Multiple sample files of the documents

Responses

Response samples

Content type
application/json
{}

Delete Recommendations

A Delete-recommendation is an object that binds together triggers that fire when a document meets a queue's criteria for a deletion recommendation. Currently, only binding to a single trigger is supported. The trigger bound to a Delete Recommendation must belong to the same queue.

Note: Only administrators are allowed to view or manipulate delete-recommendation objects.

Delete Recommendation object

id
integer

Id of the delete recommendation

enabled
boolean

Whether the associated triggers' rules should be active

url
string <uri>

URL of the delete recommendation

organization
string <uri>

URL of the associated organization

queue
string <uri>

URL of the associated queue

triggers
Array of strings <uri> [ items <uri > ]

URLs of the associated triggers

Create delete recommendation

Create a new delete recommendation object.

Authorizations:
BearerAuth
Request Body schema: application/json
enabled
boolean

Whether the associated triggers' rules should be active

queue
required
string <uri>

URL of the associated queue

triggers
required
Array of strings <uri> [ items <uri > ]

URLs of the associated triggers

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json

List delete recommendations

Retrieve all delete recommendations objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

queue
integer <int64>

Filter only delete recommendations associated with given queue id (or multiple ids)

ordering
string
Enum: "id" "-id" "queue" "-queue"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve delete recommendation

Get a delete recommendation object.

Authorizations:
BearerAuth
path Parameters
deleteRecommendationId
required
integer <int64>

ID of the delete recommendation

Responses

Response samples

Content type
application/json

Update delete recommendation

Update a delete recommendation object.

Authorizations:
BearerAuth
path Parameters
deleteRecommendationId
required
integer <int64>

ID of the delete recommendation

Request Body schema: application/json
enabled
boolean

Whether the associated triggers' rules should be active

queue
required
string <uri>

URL of the associated queue

triggers
required
Array of strings <uri> [ items <uri > ]

URLs of the associated triggers

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json

Partial update delete recommendation

Update a part of a delete recommendation object.

Authorizations:
BearerAuth
path Parameters
deleteRecommendationId
required
integer <int64>

ID of the delete recommendation

Request Body schema: application/json
enabled
boolean

Whether the associated triggers' rules should be active

queue
string <uri>

URL of the associated queue

triggers
Array of strings <uri> [ items <uri > ]

URLs of the associated triggers

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json

Delete delete recommendation

Remove a delete recommendation object.

Authorizations:
BearerAuth
path Parameters
deleteRecommendationId
required
integer <int64>

ID of the delete recommendation

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Document Relations

A document relation object introduces additional relations between annotations and documents. An annotation can be related to one or more documents and it may belong to several such relations of different types at the same time. These are additional to the main relation between the annotation and the document from which it was created, see annotation.

Document Relation object

id
integer

Id of the document relation

type
string
Default: "export"
Enum: "export" "einvoice"

Type of relationship. Possible values:

  • export - Related documents are exports of the annotation data (e.g. in XML or JSON formats).
  • einvoice - Related documents were created during import of an einvoice (e.g. validation report, visualisation, ...)
key
string or null

Key used to distinguish several relationships of the same type. Note: The combination of type, key and annotation attribute values must be unique.

annotation
string <uri>

Annotation

documents
Array of strings <uri> [ items <uri > ]

List of related documents

url
string <uri>

URL of the relation

Create document relation Beta

Create a new document relation object.

Authorizations:
BearerAuth
Request Body schema: application/json
type
required
string
Default: "export"
Enum: "export" "einvoice"

Type of relationship. Possible values:

  • export - Related documents are exports of the annotation data (e.g. in XML or JSON formats).
  • einvoice - Related documents were created during import of an einvoice (e.g. validation report, visualisation, ...)
key
string or null

Key used to distinguish several relationships of the same type. Note: The combination of type, key and annotation attribute values must be unique.

annotation
required
string <uri>

Annotation

documents
Array of strings <uri> [ items <uri > ]

List of related documents

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json

List document relations Beta

Retrieve all document relation objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

type
string
Enum: "export" "einvoice"

Relation type. Multiple values may be separated using a comma.

annotation
integer <int64>

ID of annotation. Multiple values may be separated using a comma.

key
string

Document relation key

documents
integer <int64>

ID of related document. Multiple values may be separated using a comma.

ordering
string
Enum: "id" "-id" "type" "-type" "annotation" "-annotation"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve document relation Beta

Get a document relation object.

Authorizations:
BearerAuth
path Parameters
documentRelationId
required
integer <int64>

Document relation ID

Responses

Response samples

Content type
application/json

Update document relation Beta

Update document relation object.

Authorizations:
BearerAuth
path Parameters
documentRelationId
required
integer <int64>

Document relation ID

Request Body schema: application/json
type
required
string
Default: "export"
Enum: "export" "einvoice"

Type of relationship. Possible values:

  • export - Related documents are exports of the annotation data (e.g. in XML or JSON formats).
  • einvoice - Related documents were created during import of an einvoice (e.g. validation report, visualisation, ...)
key
string or null

Key used to distinguish several relationships of the same type. Note: The combination of type, key and annotation attribute values must be unique.

annotation
required
string <uri>

Annotation

documents
Array of strings <uri> [ items <uri > ]

List of related documents

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json

Partial update document relation Beta

Update part of a document relation object.

Authorizations:
BearerAuth
path Parameters
documentRelationId
required
integer <int64>

Document relation ID

Request Body schema: application/json
type
string
Default: "export"
Enum: "export" "einvoice"

Type of relationship. Possible values:

  • export - Related documents are exports of the annotation data (e.g. in XML or JSON formats).
  • einvoice - Related documents were created during import of an einvoice (e.g. validation report, visualisation, ...)
key
string or null

Key used to distinguish several relationships of the same type. Note: The combination of type, key and annotation attribute values must be unique.

annotation
string <uri>

Annotation

documents
Array of strings <uri> [ items <uri > ]

List of related documents

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json

Delete document relation Beta

Delete a document relation object with empty related documents. If some documents still participate in the relation, the caller must first delete those documents or update the document relation before deleting it.

Authorizations:
BearerAuth
path Parameters
documentRelationId
required
integer <int64>

Document relation ID

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Documents

A document object contains information about one input file. To create it, one can:

  • Use upload endpoint
  • import document by email
  • create document via API

Document object

id
integer <int64>

ID of the document

url
string <url>

URL of the document

s3_name
string

Internal

parent
string <url>

URL of the parent document (e.g. the zip file it was extracted from)

email
string <url>

URL of the email object that document was imported by (only for document imported by email).

annotations
Array of strings <url> [ items <url > ]

List of annotations related to the document. Usually there is only one annotation.

mime_type
string

MIME type of the document (e.g. application/pdf)

creator
string <url>

User that created the annotation.

created_at
string <date-time>

Timestamp of document upload or incoming email attachment extraction.

arrived_at
string <date-time>
Deprecated

See created_at

original_file_name
string

File name of the attachment or upload.

content
string <url>

Link to the document's raw content (e.g. PDF file). May be null if there is no file associated.

attachment_status
string or null (document_attachment_status)
Enum: null "filtered_by_inbox_resolution" "filtered_by_inbox_size" "filtered_by_inbox_mime_type" "filtered_by_inbox_file_name" "filtered_by_hook_custom" "filtered_by_queue_mime_type" "hook_additional_file" "filtered_by_insecure_mime_type" "extracted_archive" "failed_to_extract" "processed" "password_protected_archive" "broken_image"

Reason why the Document got filtered out on Email ingestion.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

{}

Create document

Create a new document object.

Use this API call to create a document without an annotation. Suitable for creating documents for mime types that cannot be extracted by Rossum. Only one document can be created per request.

The supported mime types are the same as for document import.

Authorizations:
BearerAuth
Request Body schema:
content
required
string <binary>

The file to be uploaded.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

parent
string <url>

URL of the parent document (e.g. the original file based on which the uploaded content was created)

Responses

Request samples

curl -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
-F content=@document.pdf \
-F metadata='{"project":"Market ABC"}' \
-F parent='https://elis.rossum.ai/api/v1/documents/456700' \
'https://elis.rossum.ai/api/v1/documents'

Response samples

Content type
application/json
{}

List documents

Returns paginated response with a list of document objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

email
integer <int64>

ID of an email object

creator
integer <int64>

ID of user that created the object filter

created_at_before
string <date-time>

Created before filter.

created_at_after
string <date-time>

Created after filter.

arrived_at_before
string <date-time>
Deprecated

Same as created_at_before.

arrived_at_after
string <date-time>
Deprecated

Same as created_at_after.

original_file_name
string

Name of the document filter

attachment_status
string or null (document_attachment_status)
Enum: null "filtered_by_inbox_resolution" "filtered_by_inbox_size" "filtered_by_inbox_mime_type" "filtered_by_inbox_file_name" "filtered_by_hook_custom" "filtered_by_queue_mime_type" "hook_additional_file" "filtered_by_insecure_mime_type" "extracted_archive" "failed_to_extract" "processed" "password_protected_archive" "broken_image"
Example: attachment_status=processed

Attachment status filter

parent
integer <int64>

ID of parent document filter

ordering
string
Enum: "id" "-id" "arrived_at" "-arrived_at" "created_at" "-created_at" "original_file_name" "-original_file_name" "mime_type" "-mime_type" "attachment_status" "-attachment_status"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve document

Get a document object.

Authorizations:
BearerAuth
path Parameters
documentId
required
integer <int64>

Document ID

Responses

Response samples

Content type
application/json
{}

Partial update document

Update part of a document object.

Authorizations:
BearerAuth
path Parameters
documentId
required
integer <int64>

Document ID

Request Body schema: application/json
metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

Responses

Request samples

Content type
application/json
{
  • "metadata": {
    • "some_key": "some_value"
    }
}

Response samples

Content type
application/json
{}

Delete document

Delete document object.

Authorizations:
BearerAuth
path Parameters
documentId
required
integer <int64>

Document ID

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Retrieve document content

Get original document content (e.g. PDF file).

To download multiple documents in one archive, refer to documents download object.

Authorizations:
BearerAuth
path Parameters
documentId
required
integer <int64>

Document ID

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Retrieve original document Deprecated

Get original document content (e.g. PDF file).

Note that this endpoint was intended to access document content, but is now deprecated. Use content endpoint instead.

Authorizations:
BearerAuth
path Parameters
DocumentS3Name
required
string
Example: 272c2f01ae84a4e19a421cb432e490bb

Internal S3 name of the document

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Documents Downloads

Set of endpoints enabling download of multiple documents at once. The workflow of such action is as follows:

  • Create a download object via POST on /documents/downloads. The response of the call will contain a task URL.
  • Call GET on the task URL. Watch the task status to see when the task is ready. result_url of a successful task will contain URL to the download object.
  • Either call GET on the download object to get metadata about the object or call GET on the download object's content endpoint to download the archive directly.

A download object contains information about a downloadable archive in a .zip format.

Documents Download object

id
integer

Id of the download object

url
string <uri>

URL of the download object

file_name
string

Name of the archive to be downloaded.

expires_at
string <date-time>

Timestamp of a guaranteed availability of the download object and its content. Set to the archive creation time plus 2 hours. Expired downloads are being deleted periodically.

content
string or null <uri>

Link to the download's raw content. May be null if there is no archive associated yet.

{}

Create download Beta

Create a new download object.

Authorizations:
BearerAuth
Request Body schema: application/json

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json

Retrieve download Beta

Get a download object.

Authorizations:
BearerAuth
path Parameters
documentsDownloadId
required
integer <int64>

A unique integer value identifying this documents download.

Responses

Response samples

Content type
application/json
{}

Retrieve download content Beta

Get archive with original document files.

Authorizations:
BearerAuth
path Parameters
documentsDownloadId
required
integer <int64>

A unique integer value identifying this documents download.

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Email Templates

An email template object represents templates one can choose from when sending an email from Rossum.

Email Template Types

  • rejection - Template for a rejection email (can be manually created and deleted)
  • rejection_default - Default template for a rejection email
  • email_with_no_processable_attachments - Template for a reply to an email with no attachments
  • custom - Custom email template (can be manually created and deleted)

Every newly created queue triggers a creation of five default email templates with default messages and subjects.

Email templates

Email templates support variable expansion for dynamic content rendering using double curly brackets: {{ variable }}.

Please note that only simple variables are supported. Filters and the . lookup are not. A template such as:

{% if subject %}
The subject is {{ subject }}.
{% endif %}
The message is {{ message }}.

with template settings such as:

{'subject': 'Hello', 'message': 'World'}

will render as:

{% if subject %}
The subject is Hello.
{% endif %}
The message is World.

Email Template object

id
integer

Id of the email template

url
string <uri>

URL of the email template

name
string

Name of the email template

queue
string <uri>

URL of the associated queue

organization
string <uri>

URL of the associated organization

triggers
Array of strings <uri> [ items <uri > ]
Default: []

URLs of the linked triggers

type
string
Default: "custom"
Enum: "rejection" "rejection_default" "email_with_no_processable_attachments" "custom"

Type of the email template. Only templates with types rejection and custom can be manually created and deleted.

  • rejection - Template for a rejection email
  • rejection_default - Default template for a rejection email
  • email_with_no_processable_attachments - Template for a reply to an email with no attachments
  • custom - Custom email template
subject
string
Default: ""

Email subject

message
string
Default: ""

HTML subset of text email section

enabled
boolean
Deprecated
Default: true

(Deprecated) Use automate instead

automate
boolean
Default: true

True if user wants to send email automatically on the action

Array of objects (email_address)
Default: []

List that contains information about recipients. The total number of recipients (to, cc and bcc together) cannot exceed 40.

Array of objects (email_address)
Default: []

List that contains information about recipients of carbon copy. The total number of recipients (to, cc and bcc together) cannot exceed 40.

Array of objects (email_address)
Default: []

List that contains information about recipients of blind carbon copy. The total number of recipients (to, cc and bcc together) cannot exceed 40.

{}

Create email template

Create new email template object.

Authorizations:
BearerAuth
Request Body schema: application/json
name
required
string

Name of the email template

queue
required
string <uri>

URL of the associated queue

triggers
Array of strings <uri> [ items <uri > ]
Default: []

URLs of the linked triggers

type
string
Default: "custom"
Enum: "rejection" "rejection_default" "email_with_no_processable_attachments" "custom"

Type of the email template. Only templates with types rejection and custom can be manually created and deleted.

  • rejection - Template for a rejection email
  • rejection_default - Default template for a rejection email
  • email_with_no_processable_attachments - Template for a reply to an email with no attachments
  • custom - Custom email template
subject
string
Default: ""

Email subject

message
string
Default: ""

HTML subset of text email section

enabled
boolean
Deprecated
Default: true

(Deprecated) Use automate instead

automate
boolean
Default: true

True if user wants to send email automatically on the action

Array of objects (email_address)
Default: []

List that contains information about recipients. The total number of recipients (to, cc and bcc together) cannot exceed 40.

Array of objects (email_address)
Default: []

List that contains information about recipients of carbon copy. The total number of recipients (to, cc and bcc together) cannot exceed 40.

Array of objects (email_address)
Default: []

List that contains information about recipients of blind carbon copy. The total number of recipients (to, cc and bcc together) cannot exceed 40.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

List email templates

Retrieve all email template objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

ID of the email template to filter by

queue
integer <int64>

ID of the queue to filter email templates by

type
string
Enum: "rejection" "rejection_default" "email_with_no_processable_attachments" "custom"

Type of the email template to filter by

name
string

Name of the email template to filter by

ordering
string
Enum: "id" "-id" "name" "-name"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve email template

Get an email template object.

Authorizations:
BearerAuth
path Parameters
emailTemplateId
required
integer

A unique integer value identifying this email template.

Responses

Response samples

Content type
application/json
{}

Update email template

Update email template object.

Authorizations:
BearerAuth
path Parameters
emailTemplateId
required
integer

A unique integer value identifying this email template.

Request Body schema: application/json
name
required
string

Name of the email template

queue
required
string <uri>

URL of the associated queue

triggers
Array of strings <uri> [ items <uri > ]
Default: []

URLs of the linked triggers

type
string
Default: "custom"
Enum: "rejection" "rejection_default" "email_with_no_processable_attachments" "custom"

Type of the email template. Only templates with types rejection and custom can be manually created and deleted.

  • rejection - Template for a rejection email
  • rejection_default - Default template for a rejection email
  • email_with_no_processable_attachments - Template for a reply to an email with no attachments
  • custom - Custom email template
subject
string
Default: ""

Email subject

message
string
Default: ""

HTML subset of text email section

enabled
boolean
Deprecated
Default: true

(Deprecated) Use automate instead

automate
boolean
Default: true

True if user wants to send email automatically on the action

Array of objects (email_address)
Default: []

List that contains information about recipients. The total number of recipients (to, cc and bcc together) cannot exceed 40.

Array of objects (email_address)
Default: []

List that contains information about recipients of carbon copy. The total number of recipients (to, cc and bcc together) cannot exceed 40.

Array of objects (email_address)
Default: []

List that contains information about recipients of blind carbon copy. The total number of recipients (to, cc and bcc together) cannot exceed 40.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Partial update email template

Update part of an email template object.

Authorizations:
BearerAuth
path Parameters
emailTemplateId
required
integer

A unique integer value identifying this email template.

Request Body schema: application/json
name
string

Name of the email template

queue
string <uri>

URL of the associated queue

triggers
Array of strings <uri> [ items <uri > ]
Default: []

URLs of the linked triggers

type
string
Default: "custom"
Enum: "rejection" "rejection_default" "email_with_no_processable_attachments" "custom"

Type of the email template. Only templates with types rejection and custom can be manually created and deleted.

  • rejection - Template for a rejection email
  • rejection_default - Default template for a rejection email
  • email_with_no_processable_attachments - Template for a reply to an email with no attachments
  • custom - Custom email template
subject
string
Default: ""

Email subject

message
string
Default: ""

HTML subset of text email section

enabled
boolean
Deprecated
Default: true

(Deprecated) Use automate instead

automate
boolean
Default: true

True if user wants to send email automatically on the action

Array of objects (email_address)
Default: []

List that contains information about recipients. The total number of recipients (to, cc and bcc together) cannot exceed 40.

Array of objects (email_address)
Default: []

List that contains information about recipients of carbon copy. The total number of recipients (to, cc and bcc together) cannot exceed 40.

Array of objects (email_address)
Default: []

List that contains information about recipients of blind carbon copy. The total number of recipients (to, cc and bcc together) cannot exceed 40.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Delete email template

Delete an email template object.

Authorizations:
BearerAuth
path Parameters
emailTemplateId
required
integer

A unique integer value identifying this email template.

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Render email template

The rendered email template can be requested via the render endpoint.

Inside the to, cc and bcc attributes template variables can be used instead of the email field of the email address object.

Authorizations:
BearerAuth
path Parameters
emailTemplateId
required
integer

A unique integer value identifying this email template.

Request Body schema: application/json
Array of objects (email_address_template)
Default: []

List that contains information about recipients to be rendered. The total number of recipients (to, cc and bcc together) cannot exceed 40.

Array of objects (email_address_template)
Default: []

List that contains information about recipients of carbon copy to be rendered. The total number of recipients (to, cc and bcc together) cannot exceed 40.

Array of objects (email_address_template)
Default: []

List that contains information about recipients of blind carbon copy to be rendered. The total number of recipients (to, cc and bcc together) cannot exceed 40.

parent_email
string <uri>

Link to parent email

document_list
Array of strings <uri> [ items <uri > ]
Default: []

List of document URLs to simulate sending of documents over email into Rossum

annotation_list
Array of strings <uri> [ items <uri > ]
Default: []

List of annotation URLs to use for rendering values for annotation.content placeholders

template_values
object
Default: {}

Values to fill in the email template

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "to": [
    • {
      • "email": "satisfied.customer@rossum.ai"
      }
    ],
  • "cc": [ ],
  • "bcc": [ ],
  • "subject": "My Email Template Subject: Rendered Parent Email Subject",
  • "message": "<p>My Email Template Message from user@example.com</p>"
}

Email Threads

An email thread object represents thread of related objects in Rossum's inbox.

Email Thread object

id
integer

Id of the email thread.

url
string <uri>

URL of the email thread.

organization
string <uri>

URL of the associated organization.

queue
string <uri>

URL of the associated queue.

root_email
string <uri>

URL of the associated root email (first incoming email in the thread).

has_replies
boolean

True if the thread has more than one incoming emails.

has_new_replies
boolean

True if the thread has unread incoming emails.

root_email_read
boolean

True if the root email has been opened in Rossum UI at least once.

created_at
string <date-time>

Timestamp of the creation of email thread (inherited from arrived_at timestamp of the root email).

last_email_created_at
string <date-time>

Timestamp of the most recent email in this email thread.

subject
string

Subject of the root email.

object

Information about sender of the root email containing keys email and name.

labels
Array of strings

This attribute is intended for INTERNAL use only and may be changed without notice. List of email thread labels set by root email. If root email is rejected and no other incoming emails are in thread, labels field is set to [rejected]. Labels is an empty list in all the other cases.

object

This attribute is intended for INTERNAL use only and may be changed without notice. Information about how many annotations were extracted from all emails in the thread and in which state they currently are.

{}

List email threads

Retrieve all email thread objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

queue
integer <int64>

Queue filter

created_at_before
string <date-time>

Created before filter.

created_at_after
string <date-time>

Created after filter.

has_root_email
boolean

Filter only email threads with a root email.

has_replies
boolean

Filter only email threads with two and more emails with type incoming.

has_new_replies
boolean

Filter only email threads with unread emails with type incoming.

last_email_created_at_before
string <date-time>

Filter only email threads with the last email in the thread created before given timestamp.

last_email_created_at_after
string <date-time>

Filter only email threads with the last email in the thread created after given timestamp.

recent_with_no_documents_not_replied
boolean

Filter only email threads with root email that arrived in the last 14 days with no attachment processed by Rossum, excluding those with rejected label, without any reply and when root email has been read.

ordering
string
Enum: "id" "-id" "created_at" "-created_at" "last_email_created_at" "-last_email_created_at" "subject" "-subject" "from__email" "-from__email" "from__name" "-from__name" "queue" "-queue"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve email thread

Get an email thread object.

Authorizations:
BearerAuth
path Parameters
emailThreadId
required
integer <int64>

ID of the email thread

Responses

Response samples

Content type
application/json
{}

Update email thread

Update email thread object.

Authorizations:
BearerAuth
path Parameters
emailThreadId
required
integer <int64>

ID of the email thread

Request Body schema: application/json
url
string <uri>

URL of the email thread.

has_new_replies
required
boolean

True if the thread has unread incoming emails.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Partial update email thread

Update part of email thread object.

Authorizations:
BearerAuth
path Parameters
emailThreadId
required
integer <int64>

ID of the email thread

Request Body schema: application/json
url
string <uri>

URL of the email thread.

has_new_replies
boolean

True if the thread has unread incoming emails.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Retrieve email thread counts

Retrieve counts of email threads.

Please note that this functionality is intended for internal use only. The API may change in the future without any notice.

Authorizations:
BearerAuth
query Parameters
id
integer <int64>

Object ID filter

queue
integer <int64>

Queue filter

created_at_before
string <date-time>

Created before filter.

created_at_after
string <date-time>

Created after filter.

has_root_email
boolean

Filter only email threads with a root email.

has_replies
boolean

Filter only email threads with two and more emails with type incoming.

has_new_replies
boolean

Filter only email threads with unread emails with type incoming.

last_email_created_at_before
string <date-time>

Filter only email threads with the last email in the thread created before given timestamp.

last_email_created_at_after
string <date-time>

Filter only email threads with the last email in the thread created after given timestamp.

recent_with_no_documents_not_replied
boolean

Filter only email threads with root email that arrived in the last 14 days with no attachment processed by Rossum, excluding those with rejected label, without any reply and when root email has been read.

Responses

Response samples

Content type
application/json
{
  • "with_replies": 5,
  • "with_new_replies": 3,
  • "recent_with_no_documents_not_replied": 2
}

Emails

An email object represents emails sent to Rossum inboxes.

Email object

id
integer

Id of the email

url
string <uri>

URL of the email

queue
string <uri>

URL of the associated queue

inbox
string <uri>

URL of the associated inbox

parent
string or null <uri>

URL of the parent email

email_thread
string or null <uri>

URL of the associated email thread

children
Array of strings <uri> [ items <uri > ]

List of URLs of the children emails

documents
Array of strings <uri> [ items <uri > ]

List of documents attached to email

created_at
string <date-time>

Timestamp of incoming email

last_thread_email_created_at
string or null <date-time>
Deprecated

(Deprecated) Timestamp of the most recent email in this email thread

subject
string or null

Email subject

object

Information about sender containing keys email and name

Array of objects (email_address)

List that contains information about recipients

Array of objects (email_address)

List that contains information about recipients of carbon copy

Array of objects (email_address)

List that contains information about recipients of blind carbon copy

body_text_plain
string or null

Plain text email section (shortened to 4kB)

body_text_html
string or null

HTML email section (shortened to 4kB)

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

type
string
Enum: "incoming" "outgoing"

Email type. Can be incoming or outgoing

object (annotation_counts)

This attribute is intended for INTERNAL use only and may be changed in the future. Information about how many annotations were extracted from email attachments and in which state they currently are.

annotations
Array of strings <uri> [ items <uri > ]

List of URLs of annotations that arrived via email

related_annotations
Array of strings <uri> [ items <uri > ]

List of URLs of annotations that are related to the email (e.g. rejected by that, added as attachment etc.)

related_documents
Array of strings <uri> [ items <uri > ]

List of URLs of documents related to the email (e.g. by forwarding email containing document as attachment etc.)

creator
string or null <uri>

User that have sent the email. null if email has been received via SMTP

filtered_out_document_count
integer

This attribute is intended for INTERNAL use only and may be changed in the future without notice. Number of documents automatically filtered out by Rossum smart inbox (this feature can be configured in inbox settings).

labels
Array of strings
Items Enum: "rejection" "automatic_rejection" "rejected" "automatic_status_changed_info" "forwarded" "reply"

List of email labels. Email objects can have assigned any number of labels.

Label name Description
rejection Outgoing informative email sent by Rossum after email was manually rejected.
automatic_rejection Informative automatic email sent by Rossum when no document was extracted from incoming email.
automatic_status_changed_info Informative automatic email sent by Rossum about document status change.
rejected Incoming email rejected together with all attached documents.
forwarded Outgoing email sent by forwarding other email.
reply Outgoing email sent by replying to another email.
content
string <uri>

URL of the emails content.

{}

List emails

Retrieve all emails objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

created_at_before
string <date-time>

Filter emails created before this date

created_at_after
string <date-time>

Filter emails created after this date

subject
string

Filter by email subject

queue
integer <int64>

Filter by queue ID

inbox
integer <int64>

Filter by inbox ID

documents
integer <int64>

Filter by document ID

from__email
string <email>

Filter by sender email address

from__name
string

Filter by sender name

to
string <email>

Filter by recipient email address

last_thread_email_created_at_before
string <date-time>

Filter emails with last thread email created before this date

last_thread_email_created_at_after
string <date-time>

Filter emails with last thread email created after this date

type
string
Enum: "incoming" "outgoing"

Filter by email type

email_thread
integer <int64>

Filter by email thread ID

has_documents
boolean

Filter emails that have or don't have documents

ordering
string
Enum: "id" "-id" "created_at" "-created_at" "subject" "-subject" "queue" "-queue" "inbox" "-inbox" "from__email" "-from__email" "from__name" "-from__name" "last_thread_email_created_at" "-last_thread_email_created_at"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve email

Get an email object.

Authorizations:
BearerAuth
path Parameters
emailId
required
integer <int64>
Example: 1234

Email ID

Responses

Response samples

Content type
application/json
{}

Update email

Update email object.

Authorizations:
BearerAuth
path Parameters
emailId
required
integer <int64>
Example: 1234

Email ID

Request Body schema: application/json
queue
required
string <uri>

URL of the associated queue

inbox
required
string <uri>

URL of the associated inbox

parent
string or null <uri>

URL of the parent email

children
Array of strings <uri> [ items <uri > ]

List of URLs of the children emails

subject
string or null

Email subject

body_text_plain
string or null

Plain text email section (shortened to 4kB)

body_text_html
string or null

HTML email section (shortened to 4kB)

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

object (annotation_counts)

This attribute is intended for INTERNAL use only and may be changed in the future. Information about how many annotations were extracted from email attachments and in which state they currently are.

labels
Array of strings
Items Enum: "rejection" "automatic_rejection" "rejected" "automatic_status_changed_info" "forwarded" "reply"

List of email labels. Email objects can have assigned any number of labels.

Label name Description
rejection Outgoing informative email sent by Rossum after email was manually rejected.
automatic_rejection Informative automatic email sent by Rossum when no document was extracted from incoming email.
automatic_status_changed_info Informative automatic email sent by Rossum about document status change.
rejected Incoming email rejected together with all attached documents.
forwarded Outgoing email sent by forwarding other email.
reply Outgoing email sent by replying to another email.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Partial update email

Update part of email object.

Authorizations:
BearerAuth
path Parameters
emailId
required
integer <int64>
Example: 1234

Email ID

Request Body schema: application/json
queue
string <uri>

URL of the associated queue

inbox
string <uri>

URL of the associated inbox

parent
string or null <uri>

URL of the parent email

children
Array of strings <uri> [ items <uri > ]

List of URLs of the children emails

subject
string or null

Email subject

body_text_plain
string or null

Plain text email section (shortened to 4kB)

body_text_html
string or null

HTML email section (shortened to 4kB)

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

object (annotation_counts)

This attribute is intended for INTERNAL use only and may be changed in the future. Information about how many annotations were extracted from email attachments and in which state they currently are.

labels
Array of strings
Items Enum: "rejection" "automatic_rejection" "rejected" "automatic_status_changed_info" "forwarded" "reply"

List of email labels. Email objects can have assigned any number of labels.

Label name Description
rejection Outgoing informative email sent by Rossum after email was manually rejected.
automatic_rejection Informative automatic email sent by Rossum when no document was extracted from incoming email.
automatic_status_changed_info Informative automatic email sent by Rossum about document status change.
rejected Incoming email rejected together with all attached documents.
forwarded Outgoing email sent by forwarding other email.
reply Outgoing email sent by replying to another email.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Import email

Import an email as raw data. Calling this endpoint starts an asynchronous process of creating an email object and importing its contents to the specified recipient inbox in Rossum. This endpoint can be used only by admin and organization_group_admin roles and email can be imported only to inboxes within the organization. The caller of this endpoint will be specified as the creator of the email. The email sender specified in the from header will still receive any automated notifications targeted to the email recipients.

Import email endpoint is asynchronous and response contains created task url. Further information about the import status may be acquired by retrieving the email object or the task (for more information, please refer to task).

Authorizations:
BearerAuth
Request Body schema: multipart/form-data
required
raw_message
required
string <binary>

Raw email data.

recipient
required
string <email>

Email address of the inbox where the email will be imported.

metadata
string

JSON object with metadata to be set on created annotations.

values
string

JSON object with values to be set on created annotations. All keys must start with the emails_import: prefix (e.g., emails_import:customer_id).

Responses

Response samples

Content type
application/json

Retrieve email content

Retrieve content of email.

Email content is unprocessed, unsanitized content and may contain possibly dangerous attachments. Be cautious while working with it.

Authorizations:
BearerAuth
path Parameters
emailId
required
integer <int64>
Example: 1234

Email ID

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Send email

Send email to specified recipients. The number of emails that can be sent is limited (10 for trials accounts).

At least one email in to, cc, bcc must be filled. The total number of recipients (to, cc and bcc together) cannot exceed 40.

If the related annotation has null email thread, it will be linked to the email thread related to the email created.

Template values

The object template_values is used to create an outgoing email. Key subject is used to fill an email subject and message is used to fill a body of the email (it may contain a subset of HTML). Values may contain other placeholders that are either built-in (see below) or specified in the template_values. For placeholders referring to annotations, the annotations from related_annotations attribute are used for filling in correct values.

List of built-in placeholders

Placeholder Description Can be used in automation
organization_name Name of the organization. True
app_url App root url True
user_name Username of the user sending the email. False
current_user_fullname Full name of user sending the email. False
current_user_email Email address of the user sending the email. False
parent_email_subject Subject of the email we are replying to. True
sender_email Email address of the author of the incoming email. True
annotation.document.original_file_name Filenames of the documents belonging to the related annotation(s) True
annotation.content.value.{schema_id} Content value of datapoints from email related annotation(s) True
annotation.id Ids of the related annotation(s) True
annotation.url Urls of the related annotation(s) True
annotation.assignee_email Emails of the assigned users to the related annotation(s) True
Authorizations:
BearerAuth
Request Body schema: application/json
Any of
required
Array of objects (email_address)

List that contains information about recipients.

Array of objects (email_address)

List that contains information about recipients of carbon copy.

Array of objects (email_address)

List that contains information about recipients of blind carbon copy.

object

Values to fill in the email template, it should always contain subject and message keys.

queue
required
string <uri>

Link to email-related queue.

related_annotations
Array of strings <uri> [ items <uri > ]

List of links to email-related annotations.

related_documents
Array of strings <uri> [ items <uri > ]

List of URLs to email-related documents (on the top of related_annotations documents which are linked automatically).

object

Keys are attachment types (currently only documents key is supported), value is list of URL.

parent_email
string <uri>

Link to parent email.

reset_related_annotations_email_thread
boolean

Update related annotations, so that their email thread matches the one of the email object created.

labels
Array of strings
Items Enum: "rejection" "automatic_rejection" "rejected" "automatic_status_changed_info" "forwarded" "reply"

List of email labels.

email_template
string <uri>

Link to the email template that was used for the email creation. If specified, the email will be included in the email templates stats.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json

Generic Engine Schemas

Warning: Please note that Generic Engine Schema is an internal API and can be changed without notice.

An engine schema is an object which describes what fields are available in the engine. Do not confuse engine schema with Document Schema.

Generic Engines

A Generic Engine object holds a specification of training setup for Rossum trained Engine. It contains metadata and a link to the related generic engine schema used for extraction.

Warning: Generic Engine is an internal API object and can be changed without notice.

Generic Engine object

id
integer

Id of the generic engine.

url
string <uri>

URL of the generic engine.

name
string

Name of the generic engine.

description
string

Description of the generic engine.

documentation_url
string or null <uri>

URL of the generic engine's documentation.

schema
string or null <uri>

URL of the related generic engine schema.

{}

List generic engines

Retrieve all generic engine objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

Responses

Response samples

Content type
application/json
{}

Retrieve generic engine

Get a generic engine object.

Authorizations:
BearerAuth
path Parameters
genericEngineId
required
integer <int64>

ID of the generic engine.

Responses

Response samples

Content type
application/json
{}

Hook Runs

A hook run is a record of hook execution (log). For easy and efficient development process of the extensions, the backend logs requests, responses (if enabled) and additional information, when the hook is being called.

The retention policy for the logs is set to 7 days.

List hook call logs

List all the logs from all running hooks. The logs are sorted by the start timestamp in descending order.

Authorizations:
BearerAuth
query Parameters
request_id
string
Example: request_id=6166deb3-2f89-4fc2-9359-56cc8e3838e4

Match the specified request_id.

log_level
string
Example: log_level=INFO

Match the specified log level (or multiple log levels).

hook
integer
Example: hook=1500

Match given the hook id (or multiple ids).

timestamp_before
string <date-time>
Example: timestamp_before=2023-09-23T12:00:00.000000Z

Filter for log entries before given timestamp.

timestamp_after
string <date-time>
Example: timestamp_after=2023-09-23T12:00:00.000000Z

Filter for log entries after given timestamp.

start_before
string <date-time>
Example: start_before=2023-09-23T12:00:00.000000Z

Filter for log entries before given start timestamp.

start_after
string <date-time>
Example: start_after=2023-09-23T12:00:00.000000Z

Filter for log entries after given start timestamp.

status
string
Enum: "waiting" "running" "completed" "cancelled" "failed"
Example: status=completed

Match the log entry status (or multiple statuses).

status_code
integer
Example: status_code=200

Match the response status_code (or multiple).

queue
integer
Example: queue=8199

Match the given queue id (or multiple ids).

annotation
integer
Example: annotation=1

Match the given annotation id (or multiple ids).

email
integer
Example: email=1

Match the given email id (or multiple ids).

search
string
Example: search=error

Full text filter across all the log entry fields.

page_size
integer [ 1 .. 100 ]
Default: 100
Example: page_size=50

Maximum number of results to return (between 1 and 100, defaults to 100).

Responses

Response samples

Content type
application/json
{
  • "results": [
    • {
      • "timestamp": "2023-09-23T12:00:00.000000Z",
      • "request_id": "6166deb3-2f89-4fc2-9359-56cc8e3838e4",
      • "event": "annotation_content",
      • "action": "updated",
      • "annotation_id": 1,
      • "queue_id": 1,
      • "email_id": 1,
      • "hook_id": 1,
      • "hook_type": "webhook",
      • "log_level": "INFO",
      • "message": "message",
      • "request": "{}",
      • "response": "{}",
      • "start": "2023-09-23T12:00:00.000000Z",
      • "end": "2023-09-23T12:00:00.000000Z",
      • "settings": "{}",
      • "status": "completed",
      • "uuid": "6166deb3-2f89-4fc2-9359-56cc8e3838e4"
      }
    ]
}

Hook Templates

Hook Template object

id
integer

Id of the hook template.

type
string
Default: "webhook"
Enum: "webhook" "function"

Hook type.

name
string

Name of the hook template.

url
string <uri>

URL of the hook template.

events
Array of strings

List of events, when the hook should be notified. For the list of events see Webhook events.

sideload
Array of strings
Default: []

List of related objects that should be included in hook request. For the list of possible sideloads see Webhook events.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

config
object

Configuration of the hook.

test
object
Default: {}

Input saved for hook testing purposes, see Test a hook.

description
string

Hook description text.

extension_source
string
Default: "rossum_store"

Import source of the extension. For more, see Extension sources.

settings
object
Default: {}

Specific settings that will be included in the payload when executing the hook.

settings_schema
object or null
Default: null

JSON schema for settings field, specifying the JSON structure of this field.

secrets_schema
object or null
Default: null

JSON schema for secrets field, specifying the JSON structure of this field.

guide
string

Description how to use the extension.

read_more_url
string <uri>

URL address leading to more info page.

extension_image_url
string <uri>

URL address of extension picture.

Array of objects
Default: []

Contains description for settings.

store_description
string

Description of hook displayed in Rossum store.

external_url
string

External URL to be called (relates to webhook type).

use_token_owner
boolean
Default: false

Whether the hook should use token owner.

install_action
string
Default: "copy"
Enum: "copy" "request_access"

Whether the hook is added directly via application (copy) or on customer's request (request_access).

token_lifetime_s
integer or null [ 0 .. 7200 ]
Default: null

Lifetime number of seconds for rossum_authorization_token (min=0, max=7200). This setting will ensure the token will be valid after hook response is returned. If null, default lifetime of 600 is used.

order
integer
Default: 0

Hook templates can be ordered or grouped by this parameter.

{
  • "id": 1,
  • "type": "function",
  • "name": "Document sorting",
  • "events": [
    • "annotation_status.changed"
    ],
  • "sideload": [
    • "queues"
    ],
  • "metadata": {
    • "some_key": "some_value"
    },
  • "config": {
    • "runtime": "nodejs22.x",
    • "code": "exports.rossum_hook_request_handler = () => {\nconst messages = [{\"type\": \"info\", \"content\": \"Yup!\"}];\nconst operations = [];\nreturn {\nmessages,\noperations\n};\n};",
    • "schedule": {
      • "cron": "*/10 * * * *"
      }
    },
  • "test": { },
  • "description": "Automatically sort documents into specific queues based on document type (i.e. invoice, bill, PO etc.), POs, vendor, total amount, due date, product or locale.",
  • "extension_source": "rossum_store",
  • "settings": { },
  • "settings_schema": null,
  • "secrets_schema": null,
  • "guide": "Here we explain how the extension should be used.",
  • "settings_description": [ ],
  • "store_description": "<p>Automatically sort documents into specific queues based on document type (i.e. invoice, bill, PO etc.), POs, vendor, total amount, due date, product or locale.</p>",
  • "external_url": "",
  • "use_token_owner": true,
  • "install_action": "copy",
  • "token_lifetime_s": null,
  • "order": 0
}

List hook templates

Retrieve all hook template objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

ordering
string
Enum: "order" "-order"

Result ordering.

Responses

Response samples

Content type
application/json
{
  • "pagination": {
    • "total": 1,
    • "total_pages": 1,
    • "next": null,
    • "previous": null
    },
  • "results": [
    • {
      • "id": 1,
      • "type": "function",
      • "name": "Document sorting",
      • "events": [
        ],
      • "sideload": [
        ],
      • "metadata": {
        },
      • "config": {
        },
      • "test": { },
      • "description": "Automatically sort documents into specific queues based on document type (i.e. invoice, bill, PO etc.), POs, vendor, total amount, due date, product or locale.",
      • "extension_source": "rossum_store",
      • "settings": { },
      • "settings_schema": null,
      • "secrets_schema": null,
      • "guide": "Here we explain how the extension should be used.",
      • "settings_description": [ ],
      • "store_description": "<p>Automatically sort documents into specific queues based on document type (i.e. invoice, bill, PO etc.), POs, vendor, total amount, due date, product or locale.</p>",
      • "external_url": "",
      • "use_token_owner": true,
      • "install_action": "copy",
      • "token_lifetime_s": null,
      • "order": 0
      }
    ]
}

Retrieve hook template

Get a hook template object.

Authorizations:
BearerAuth
path Parameters
hookTemplateId
required
integer

A unique integer value identifying this hook template.

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "type": "function",
  • "name": "Document sorting",
  • "events": [
    • "annotation_status.changed"
    ],
  • "sideload": [
    • "queues"
    ],
  • "metadata": {
    • "some_key": "some_value"
    },
  • "config": {
    • "runtime": "nodejs22.x",
    • "code": "exports.rossum_hook_request_handler = () => {\nconst messages = [{\"type\": \"info\", \"content\": \"Yup!\"}];\nconst operations = [];\nreturn {\nmessages,\noperations\n};\n};",
    • "schedule": {
      • "cron": "*/10 * * * *"
      }
    },
  • "test": { },
  • "description": "Automatically sort documents into specific queues based on document type (i.e. invoice, bill, PO etc.), POs, vendor, total amount, due date, product or locale.",
  • "extension_source": "rossum_store",
  • "settings": { },
  • "settings_schema": null,
  • "secrets_schema": null,
  • "guide": "Here we explain how the extension should be used.",
  • "settings_description": [ ],
  • "store_description": "<p>Automatically sort documents into specific queues based on document type (i.e. invoice, bill, PO etc.), POs, vendor, total amount, due date, product or locale.</p>",
  • "external_url": "",
  • "use_token_owner": true,
  • "install_action": "copy",
  • "token_lifetime_s": null,
  • "order": 0
}

Hooks

A hook is an extension of Rossum that is notified when specific event occurs. A hook object is used to configure what endpoint or function is executed and when. For an overview of other extension options see Extensions.

Hook object

One of
id
integer

Id of the hook.

type
string
Default: "webhook"
Enum: "webhook" "function"

Hook type.

Value: "webhook"
name
string

Name of the hook.

url
string <uri>

URL of the hook.

queues
Array of strings <uri> [ items <uri > ]

List of queues that use hook object.

run_after
Array of strings <uri> [ items <uri > ]

List of all hooks that has to be executed before running this hook.

active
boolean

If set to true the hook is notified.

events
Array of strings

List of events, when the hook should be notified. For the list of events see Webhook events.

sideload
Array of strings
Default: []

List of related objects that should be included in hook request. For the list of possible sideloads see Webhook events.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

token_owner
string or null <uri>

URL of a user object. If present, an API access token is generated for this user and sent to the hook. Users with organization group admin cannot be set as token_owner. If null, token is not generated.

token_lifetime_s
integer or null [ 0 .. 7200 ]

Lifetime number of seconds for rossum_authorization_token (min=0, max=7200). This setting will ensure the token will be valid after hook response is returned. If null, default lifetime of 600 is used.

test
object
Default: {}

Input saved for hook testing purposes, see Test a hook.

description
string or null

Hook description text.

extension_source
string
Default: "custom"
Enum: "custom" "rossum_store"

Import source of the extension.

settings
object
Default: {}

Specific settings that will be included in the payload when executing the hook. Field is validated with json schema stored in settings_schema field.

settings_schema
object or null

Beta JSON schema for settings field validation.

secrets
object
Default: {}

Specific secrets that are stored securely encrypted. The values are merged into the hook execution payload. Field is validated with json schema stored in secrets_schema field. (write only)

secrets_schema
object
Default: {"type":"object","additionalProperties":{"type":"string"}}

Beta JSON schema for secrets field validation.

guide
string or null

Description how to use the extension.

read_more_url
string or null <uri>

URL address leading to more info page.

extension_image_url
string or null <uri>

URL address of extension picture.

hook_template
string or null <uri>

URL of the hook template used to create the hook.

created_by
string or null <uri>

URL of the hook creator. Might be null for hooks created before April 2025.

created_at
string or null <date-time>

Date of hook creation. Might be null for hooks created before April 2025.

modified_by
string or null <uri> (modified_by)

URL of the last modifier.

modified_at
string or null <date-time> (modified_at)

Date of the last modification.

object (webhook_config)

Configuration for webhook hooks.

Example
{}

Create hook

Create a new hook object.

Authorizations:
BearerAuth
Request Body schema: application/json
One of
type
string
Default: "webhook"
Enum: "webhook" "function"

Hook type.

Value: "webhook"
name
required
string

Name of the hook.

queues
Array of strings <uri> [ items <uri > ]

List of queues that use hook object.

run_after
Array of strings <uri> [ items <uri > ]

List of all hooks that has to be executed before running this hook.

active
boolean

If set to true the hook is notified.

events
required
Array of strings

List of events, when the hook should be notified. For the list of events see Webhook events.

sideload
Array of strings
Default: []

List of related objects that should be included in hook request. For the list of possible sideloads see Webhook events.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

token_owner
string or null <uri>

URL of a user object. If present, an API access token is generated for this user and sent to the hook. Users with organization group admin cannot be set as token_owner. If null, token is not generated.

token_lifetime_s
integer or null [ 0 .. 7200 ]

Lifetime number of seconds for rossum_authorization_token (min=0, max=7200). This setting will ensure the token will be valid after hook response is returned. If null, default lifetime of 600 is used.

test
object
Default: {}

Input saved for hook testing purposes, see Test a hook.

description
string or null

Hook description text.

extension_source
string
Default: "custom"
Enum: "custom" "rossum_store"

Import source of the extension.

settings
object
Default: {}

Specific settings that will be included in the payload when executing the hook. Field is validated with json schema stored in settings_schema field.

settings_schema
object or null

Beta JSON schema for settings field validation.

secrets
object
Default: {}

Specific secrets that are stored securely encrypted. The values are merged into the hook execution payload. Field is validated with json schema stored in secrets_schema field. (write only)

secrets_schema
object
Default: {"type":"object","additionalProperties":{"type":"string"}}

Beta JSON schema for secrets field validation.

guide
string or null

Description how to use the extension.

read_more_url
string or null <uri>

URL address leading to more info page.

extension_image_url
string or null <uri>

URL address of extension picture.

hook_template
string or null <uri>

URL of the hook template used to create the hook.

object (webhook_config)

Configuration for webhook hooks.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
Example
{}

List hooks

Retrieve all hook objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer
Example: id=1500

Filter by hook ID.

name
string
Example: name=Change of Status

Filter by hook name.

type
string
Enum: "webhook" "function"
Example: type=webhook

Filter by hook type.

queue
integer
Example: queue=8199

Filter by queue ID.

active
boolean
Example: active=true

Filter by active status.

config_url
string
Example: config_url=https://myq.east-west-trading.com

Filter by configuration URL.

config_app_url
string
Example: config_app_url=https://myq.east-west-trading.com

Filter by configuration app URL.

extension_source
string
Enum: "custom" "rossum_store"
Example: extension_source=custom

Filter by extension source.

events
string
Example: events=annotation_status.changed

Filter by events.

ordering
string
Enum: "id" "-id" "name" "-name" "type" "-type" "active" "-active" "config_url" "-config_url" "config_app_url" "-config_app_url" "events" "-events"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve hook

Get a hook object.

Authorizations:
BearerAuth
path Parameters
hookId
required
integer
Example: 1500

A unique integer value identifying this hook.

Responses

Response samples

Content type
application/json
Example
{}

Update hook

Update hook object.

Authorizations:
BearerAuth
path Parameters
hookId
required
integer
Example: 1500

A unique integer value identifying this hook.

Request Body schema: application/json
One of
type
string
Default: "webhook"
Enum: "webhook" "function"

Hook type.

Value: "webhook"
name
required
string

Name of the hook.

queues
Array of strings <uri> [ items <uri > ]

List of queues that use hook object.

run_after
Array of strings <uri> [ items <uri > ]

List of all hooks that has to be executed before running this hook.

active
boolean

If set to true the hook is notified.

events
required
Array of strings

List of events, when the hook should be notified. For the list of events see Webhook events.

sideload
Array of strings
Default: []

List of related objects that should be included in hook request. For the list of possible sideloads see Webhook events.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

token_owner
string or null <uri>

URL of a user object. If present, an API access token is generated for this user and sent to the hook. Users with organization group admin cannot be set as token_owner. If null, token is not generated.

token_lifetime_s
integer or null [ 0 .. 7200 ]

Lifetime number of seconds for rossum_authorization_token (min=0, max=7200). This setting will ensure the token will be valid after hook response is returned. If null, default lifetime of 600 is used.

test
object
Default: {}

Input saved for hook testing purposes, see Test a hook.

description
string or null

Hook description text.

extension_source
string
Default: "custom"
Enum: "custom" "rossum_store"

Import source of the extension.

settings
object
Default: {}

Specific settings that will be included in the payload when executing the hook. Field is validated with json schema stored in settings_schema field.

settings_schema
object or null

Beta JSON schema for settings field validation.

secrets
object
Default: {}

Specific secrets that are stored securely encrypted. The values are merged into the hook execution payload. Field is validated with json schema stored in secrets_schema field. (write only)

secrets_schema
object
Default: {"type":"object","additionalProperties":{"type":"string"}}

Beta JSON schema for secrets field validation.

guide
string or null

Description how to use the extension.

read_more_url
string or null <uri>

URL address leading to more info page.

extension_image_url
string or null <uri>

URL address of extension picture.

hook_template
string or null <uri>

URL of the hook template used to create the hook.

object (webhook_config)

Configuration for webhook hooks.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
Example
{}

Partial update hook

Update part of hook object.

Authorizations:
BearerAuth
path Parameters
hookId
required
integer
Example: 1500

A unique integer value identifying this hook.

Request Body schema: application/json
One of
type
string
Default: "webhook"
Enum: "webhook" "function"

Hook type.

Value: "webhook"
name
string

Name of the hook.

queues
Array of strings <uri> [ items <uri > ]

List of queues that use hook object.

run_after
Array of strings <uri> [ items <uri > ]

List of all hooks that has to be executed before running this hook.

active
boolean

If set to true the hook is notified.

events
Array of strings

List of events, when the hook should be notified. For the list of events see Webhook events.

sideload
Array of strings
Default: []

List of related objects that should be included in hook request. For the list of possible sideloads see Webhook events.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

token_owner
string or null <uri>

URL of a user object. If present, an API access token is generated for this user and sent to the hook. Users with organization group admin cannot be set as token_owner. If null, token is not generated.

token_lifetime_s
integer or null [ 0 .. 7200 ]

Lifetime number of seconds for rossum_authorization_token (min=0, max=7200). This setting will ensure the token will be valid after hook response is returned. If null, default lifetime of 600 is used.

test
object
Default: {}

Input saved for hook testing purposes, see Test a hook.

description
string or null

Hook description text.

extension_source
string
Default: "custom"
Enum: "custom" "rossum_store"

Import source of the extension.

settings
object
Default: {}

Specific settings that will be included in the payload when executing the hook. Field is validated with json schema stored in settings_schema field.

settings_schema
object or null

Beta JSON schema for settings field validation.

secrets
object
Default: {}

Specific secrets that are stored securely encrypted. The values are merged into the hook execution payload. Field is validated with json schema stored in secrets_schema field. (write only)

secrets_schema
object
Default: {"type":"object","additionalProperties":{"type":"string"}}

Beta JSON schema for secrets field validation.

guide
string or null

Description how to use the extension.

read_more_url
string or null <uri>

URL address leading to more info page.

extension_image_url
string or null <uri>

URL address of extension picture.

hook_template
string or null <uri>

URL of the hook template used to create the hook.

object (webhook_config)

Configuration for webhook hooks.

Responses

Request samples

Content type
application/json
Example
{}

Response samples

Content type
application/json
Example
{}

Delete hook

Delete hook object.

Authorizations:
BearerAuth
path Parameters
hookId
required
integer
Example: 1500

A unique integer value identifying this hook.

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Create hook from template

Create a new hook object with the option to use a referenced hook template as a base.

Authorizations:
BearerAuth
Request Body schema: application/json
One of
type
string
Default: "webhook"
Enum: "webhook" "function"

Hook type.

Value: "webhook"
name
required
string

Name of the hook.

queues
Array of strings <uri> [ items <uri > ]

List of queues that use hook object.

run_after
Array of strings <uri> [ items <uri > ]

List of all hooks that has to be executed before running this hook.

active
boolean

If set to true the hook is notified.

events
required
Array of strings

List of events, when the hook should be notified. For the list of events see Webhook events.

sideload
Array of strings
Default: []

List of related objects that should be included in hook request. For the list of possible sideloads see Webhook events.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

token_owner
string or null <uri>

URL of a user object. If present, an API access token is generated for this user and sent to the hook. Users with organization group admin cannot be set as token_owner. If null, token is not generated.

token_lifetime_s
integer or null [ 0 .. 7200 ]

Lifetime number of seconds for rossum_authorization_token (min=0, max=7200). This setting will ensure the token will be valid after hook response is returned. If null, default lifetime of 600 is used.

test
object
Default: {}

Input saved for hook testing purposes, see Test a hook.

description
string or null

Hook description text.

extension_source
string
Default: "custom"
Enum: "custom" "rossum_store"

Import source of the extension.

settings
object
Default: {}

Specific settings that will be included in the payload when executing the hook. Field is validated with json schema stored in settings_schema field.

settings_schema
object or null

Beta JSON schema for settings field validation.

secrets
object
Default: {}

Specific secrets that are stored securely encrypted. The values are merged into the hook execution payload. Field is validated with json schema stored in secrets_schema field. (write only)

secrets_schema
object
Default: {"type":"object","additionalProperties":{"type":"string"}}

Beta JSON schema for secrets field validation.

guide
string or null

Description how to use the extension.

read_more_url
string or null <uri>

URL address leading to more info page.

extension_image_url
string or null <uri>

URL address of extension picture.

hook_template
string or null <uri>

URL of the hook template used to create the hook.

object (webhook_config)

Configuration for webhook hooks.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
Example
{}

Duplicate hook

Duplicate a hook object. hook.queues is not copied. Duplicated hook is always inactive (hook.active = False).

Authorizations:
BearerAuth
path Parameters
hookId
required
integer
Example: 1500

A unique integer value identifying this hook.

Request Body schema: application/json
required
name
required
string

Name of the duplicated hook.

copy_secrets
boolean
Default: false

Whether to copy secrets.

copy_dependencies
boolean
Default: false

Whether to copy dependencies. If enabled, this option copies the dependency relations of the original hook. It duplicates the run_after references to preserve which hooks the original hook depended on, and it also updates all hooks that previously depended on the original hook to reference the new duplicated one. This ensures that both dependency directions—"runs after" and "is run after by"—are correctly maintained.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "copy_secrets": false,
  • "copy_dependencies": false
}

Response samples

Content type
application/json
Example
{}

Generate hook payload

Users can use this endpoint to test the hook on a payload of specific events and actions.

The token used for calling the endpoint is returned as rossum_authorization_token regardless of the token_owner of the hook. Values in secrets are redacted for security reasons. The payload for email events from this endpoint may differ from the original hook payload in the file ids, height, width, and format of email addresses in headers.

Authorizations:
BearerAuth
path Parameters
hookId
required
integer
Example: 1500

A unique integer value identifying this hook.

Request Body schema: application/json
required
action
required
string

Hook's action.

event
required
string

Hook's event.

annotation
string <uri>

URL of related Annotation object. Required for annotation_status and annotation_content events.

previous_status
string

A previous status of the document. See Document Lifecycle for a list of supported values. Required for annotation_status and annotation_content events.

status
string

Status of the document. See Document Lifecycle for a list of supported values. Required for annotation_status and annotation_content events.

email
string <uri>

URL of the arriving email. Required for email event.

upload
string <uri>

URL of an upload instance. Required for upload event.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "request_id": "ae7bc8dd-73bd-489b-a3d2-f5514b209591",
  • "timestamp": "2020-01-01T00:00:00.000000Z",
  • "rossum_authorization_token": "1024873d424a007d8eebff7b3684d283abdf7d0d",
  • "settings": {
    • "example_target_service_type": "SFTP",
    • "example_target_hostname": "sftp.elis.rossum.ai"
    },
  • "secrets": {
    • "username": "[redacted...]",
    • "password": "[redacted...]"
    },
  • "action": "scheduled",
  • "event": "invocation"
}

Retrieve secret keys list

Retrieve all secrets in a list (only keys are retrieved, values are encrypted in DB and aren't possible to obtain via API).

Authorizations:
BearerAuth
path Parameters
hookId
required
integer
Example: 1500

A unique integer value identifying this hook.

Responses

Response samples

Content type
application/json
[
  • "secret_key1",
  • "secret_key2"
]

Test hook

Test a hook with custom payload. Test endpoint will return result generated by the specified Hook which would be normally processed by Rossum.

Authorizations:
BearerAuth
path Parameters
hookId
required
integer
Example: 1500

A unique integer value identifying this hook.

Request Body schema: application/json
required
config
object

You can override default configuration of hook being executed. The runtime attribute is required for function hook if custom config is set.

payload
required
object

Payload sent to the Hook, please note only supported combination of action and event can be passed.

Responses

Request samples

Content type
application/json
{
  • "config": {
    • "insecure_ssl": true,
    • "code": "exports.rossum_hook_request_handler = ..."
    },
  • "payload": {
    • "action": "started",
    • "event": "annotation_content",
    • "annotation": { },
    • "document": { },
    • "settings": { }
    }
}

Response samples

Content type
application/json
{
  • "response": {
    • "messages": [ ],
    • "operations": [ ]
    }
}

Trigger manual hook

Invoke the hook with custom payload. The payload will be added to the standard invocation event hook request and sent to the hook. The hook response is returned in the invocation response payload.

Warning: Values for standard json hook response attributes (request_id, action, ...) will NOT be overwritten.

Warning: Attribute timeout_s in hook config for this endpoint POST /v1/hooks/{id}/invoke will be overwritten by default value of 30.

Authorizations:
BearerAuth
path Parameters
hookId
required
integer
Example: 1500

A unique integer value identifying this hook.

Request Body schema: application/json
required
object

Object with properties to be merged into the invocation payload.

Responses

Request samples

Content type
application/json
{
  • "SAP_ID": "1234",
  • "DB_COLUMN": "SAP"
}

Response samples

Content type
application/json
{ }

Inboxes

An inbox object enables email ingestion to a related queue. We enforce email domain to match Rossum domain (e.g. example.rossum.app). email_prefix may be used to construct unique email address.

Please note that due to security reasons, emails from Rossum do not contain processed files. This feature can be enabled upon request by customer support.

The filters attribute allows filtering of incoming emails and documents:

  • allowed_senders and denied_senders settings allow filtering based on sender email address using wildcards (* matches everything, ? matches any single character)
  • document_rejection_conditions defines rules for filtering incoming documents via email. See document rejection conditions object

Several bounce-related attributes are deprecated and their configuration has moved to Email notifications settings.

Inbox object

id
integer <int64>

ID of the inbox.

name
string

Name of the inbox (not visible in UI).

url
string <url>

URL of the inbox.

queues
Array of strings <url> [ items <url > ]

Queue that receives documents from inbox. Queue has to be passed in list due to backward compatibility. It is possible to have only one queue per inbox.

email
string <email>

Rossum email address (e.g. east-west-trading-co-a34f3a@example.rossum.app).

email_prefix
string <= 57 characters

Rossum email address prefix (e.g. east-west-trading-co). Maximum length allowed is 57 chars.

bounce_email_to
string or null <email>
Deprecated

(Deprecated) Email address to send notifications to (e.g. about failed import). Configuration moved to Email notifications settings.

bounce_unprocessable_attachments
boolean
Deprecated
Default: false

(Deprecated) Whether return back unprocessable attachments (e.g. MS Word docx) or just silently ignore them. When true, minimum image size requirement does not apply. Configuration moved to Email notifications settings.

bounce_postponed_annotations
boolean
Deprecated
Default: false

(Deprecated) Whether to send notification when annotation is postponed. Configuration moved to Email notifications settings.

bounce_deleted_annotations
boolean
Deprecated
Default: false

(Deprecated) Whether to send notification when annotation is deleted. Configuration moved to Email notifications settings.

bounce_email_with_no_attachments
boolean
Deprecated
Default: true

(Deprecated) Whether to send notification when no processable documents were found. Configuration moved to Email notifications settings.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

object (filters)

Filtering of incoming emails and documents. allowed_senders and denied_senders settings allow filtering of incoming emails based on sender email address. Filters can be specified by exact emaill addresses as well as using expressions containing wildcards:

  • * matches everything (e.g. *@rossum.ai matches every email from rossum.ai domain)
  • ? matches any single character (e.g. john?doe@rossum.ai matches john.doe@rossum.ai as well as john-doe@rossum.ai) document_rejection_conditions defines rules for filtering incoming documents via email.
dmarc_check_action
string
Default: "accept"
Enum: "accept" "drop"

Decides what to do with incoming emails, that don't pass the DMARC check.

modified_by
string or null <uri> (modified_by)

URL of the last modifier.

modified_at
string or null <date-time> (modified_at)

Date of the last modification.

{
  • "id": 1234,
  • "name": "Receipts",
  • "email": "east-west-trading-co-a34f3a@example.rossum.app",
  • "email_prefix": "east-west-trading-co",
  • "bounce_email_to": "bounces@east-west.com",
  • "bounce_unprocessable_attachments": false,
  • "bounce_postponed_annotations": false,
  • "bounce_deleted_annotations": false,
  • "bounce_email_with_no_attachments": true,
  • "metadata": {
    • "some_key": "some_value"
    },
  • "filters": {
    • "allowed_senders": [
      • "*@rossum.ai",
      • "john.doe@company.com",
      • "john.doe@company.??"
      ],
    • "denied_senders": [
      • "spam@*"
      ],
    • "document_rejection_conditions": {
      • "enabled": true,
      • "resolution_lower_than_px": [
        ],
      • "file_size_less_than_b": null,
      • "mime_types": [
        ],
      • "file_name_regexes": null
      }
    },
  • "dmarc_check_action": "accept",
  • "modified_at": "2020-01-01T10:08:03.856648Z"
}

Create inbox

Create a new inbox object.

Authorizations:
BearerAuth
Request Body schema: application/json
name
required
string

Name of the inbox (not visible in UI).

queues
required
Array of strings <url> [ items <url > ]

Queue that receives documents from inbox. Queue has to be passed in list due to backward compatibility. It is possible to have only one queue per inbox.

email
string <email>

Rossum email address (e.g. east-west-trading-co-a34f3a@example.rossum.app).

email_prefix
required
string <= 57 characters

Rossum email address prefix (e.g. east-west-trading-co). Maximum length allowed is 57 chars.

bounce_email_to
string or null <email>
Deprecated

(Deprecated) Email address to send notifications to (e.g. about failed import). Configuration moved to Email notifications settings.

bounce_unprocessable_attachments
boolean
Deprecated
Default: false

(Deprecated) Whether return back unprocessable attachments (e.g. MS Word docx) or just silently ignore them. When true, minimum image size requirement does not apply. Configuration moved to Email notifications settings.

bounce_postponed_annotations
boolean
Deprecated
Default: false

(Deprecated) Whether to send notification when annotation is postponed. Configuration moved to Email notifications settings.

bounce_deleted_annotations
boolean
Deprecated
Default: false

(Deprecated) Whether to send notification when annotation is deleted. Configuration moved to Email notifications settings.

bounce_email_with_no_attachments
boolean
Deprecated
Default: true

(Deprecated) Whether to send notification when no processable documents were found. Configuration moved to Email notifications settings.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

object (filters)

Filtering of incoming emails and documents. allowed_senders and denied_senders settings allow filtering of incoming emails based on sender email address. Filters can be specified by exact emaill addresses as well as using expressions containing wildcards:

  • * matches everything (e.g. *@rossum.ai matches every email from rossum.ai domain)
  • ? matches any single character (e.g. john?doe@rossum.ai matches john.doe@rossum.ai as well as john-doe@rossum.ai) document_rejection_conditions defines rules for filtering incoming documents via email.
dmarc_check_action
string
Default: "accept"
Enum: "accept" "drop"

Decides what to do with incoming emails, that don't pass the DMARC check.

Responses

Request samples

Content type
application/json
{
  • "name": "Receipts",
  • "email": "east-west-trading-co-a34f3a@example.rossum.app",
  • "email_prefix": "east-west-trading-co",
  • "bounce_email_to": "bounces@east-west.com",
  • "bounce_unprocessable_attachments": false,
  • "bounce_postponed_annotations": false,
  • "bounce_deleted_annotations": false,
  • "bounce_email_with_no_attachments": true,
  • "metadata": {
    • "some_key": "some_value"
    },
  • "filters": {
    • "allowed_senders": [
      • "*@rossum.ai",
      • "john.doe@company.com",
      • "john.doe@company.??"
      ],
    • "denied_senders": [
      • "spam@*"
      ],
    • "document_rejection_conditions": {
      • "enabled": true,
      • "resolution_lower_than_px": [
        ],
      • "file_size_less_than_b": null,
      • "mime_types": [
        ],
      • "file_name_regexes": null
      }
    },
  • "dmarc_check_action": "accept"
}

Response samples

Content type
application/json
{
  • "id": 1234,
  • "name": "Receipts",
  • "email": "east-west-trading-co-a34f3a@example.rossum.app",
  • "email_prefix": "east-west-trading-co",
  • "bounce_email_to": "bounces@east-west.com",
  • "bounce_unprocessable_attachments": false,
  • "bounce_postponed_annotations": false,
  • "bounce_deleted_annotations": false,
  • "bounce_email_with_no_attachments": true,
  • "metadata": {
    • "some_key": "some_value"
    },
  • "filters": {
    • "allowed_senders": [
      • "*@rossum.ai",
      • "john.doe@company.com",
      • "john.doe@company.??"
      ],
    • "denied_senders": [
      • "spam@*"
      ],
    • "document_rejection_conditions": {
      • "enabled": true,
      • "resolution_lower_than_px": [
        ],
      • "file_size_less_than_b": null,
      • "mime_types": [
        ],
      • "file_name_regexes": null
      }
    },
  • "dmarc_check_action": "accept",
  • "modified_at": "2020-01-01T10:08:03.856648Z"
}

List inboxes

Retrieve all inbox objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

name
string

Name filter

email
string

Email filter

email_prefix
string

Email prefix filter

bounce_email_to
string
Deprecated

Bounce email to filter

bounce_unprocessable_attachments
boolean
Deprecated

Bounce unprocessable attachments filter

bounce_postponed_annotations
boolean
Deprecated

Bounce postponed annotations filter

bounce_deleted_annotations
boolean
Deprecated

Bounce deleted annotations filter

bounce_email_with_no_attachments
boolean
Deprecated

Bounce emails with no attachment extracted.

ordering
string
Enum: "id" "-id" "name" "-name" "email" "-email" "email_prefix" "-email_prefix" "bounce_email_to" "-bounce_email_to"

Result ordering.

Responses

Response samples

Content type
application/json
{
  • "results": [
    • {
      • "id": 1234,
      • "name": "Receipts",
      • "email": "east-west-trading-co-a34f3a@example.rossum.app",
      • "email_prefix": "east-west-trading-co",
      • "bounce_email_to": "bounces@east-west.com",
      • "bounce_unprocessable_attachments": false,
      • "bounce_postponed_annotations": false,
      • "bounce_deleted_annotations": false,
      • "bounce_email_with_no_attachments": true,
      • "metadata": {
        },
      • "filters": {
        },
      • "dmarc_check_action": "accept",
      • "modified_at": "2020-01-01T10:08:03.856648Z"
      }
    ],
  • "pagination": {
    • "total": 1,
    • "total_pages": 1,
    • "next": null,
    • "previous": null
    }
}

Retrieve inbox

Get an inbox object.

Authorizations:
BearerAuth
path Parameters
id
required
integer <int64>

ID of the inbox

Responses

Response samples

Content type
application/json
{
  • "id": 1234,
  • "name": "Receipts",
  • "email": "east-west-trading-co-a34f3a@example.rossum.app",
  • "email_prefix": "east-west-trading-co",
  • "bounce_email_to": "bounces@east-west.com",
  • "bounce_unprocessable_attachments": false,
  • "bounce_postponed_annotations": false,
  • "bounce_deleted_annotations": false,
  • "bounce_email_with_no_attachments": true,
  • "metadata": {
    • "some_key": "some_value"
    },
  • "filters": {
    • "allowed_senders": [
      • "*@rossum.ai",
      • "john.doe@company.com",
      • "john.doe@company.??"
      ],
    • "denied_senders": [
      • "spam@*"
      ],
    • "document_rejection_conditions": {
      • "enabled": true,
      • "resolution_lower_than_px": [
        ],
      • "file_size_less_than_b": null,
      • "mime_types": [
        ],
      • "file_name_regexes": null
      }
    },
  • "dmarc_check_action": "accept",
  • "modified_at": "2020-01-01T10:08:03.856648Z"
}

Update inbox

Update inbox object.

Authorizations:
BearerAuth
path Parameters
id
required
integer <int64>

ID of the inbox

Request Body schema: application/json
name
required
string

Name of the inbox (not visible in UI).

queues
required
Array of strings <url> [ items <url > ]

Queue that receives documents from inbox. Queue has to be passed in list due to backward compatibility. It is possible to have only one queue per inbox.

email
string <email>

Rossum email address (e.g. east-west-trading-co-a34f3a@example.rossum.app).

email_prefix
required
string <= 57 characters

Rossum email address prefix (e.g. east-west-trading-co). Maximum length allowed is 57 chars.

bounce_email_to
string or null <email>
Deprecated

(Deprecated) Email address to send notifications to (e.g. about failed import). Configuration moved to Email notifications settings.

bounce_unprocessable_attachments
boolean
Deprecated
Default: false

(Deprecated) Whether return back unprocessable attachments (e.g. MS Word docx) or just silently ignore them. When true, minimum image size requirement does not apply. Configuration moved to Email notifications settings.

bounce_postponed_annotations
boolean
Deprecated
Default: false

(Deprecated) Whether to send notification when annotation is postponed. Configuration moved to Email notifications settings.

bounce_deleted_annotations
boolean
Deprecated
Default: false

(Deprecated) Whether to send notification when annotation is deleted. Configuration moved to Email notifications settings.

bounce_email_with_no_attachments
boolean
Deprecated
Default: true

(Deprecated) Whether to send notification when no processable documents were found. Configuration moved to Email notifications settings.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

object (filters)

Filtering of incoming emails and documents. allowed_senders and denied_senders settings allow filtering of incoming emails based on sender email address. Filters can be specified by exact emaill addresses as well as using expressions containing wildcards:

  • * matches everything (e.g. *@rossum.ai matches every email from rossum.ai domain)
  • ? matches any single character (e.g. john?doe@rossum.ai matches john.doe@rossum.ai as well as john-doe@rossum.ai) document_rejection_conditions defines rules for filtering incoming documents via email.
dmarc_check_action
string
Default: "accept"
Enum: "accept" "drop"

Decides what to do with incoming emails, that don't pass the DMARC check.

Responses

Request samples

Content type
application/json
{
  • "name": "Receipts",
  • "email": "east-west-trading-co-a34f3a@example.rossum.app",
  • "email_prefix": "east-west-trading-co",
  • "bounce_email_to": "bounces@east-west.com",
  • "bounce_unprocessable_attachments": false,
  • "bounce_postponed_annotations": false,
  • "bounce_deleted_annotations": false,
  • "bounce_email_with_no_attachments": true,
  • "metadata": {
    • "some_key": "some_value"
    },
  • "filters": {
    • "allowed_senders": [
      • "*@rossum.ai",
      • "john.doe@company.com",
      • "john.doe@company.??"
      ],
    • "denied_senders": [
      • "spam@*"
      ],
    • "document_rejection_conditions": {
      • "enabled": true,
      • "resolution_lower_than_px": [
        ],
      • "file_size_less_than_b": null,
      • "mime_types": [
        ],
      • "file_name_regexes": null
      }
    },
  • "dmarc_check_action": "accept"
}

Response samples

Content type
application/json
{
  • "id": 1234,
  • "name": "Receipts",
  • "email": "east-west-trading-co-a34f3a@example.rossum.app",
  • "email_prefix": "east-west-trading-co",
  • "bounce_email_to": "bounces@east-west.com",
  • "bounce_unprocessable_attachments": false,
  • "bounce_postponed_annotations": false,
  • "bounce_deleted_annotations": false,
  • "bounce_email_with_no_attachments": true,
  • "metadata": {
    • "some_key": "some_value"
    },
  • "filters": {
    • "allowed_senders": [
      • "*@rossum.ai",
      • "john.doe@company.com",
      • "john.doe@company.??"
      ],
    • "denied_senders": [
      • "spam@*"
      ],
    • "document_rejection_conditions": {
      • "enabled": true,
      • "resolution_lower_than_px": [
        ],
      • "file_size_less_than_b": null,
      • "mime_types": [
        ],
      • "file_name_regexes": null
      }
    },
  • "dmarc_check_action": "accept",
  • "modified_at": "2020-01-01T10:08:03.856648Z"
}

Partial update inbox

Update a part of inbox object.

Authorizations:
BearerAuth
path Parameters
id
required
integer <int64>

ID of the inbox

Request Body schema: application/json
name
string

Name of the inbox (not visible in UI).

queues
Array of strings <url> [ items <url > ]

Queue that receives documents from inbox. Queue has to be passed in list due to backward compatibility. It is possible to have only one queue per inbox.

email
string <email>

Rossum email address (e.g. east-west-trading-co-a34f3a@example.rossum.app).

email_prefix
string <= 57 characters

Rossum email address prefix (e.g. east-west-trading-co). Maximum length allowed is 57 chars.

bounce_email_to
string or null <email>
Deprecated

(Deprecated) Email address to send notifications to (e.g. about failed import). Configuration moved to Email notifications settings.

bounce_unprocessable_attachments
boolean
Deprecated
Default: false

(Deprecated) Whether return back unprocessable attachments (e.g. MS Word docx) or just silently ignore them. When true, minimum image size requirement does not apply. Configuration moved to Email notifications settings.

bounce_postponed_annotations
boolean
Deprecated
Default: false

(Deprecated) Whether to send notification when annotation is postponed. Configuration moved to Email notifications settings.

bounce_deleted_annotations
boolean
Deprecated
Default: false

(Deprecated) Whether to send notification when annotation is deleted. Configuration moved to Email notifications settings.

bounce_email_with_no_attachments
boolean
Deprecated
Default: true

(Deprecated) Whether to send notification when no processable documents were found. Configuration moved to Email notifications settings.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

object (filters)

Filtering of incoming emails and documents. allowed_senders and denied_senders settings allow filtering of incoming emails based on sender email address. Filters can be specified by exact emaill addresses as well as using expressions containing wildcards:

  • * matches everything (e.g. *@rossum.ai matches every email from rossum.ai domain)
  • ? matches any single character (e.g. john?doe@rossum.ai matches john.doe@rossum.ai as well as john-doe@rossum.ai) document_rejection_conditions defines rules for filtering incoming documents via email.
dmarc_check_action
string
Default: "accept"
Enum: "accept" "drop"

Decides what to do with incoming emails, that don't pass the DMARC check.

Responses

Request samples

Content type
application/json
{
  • "name": "Receipts",
  • "email": "east-west-trading-co-a34f3a@example.rossum.app",
  • "email_prefix": "east-west-trading-co",
  • "bounce_email_to": "bounces@east-west.com",
  • "bounce_unprocessable_attachments": false,
  • "bounce_postponed_annotations": false,
  • "bounce_deleted_annotations": false,
  • "bounce_email_with_no_attachments": true,
  • "metadata": {
    • "some_key": "some_value"
    },
  • "filters": {
    • "allowed_senders": [
      • "*@rossum.ai",
      • "john.doe@company.com",
      • "john.doe@company.??"
      ],
    • "denied_senders": [
      • "spam@*"
      ],
    • "document_rejection_conditions": {
      • "enabled": true,
      • "resolution_lower_than_px": [
        ],
      • "file_size_less_than_b": null,
      • "mime_types": [
        ],
      • "file_name_regexes": null
      }
    },
  • "dmarc_check_action": "accept"
}

Response samples

Content type
application/json
{
  • "id": 1234,
  • "name": "Receipts",
  • "email": "east-west-trading-co-a34f3a@example.rossum.app",
  • "email_prefix": "east-west-trading-co",
  • "bounce_email_to": "bounces@east-west.com",
  • "bounce_unprocessable_attachments": false,
  • "bounce_postponed_annotations": false,
  • "bounce_deleted_annotations": false,
  • "bounce_email_with_no_attachments": true,
  • "metadata": {
    • "some_key": "some_value"
    },
  • "filters": {
    • "allowed_senders": [
      • "*@rossum.ai",
      • "john.doe@company.com",
      • "john.doe@company.??"
      ],
    • "denied_senders": [
      • "spam@*"
      ],
    • "document_rejection_conditions": {
      • "enabled": true,
      • "resolution_lower_than_px": [
        ],
      • "file_size_less_than_b": null,
      • "mime_types": [
        ],
      • "file_name_regexes": null
      }
    },
  • "dmarc_check_action": "accept",
  • "modified_at": "2020-01-01T10:08:03.856648Z"
}

Delete inbox

Delete inbox object.

Authorizations:
BearerAuth
path Parameters
id
required
integer <int64>

ID of the inbox

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Labels

Label object represents arbitrary labels added to annotation objects.

Label object

id
integer

Label object ID.

url
string <uri>

Label object URL.

name
string

Text of the label.

organization
string <uri>

Organization the label belongs to.

color
string or null

Color of the label in RGB hex format.

{}

Create label

Create a new label object.

Authorizations:
BearerAuth
Request Body schema: application/json
name
required
string

Text of the label.

color
string or null

Color of the label in RGB hex format.

Responses

Request samples

Content type
application/json
{
  • "name": "expedite",
  • "color": "#FF5733"
}

Response samples

Content type
application/json
{}

List labels

List all label objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

ID of the label to filter by

name
string

Name of the label to filter by

ordering
string
Enum: "id" "-id" "name" "-name"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve label

Retrieve a label object.

Authorizations:
BearerAuth
path Parameters
labelId
required
integer

A unique integer value identifying this label.

Responses

Response samples

Content type
application/json
{}

Update label

Update label object.

Authorizations:
BearerAuth
path Parameters
labelId
required
integer

A unique integer value identifying this label.

Request Body schema: application/json
name
required
string

Text of the label.

color
string or null

Color of the label in RGB hex format.

Responses

Request samples

Content type
application/json
{
  • "name": "expedite",
  • "color": "#FF5733"
}

Response samples

Content type
application/json
{}

Partial update label

Update part of label object.

Authorizations:
BearerAuth
path Parameters
labelId
required
integer

A unique integer value identifying this label.

Request Body schema: application/json
name
string

Text of the label.

color
string or null

Color of the label in RGB hex format.

Responses

Request samples

Content type
application/json
{
  • "name": "expedite",
  • "color": "#FF5733"
}

Response samples

Content type
application/json
{}

Delete label

Delete label object.

Authorizations:
BearerAuth
path Parameters
labelId
required
integer

A unique integer value identifying this label.

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Add/remove annotation labels

Add/Remove labels on annotations.

Authorizations:
BearerAuth
Request Body schema: application/json
required
object

Operations to perform on labels

required
object

Objects to apply operations to

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Memberships

Membership represents a relation between user, organization (besides its primary organization) and queues. It provides a way how users can work with multiple organizations within the same organization group. Using memberships one can query the resources from a different organization the same way how one would do in their own organization. To do so, a membership shall be created first, then a membership token shall be generated. Such token then can be used in any subsequent calls made to the target organization.

Note: Direct access to the API requires you to login using Rossum credentials. User must have organization_group_admin role (this user role is available only on demand since it is a priced add-on).

Membership object

id
integer

Id of the membership

url
string <uri>

URL of the membership

user
string <uri>

URL of the user

organization
string <uri>

URL of the organization

queues
Array of strings <uri> [ items <uri > ]

URLs of queues user has access to

expires_at
string or null <date-time>

Timestamp of membership expiration. Membership won't expire if no expiration is set.

Create membership

Create a membership object.

Authorizations:
BearerAuth
path Parameters
organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

Request Body schema: application/json
user
required
string <uri>

URL of the user

organization
required
string <uri>

URL of the organization

queues
Array of strings <uri> [ items <uri > ]

URLs of queues user has access to

expires_at
string or null <date-time>

Timestamp of membership expiration. Membership won't expire if no expiration is set.

Responses

Response samples

List memberships

Retrieve all membership objects.

Authorizations:
BearerAuth
path Parameters
organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

user
integer <int64>

ID of a user to filter memberships by

organization
integer <int64>

ID of an organization to filter memberships by

ordering
string
Enum: "id" "-id"

Result ordering.

Responses

Response samples

Content type
application/json

Retrieve membership

Get a membership object.

Authorizations:
BearerAuth
path Parameters
membershipId
required
integer

A unique integer value identifying this membership.

organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

Responses

Response samples

Update membership

Update a membership object.

Authorizations:
BearerAuth
path Parameters
membershipId
required
integer

A unique integer value identifying this membership.

organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

Request Body schema: application/json
user
required
string <uri>

URL of the user

organization
required
string <uri>

URL of the organization

queues
Array of strings <uri> [ items <uri > ]

URLs of queues user has access to

expires_at
string or null <date-time>

Timestamp of membership expiration. Membership won't expire if no expiration is set.

Responses

Response samples

Partial update membership

Update a part of membership object.

Authorizations:
BearerAuth
path Parameters
membershipId
required
integer

A unique integer value identifying this membership.

organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

Request Body schema: application/json
user
string <uri>

URL of the user

organization
string <uri>

URL of the organization

queues
Array of strings <uri> [ items <uri > ]

URLs of queues user has access to

expires_at
string or null <date-time>

Timestamp of membership expiration. Membership won't expire if no expiration is set.

Responses

Response samples

Delete membership

Delete a membership object.

Authorizations:
BearerAuth
path Parameters
membershipId
required
integer

A unique integer value identifying this membership.

organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Notes

Note object represents arbitrary notes added to annotation objects.

⚠️ Deprecated: Please note that note object and all endpoints related to it are deprecated.

Note object

id
integer

Note object ID.

url
string <uri>

Note object URL.

type
string
Value: "rejection"

Note type. Possible values: rejection.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

content
string <= 4096 characters

Note's string content.

created_at
string <date-time>

Timestamp of object's creation.

creator
string <uri>

User that created the note.

modified_by
string or null <uri> (modified_by)

URL of the last modifier.

modified_at
string or null <date-time> (modified_at)

Date of the last modification.

modifier
string or null <uri>

User that last modified the note.

annotation
string <uri>

Annotation the note belongs to.

{}

Create note Deprecated

Create a new note object.

⚠️ Deprecated: Please note that note object and all endpoints related to it are deprecated.

Authorizations:
BearerAuth
Request Body schema: application/json
type
required
string
Value: "rejection"

Note type. Possible values: rejection.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

content
required
string <= 4096 characters

Note's string content.

annotation
required
string <uri>

Annotation the note belongs to.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

List notes Deprecated

List all note objects.

⚠️ Deprecated: Please note that note object and all endpoints related to it are deprecated.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

annotation
integer <int64>

Annotation filter

creator
integer <int64>

ID of user that created the object filter

ordering
string
Enum: "modified_at" "-modified_at" "created_at" "-created_at"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve note Deprecated

Retrieve a note object.

⚠️ Deprecated: Please note that note object and all endpoints related to it are deprecated.

Authorizations:
BearerAuth
path Parameters
noteId
required
integer <int64>

Note ID

Responses

Response samples

Content type
application/json
{}

Update note Deprecated

Update note object.

⚠️ Deprecated: Please note that note object and all endpoints related to it are deprecated.

Authorizations:
BearerAuth
path Parameters
noteId
required
integer <int64>

Note ID

Request Body schema: application/json
type
required
string
Value: "rejection"

Note type. Possible values: rejection.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

content
required
string <= 4096 characters

Note's string content.

annotation
required
string <uri>

Annotation the note belongs to.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Partial update note Deprecated

Update part of note object.

⚠️ Deprecated: Please note that note object and all endpoints related to it are deprecated.

Authorizations:
BearerAuth
path Parameters
noteId
required
integer <int64>

Note ID

Request Body schema: application/json
type
string
Value: "rejection"

Note type. Possible values: rejection.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

content
string <= 4096 characters

Note's string content.

annotation
string <uri>

Annotation the note belongs to.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Delete note Deprecated

Delete note object.

⚠️ Deprecated: Please note that note object and all endpoints related to it are deprecated.

Authorizations:
BearerAuth
path Parameters
noteId
required
integer <int64>

Note ID

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Organization Groups

Organization Group object

id
integer

Id of the organization group.

name
string

Name of the organization group.

is_trial
boolean

Property indicates whether this license is a trial license.

is_production
boolean

Property indicates whether this licence is a production licence.

deployment_location
string

Deployment location identifier.

features
object or null

Enabled features (for internal use only).

usage
object

Enabled priced features (for internal use only).

modified_by
string or null <uri> (modified_by)

URL of the last modifier.

modified_at
string or null <date-time> (modified_at)

Date of the last modification.

{
  • "id": 42,
  • "name": "Rossum group",
  • "is_trial": false,
  • "is_production": true,
  • "deployment_location": "prod-eu",
  • "features": null,
  • "usage": { },
  • "modified_at": "2020-01-01T10:08:03.856648Z"
}

Create organization group

Create a new organization group object.

Warning: Please note that this functionality is intended for internal use only. The API may change in the future without any notice.

Authorizations:
BearerAuth
Request Body schema: application/json
name
required
string

Name of the organization group.

Responses

Request samples

Content type
application/json
{
  • "name": "Rossum group"
}

Response samples

Content type
application/json
{
  • "id": 42,
  • "name": "Rossum group",
  • "is_trial": false,
  • "is_production": true,
  • "deployment_location": "prod-eu",
  • "features": null,
  • "usage": { },
  • "modified_at": "2020-01-01T10:08:03.856648Z"
}

List organization groups

Retrieve all organization group objects. Typically, there would only be one result.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

ordering
string
Enum: "id" "-id" "name" "-name"

Result ordering.

Responses

Response samples

Content type
application/json
{
  • "pagination": {
    • "total": 1,
    • "total_pages": 1,
    • "next": null,
    • "previous": null
    },
  • "results": [
    • {
      • "id": 42,
      • "name": "Rossum group",
      • "is_trial": false,
      • "is_production": true,
      • "deployment_location": "prod-eu",
      • "features": null,
      • "usage": { },
      • "modified_at": "2020-01-01T10:08:03.856648Z"
      }
    ]
}

Retrieve organization group

Get an organization group object.

Authorizations:
BearerAuth
path Parameters
organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

Responses

Response samples

Content type
application/json
{
  • "id": 42,
  • "name": "Rossum group",
  • "is_trial": false,
  • "is_production": true,
  • "deployment_location": "prod-eu",
  • "features": null,
  • "usage": { },
  • "modified_at": "2020-01-01T10:08:03.856648Z"
}

Export organization group billing history

Download the data provided by the billing history response resource in a CSV output.

Authorizations:
BearerAuth
path Parameters
organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Export organization group billing stats

Download the data provided by the billing stats response resource in a CSV output.

Authorizations:
BearerAuth
path Parameters
organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

Request Body schema: application/json
object (billing_filters_org_group)

Filters used for the computation of billed items counts.

group_by
Array of strings (group_by_stats_group) <= 1 items
Items Enum: "organization" "queue" "month" "week"

List of attributes by which the results are to be grouped. Only a single value is supported. Note that 'organization' is only available for organization groups.

order_by
Array of strings (order_by)
Items Enum: "billable_pages" "billable_documents" "non_billable_pages" "non_billable_documents"

List of attributes by which the results are to be ordered.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

List organization group organizations

Get organizations for an organization group object. Returned objects contain subset of organization attributes.

Note: The endpoint provides read-only view for users with the organization_group_admin role for managing memberships.

Authorizations:
BearerAuth
path Parameters
organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

Responses

Response samples

Content type
application/json
{}

List organization group queues

Get queues for an organization group object. Returned objects contain subset of queue attributes.

Note: The endpoint provides read-only view for users with the organization_group_admin role for managing memberships.

Authorizations:
BearerAuth
path Parameters
organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

organization
integer

Filter queues by organization

ordering
string
Enum: "id" "-id" "name" "-name"

Result ordering.

Responses

Response samples

Content type
application/json
{}

List organization group users

Get users for an organization group object. Returned objects contain subset of user attributes.

Note: The endpoint provides read-only view for users with the organization_group_admin role for managing memberships.

Authorizations:
BearerAuth
path Parameters
organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

Responses

Response samples

Content type
application/json
{}

List organization group workspaces

Get workspaces for an organization group object. Returned objects contain subset of workspace attributes.

Note: The endpoint provides read-only view for users with the organization_group_admin role for managing memberships.

Authorizations:
BearerAuth
path Parameters
organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

organization
integer

Filter workspaces by organization

ordering
string
Enum: "id" "-id" "name" "-name"

Result ordering.

Responses

Response samples

Content type
application/json

Retrieve organization

Get organization for an organization group object. Returned object contains subset of organization attributes.

Note: The endpoint provides read-only view for users with the organization_group_admin role for managing memberships.

Authorizations:
BearerAuth
path Parameters
organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

organizationId
required
integer
Example: 406

A unique integer value identifying the organization.

Responses

Response samples

Content type
application/json
{}

Retrieve organization billing history group

Retrieve billing history with entries corresponding to individual contracted periods. The value purchased_documents or purchased_pages define the period billing unit.

Authorizations:
BearerAuth
path Parameters
organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

Responses

Response samples

Content type
application/json
{
  • "pagination": {
    • "total": 1,
    • "total_pages": 1,
    • "next": null,
    • "previous": null
    },
  • "results": [
    • {
      • "begin_date": "2021-01-01",
      • "end_date": "2022-12-31",
      • "values": {
        }
      }
    ],
  • "totals": {
    • "billable_documents": 32,
    • "billable_pages": 27,
    • "non_billable_documents": 0,
    • "non_billable_pages": 0,
    • "purchased_documents": 0,
    • "purchased_pages": 555,
    • "extracted_pages_with_learning": 0,
    • "extracted_pages_without_learning": 0,
    • "split_pages_with_learning": 0,
    • "split_pages_without_learning": 0,
    • "extracted_documents_with_learning": 0,
    • "extracted_documents_without_learning": 0,
    • "split_documents_with_learning": 0,
    • "split_documents_without_learning": 0,
    • "ocr_only_pages": 0,
    • "ocr_only_documents": 0,
    • "purchased_extracted_pages_with_learning": 0,
    • "purchased_extracted_pages_without_learning": 0,
    • "purchased_split_pages_with_learning": 0,
    • "purchased_split_pages_without_learning": 0,
    • "purchased_extracted_documents_with_learning": 0,
    • "purchased_extracted_documents_without_learning": 0,
    • "purchased_split_documents_with_learning": 0,
    • "purchased_split_documents_without_learning": 0,
    • "purchased_ocr_only_pages": 0,
    • "purchased_ocr_only_documents": 0
    },
  • "updated_at": "2022-09-01"
}

Retrieve organization billing stats group

Download billing stats report for an organization group.

Limitations:

  • filter.queues can only be used when filter.organizations contains a single organization
  • filter.queues cannot be used for group_by=organization
Authorizations:
BearerAuth
path Parameters
organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

Request Body schema: application/json
object (billing_filters_org_group)

Filters used for the computation of billed items counts.

group_by
Array of strings (group_by_stats_group) <= 1 items
Items Enum: "organization" "queue" "month" "week"

List of attributes by which the results are to be grouped. Only a single value is supported. Note that 'organization' is only available for organization groups.

order_by
Array of strings (order_by)
Items Enum: "billable_pages" "billable_documents" "non_billable_pages" "non_billable_documents"

List of attributes by which the results are to be ordered.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "pagination": {
    • "total": 1,
    • "total_pages": 1,
    • "next": null,
    • "previous": null
    },
  • "results": [
    • {
      • "begin_date": "2021-01-01",
      • "end_date": "2022-12-31",
      • "values": {
        }
      }
    ],
  • "totals": {
    • "billable_documents": 32,
    • "billable_pages": 27,
    • "non_billable_documents": 0,
    • "non_billable_pages": 0,
    • "purchased_documents": 0,
    • "purchased_pages": 555,
    • "extracted_pages_with_learning": 0,
    • "extracted_pages_without_learning": 0,
    • "split_pages_with_learning": 0,
    • "split_pages_without_learning": 0,
    • "extracted_documents_with_learning": 0,
    • "extracted_documents_without_learning": 0,
    • "split_documents_with_learning": 0,
    • "split_documents_without_learning": 0,
    • "ocr_only_pages": 0,
    • "ocr_only_documents": 0,
    • "purchased_extracted_pages_with_learning": 0,
    • "purchased_extracted_pages_without_learning": 0,
    • "purchased_split_pages_with_learning": 0,
    • "purchased_split_pages_without_learning": 0,
    • "purchased_extracted_documents_with_learning": 0,
    • "purchased_extracted_documents_without_learning": 0,
    • "purchased_split_documents_with_learning": 0,
    • "purchased_split_documents_without_learning": 0,
    • "purchased_ocr_only_pages": 0,
    • "purchased_ocr_only_documents": 0
    },
  • "updated_at": "2022-09-01"
}

Retrieve queue

Get queue for an organization group object. Returned object contains subset of queue attributes.

Note: The endpoint provides read-only view for users with the organization_group_admin role for managing memberships.

Authorizations:
BearerAuth
path Parameters
organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

queueId
required
integer

A unique integer value identifying this queue.

Responses

Response samples

Retrieve user

Get user for an organization group object. Returned object contains subset of user attributes.

Note: The endpoint provides read-only view for users with the organization_group_admin role for managing memberships.

Authorizations:
BearerAuth
path Parameters
organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

userId
required
integer <int64>
Example: 10775

User ID

Responses

Response samples

Content type
application/json
{}

Retrieve workspace

Get workspace for an organization group object. Returned object contains subset of workspace attributes.

Note: Please note that direct access to the API requires you to login using Rossum credentials. User must have organization_group_admin role.

Authorizations:
BearerAuth
path Parameters
organizationGroupId
required
integer <int64>

A unique integer value identifying organization group.

workspaceId
required
integer <int64>

ID of a workspace.

Responses

Response samples

Organizations

Organization object

id
integer

Id of the organization.

name
string

Name of the organization (not visible in UI).

url
string <uri>

URL of the organization.

workspaces
Array of strings <uri> [ items <uri > ]

List of workspaces objects in the organization.

users
Array of strings <uri> [ items <uri > ]

List of users in the organization.

organization_group
string <uri>

URL to organization group the organization belongs to.

ui_settings
object
Default: {}

Organization-wide frontend UI settings (e.g. locales). Rossum internal.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

is_trial
boolean

Property indicates whether this license is a trial license.

created_at
string <date-time>

Timestamp for when the organization was created.

trial_expires_at
string or null <date-time>

Timestamp for when the trial period ended (ISO 8601).

oidc_provider
string or null
Deprecated

(Deprecated) OpenID Connect provider name.

object or null

INTERNAL Rossum internal information on organization.

creator
string or null <uri>

URL of the first user of the organization (set during organization creation).

modified_by
string or null <uri> (modified_by)

URL of the last modifier.

modified_at
string or null <date-time> (modified_at)

Date of the last modification.

object
Default: {}

Settings of the organization.

sandbox
boolean
Default: false

Specifies if the organization is a sandbox.

{}

List organizations

Retrieve all organization objects.

Note: Organization is an internal API and can be changed without notice.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer
Example: id=406

Filter by organization ID.

name
string
Example: name=East West Trading Co

Filter by organization name.

active_token
string

INTERNAL Filter by active token.

include_membership_organizations
boolean
Default: false
Example: include_membership_organizations=true

Include organizations that user is either in or is connected to through membership.

ordering
string
Enum: "id" "-id" "name" "-name"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve organization

Get an organization object.

Note: Organization is an internal API and can be changed without notice.

Authorizations:
BearerAuth
path Parameters
organizationId
required
integer
Example: 406

A unique integer value identifying the organization.

Responses

Response samples

Content type
application/json
{}

Create organization

Create new organization and related objects (workspace, queue, user, schema, inbox, domain).

You need a create_key in order to create an organization. Please contact support@rossum.ai to obtain one.

Selected template_name affects default schema and extracted fields. Please note that the demo templates may be updated as new features are introduced.

List of available templates:

Template name Description Is demo
Empty Organization Template Empty organization, suitable for further customization no
CZ Demo Template Czech standard invoices yes
Tax Invoice EU Demo Template VAT Invoices, Credit Notes, Debit Notes, Purchase/Sales Orders, Receipts, and Pro Formas coming from the EU yes
Tax Invoice US Demo Template Tax Invoices, Credit Notes, Debit Notes, Purchase/Sales Orders, Receipts, and Pro Formas coming from the US yes
Tax Invoice UK Demo Template VAT Invoices, Credit Notes, Debit Notes, Purchase/Sales Orders, Receipts, and Pro Formas coming from the UK, India, Canada, or Australia yes
Delivery Note Demo Template Delivery Notes yes
Tax Invoice CN Demo Template governmental Tax Invoices from Mainland China (fapiaos) yes
Certificates of Analysis Demo Template Certificates of Analysis that are quality control documents common in the food and beverage industry yes

Note: Organization is an internal API and can be changed without notice.

Authorizations:
BearerAuth
Request Body schema: application/json
required
template_name
required
string
Enum: "Empty Organization Template" "CZ Demo Template" "Tax Invoice EU Demo Template" "Tax Invoice US Demo Template" "Tax Invoice UK Demo Template" "Delivery Note Demo Template" "Tax Invoice CN Demo Template" "Certificates of Analysis Demo Template"

Template to use for new organization.

organization_name
required
string

Name of the organization. Will be also used as a base for inbox e-mail address.

user_fullname
required
string

Full user name.

user_email
required
string <email>

Valid email of the user (also used as Rossum login).

user_password
string

Initial user password. If not provided, password will be generated.

user_ui_settings
object
Default: {"locale":"en"}

Initial UI settings.

create_key
required
string

A key that allows to create an organization.

Responses

Request samples

Content type
application/json
{
  • "template_name": "Tax Invoice UK Demo Template",
  • "organization_name": "East West Trading Co",
  • "user_fullname": "John Doe",
  • "user_email": "john@east-west-trading.com",
  • "user_password": "owo1aiG9ua9Aihai",
  • "user_ui_settings": {
    • "locale": "en"
    },
  • "create_key": "13156106d6f185df24648ac7ff20f64f1c5c06c144927be217189e26f8262c4a"
}

Response samples

Content type
application/json
{}

Export organization billing history

Download the data provided by the billing history response resource in a CSV output.

Note: Organization is an internal API and can be changed without notice.

Authorizations:
BearerAuth
path Parameters
organizationId
required
integer
Example: 406

A unique integer value identifying the organization.

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Export organization billing stats

Download the data provided by the billing stats response resource in a CSV output.

Note: Organization is an internal API and can be changed without notice.

Authorizations:
BearerAuth
path Parameters
organizationId
required
integer
Example: 406

A unique integer value identifying the organization.

Request Body schema: application/json
required
object (billing_filters_base)

Filters used for the computation of billed items counts.

group_by
Array of strings (group_by_base)
Items Enum: "queue" "month" "week"

List of attributes by which the results are to be grouped. Only a single value is supported.

Responses

Request samples

Content type
application/json

Request to export billing statistics for a specific queue over a fiscal year period, grouped by month.

{}

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Generate organization token

Generate token for access to membership and primary organizations. If the user is a group administrator, token can be generated for any organization in his organization group.

Note: Organization is an internal API and can be changed without notice.

Authorizations:
BearerAuth
Request Body schema: application/json
required
organization
required
string <uri>

URL to the organization to which the token will have access.

origin
string

For internal use only. Using this field may affect Rate Limiting of your API requests.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Retrieve organization billing (deprecated) Deprecated

In order to obtain an overview of the billed items, you can get basic billing statistics.

Note: This endpoint is deprecated in favor of billing stats for organization and may return inaccurate results.

Note: Please note that data are accurate starting on June 1st 2021.

Note: Organization is an internal API and can be changed without notice.

Authorizations:
BearerAuth
path Parameters
organizationId
required
integer
Example: 406

A unique integer value identifying the organization.

Request Body schema: application/json
required
object

Filters used for the computation of billed items counts.

group_by
Array of strings
Items Value: "queue"

List of attributes by which the series is to be grouped.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "series": [
    • {
      • "begin_date": "2019-02-01",
      • "end_date": "2019-02-01",
      • "values": {
        }
      }
    ],
  • "totals": {
    • "header_fields_per_page": 8,
    • "header_fields_per_document": 16,
    • "header_fields_and_line_items_per_page": 20,
    • "header_fields_and_line_items_per_document": 43
    }
}

Retrieve organization billing history

Retrieve billing history with entries corresponding to individual contracted periods. The value purchased_documents or purchased_pages define the period billing unit.

Note: Organization is an internal API and can be changed without notice.

Authorizations:
BearerAuth
path Parameters
organizationId
required
integer
Example: 406

A unique integer value identifying the organization.

Responses

Response samples

Content type
application/json
{
  • "pagination": {
    • "total": 1,
    • "total_pages": 1,
    • "next": null,
    • "previous": null
    },
  • "results": [
    • {
      • "begin_date": "2021-01-01",
      • "end_date": "2022-12-31",
      • "values": {
        }
      }
    ],
  • "totals": {
    • "billable_documents": 32,
    • "billable_pages": 27,
    • "non_billable_documents": 0,
    • "non_billable_pages": 0,
    • "purchased_documents": 0,
    • "purchased_pages": 555,
    • "extracted_pages_with_learning": 0,
    • "extracted_pages_without_learning": 0,
    • "split_pages_with_learning": 0,
    • "split_pages_without_learning": 0,
    • "extracted_documents_with_learning": 0,
    • "extracted_documents_without_learning": 0,
    • "split_documents_with_learning": 0,
    • "split_documents_without_learning": 0,
    • "ocr_only_pages": 0,
    • "ocr_only_documents": 0,
    • "purchased_extracted_pages_with_learning": 0,
    • "purchased_extracted_pages_without_learning": 0,
    • "purchased_split_pages_with_learning": 0,
    • "purchased_split_pages_without_learning": 0,
    • "purchased_extracted_documents_with_learning": 0,
    • "purchased_extracted_documents_without_learning": 0,
    • "purchased_split_documents_with_learning": 0,
    • "purchased_split_documents_without_learning": 0,
    • "purchased_ocr_only_pages": 0,
    • "purchased_ocr_only_documents": 0
    },
  • "updated_at": "2022-09-01"
}

Retrieve organization billing stats

In order to obtain an overview of the billed items, you can get basic billing statistics.

The billing unit (pages or documents) is defined in the contract.

Note: Organization is an internal API and can be changed without notice.

Authorizations:
BearerAuth
path Parameters
organizationId
required
integer
Example: 406

A unique integer value identifying the organization.

Request Body schema: application/json
required
object (billing_filters_base)

Filters used for the computation of billed items counts.

group_by
Array of strings (group_by_base)
Items Enum: "queue" "month" "week"

List of attributes by which the results are to be grouped. Only a single value is supported.

order_by
Array of strings (order_by)
Items Enum: "billable_pages" "billable_documents" "non_billable_pages" "non_billable_documents"

List of attributes by which the results are to be ordered.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "pagination": {
    • "total": 1,
    • "total_pages": 1,
    • "next": null,
    • "previous": null
    },
  • "results": [],
  • "totals": {
    • "billable_documents": 21288,
    • "billable_pages": 30204,
    • "non_billable_documents": 81,
    • "non_billable_pages": 5649
    },
  • "updated_at": "2022-09-01"
}

Retrieve organization limits

Used to get information about various limits in regard to Organization.

Note: Organization is an internal API and can be changed without notice.

Authorizations:
BearerAuth
path Parameters
organizationId
required
integer
Example: 406

A unique integer value identifying the organization.

Responses

Response samples

Content type
application/json
{
  • "email_limits": {
    • "count_today": 7,
    • "count_today_notification": 4,
    • "count_total": 9,
    • "email_per_day_limit": 10,
    • "email_per_day_limit_notification": 10,
    • "email_total_limit": 20,
    • "last_sent_at": "2022-01-13",
    • "last_sent_at_notification": "2022-01-13"
    }
}

Pages

A page object contains information about one page of the annotation (we render pages separately for every annotation, but this will change in the future).

Page objects are created automatically during document import and cannot be created through the API, you need to use queue upload endpoint. Pages cannot be deleted directly -- they are deleted on parent annotation delete.

Page object

id
integer

Id of the page

url
string <uri>

URL of the page.

annotation
string <uri>

Annotation that page belongs to.

number
integer

Page index, first page has index 1.

rotation_deg
integer

Page rotation.

mime_type
string

MIME type of the page (image/png).

s3_name
string

Internal

content
string <uri>

Link to the page raw content (e.g. pdf file).

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

width
integer or null

Page width (for internal purposes only)

height
integer or null

Page height (for internal purposes only)

{}

List pages

Retrieve all page objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
Array of integers <int64> [ items <int64 > ]

Filter by a list of ids, e.g. ?id=1,2,3

annotation
Array of integers <int64> [ items <int64 > ]

Filter by a list of annotation IDs

number
Array of integers

Filter by a list of page numbers, e.g. ?number=1,2

ordering
string
Enum: "id" "-id" "number" "-number" "s3_name" "-s3_name"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve page

Get a page object.

Authorizations:
BearerAuth
path Parameters
pageId
required
integer <int64>

A unique integer value identifying this page.

Responses

Response samples

Content type
application/json
{}

Questions

A Question object represents a collection of questions related to a survey.

Note: Question is an internal API object and can be changed without notice._

Question object

uuid
string <uuid>

UUID of the question

url
string <uri>

URL of the question

text
string

Text body of the question

answer_type
string

Determines the shape of the answer. Possible values are defined by the answer type enumeration.

{}

List questions

Retrieve all question objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

Responses

Response samples

Content type
application/json
{}

Retrieve question

Get a question object.

Authorizations:
BearerAuth
path Parameters
questionId
required
string <uuid>
Example: 9e87fcf2-f571-4691-8850-77f813d6861a

UUID of the question

Responses

Response samples

Content type
application/json
{}

Queues

A queue object represents a basic organization unit of annotations. Annotations are imported to a queue either through a REST API upload endpoint or by sending an email to a related inbox. Export is also performed on a queue using export endpoint.

Queue also specifies a schema for annotations and a connector.

Annotators and viewers only see queues they are assigned to.

Queue object

id
integer

Id of the queue.

name
string <= 255 characters

Name of the queue (max. 255 characters).

url
string <uri>

URL of the queue.

workspace
string or null <uri>

Workspace in which the queue should be placed (it can be set to null, but bare in mind that it will make the queue invisible in the Rossum UI and it may cause some unexpected consequences).

connector
string or null <uri>
Default: null

Connector associated with the queue.

webhooks
Array of strings <uri> [ items <uri > ]
Deprecated
Default: []

(Deprecated) Webhooks associated with the queue (serves as an alias for hooks attribute).

hooks
Array of strings <uri> [ items <uri > ]
Default: []

Hooks associated with the queue.

schema
string <uri>

Schema which will be applied to annotations in this queue.

inbox
string or null <uri>
Default: null

Inbox for import to this queue.

users
Array of strings <uri> [ items <uri > ]
Default: []

Users associated with this queue.

session_timeout
string
Default: "01:00:00"

Time before annotation will be returned from reviewing status to to_review (timeout is evaluated every 10 minutes).

rir_url
string or null <uri>
Deprecated
Default: null

(Deprecated) Use generic_engine or dedicated_engine to set AI Core Engine.

Warning: Since April 5, 2022, rir_url and agenda in rir_params is no longer used to set AI Engine to the Queue. To change engine use attributes generic_engine and dedicated_engine. Queues created with parameter rir_url will have corresponding generic_engine or dedicated_engine set automatically.

rir_params
string or null
Default: null

URL parameters to be passed to the AI Core Engine. More specific AI Core Engine parameters influencing the extraction may be set using this field.

Publicly available parameters:

  • effective_page_count (int): Limits the extraction to the first effective_page_count pages of the document. Useful to prevent data extraction from additional pages of unrelated, but included documents. Default: 32 (pages to be extracted from a document).
  • tables (boolean): Allows disabling line item data extraction. Useful to speed up data extraction when line item details are not required, especially on long documents with large tables. Default: true (line items are being extracted).
dedicated_engine
string or null <uri>
Default: null

Dedicated engine used for processing documents uploaded to this queue. If dedicated_engine is set generic_engine must be null. If both engines are null, a default generic one gets set.

generic_engine
string or null <uri>
Default: null

Generic engine used for processing documents uploaded to this queue. If generic_engine is set dedicated_engine must be null. If both engines are null, a default generic one gets set.

object

Count of annotations per status.

default_score_threshold
number <float> [ 0 .. 1 ]
Default: 0.8

Threshold used to automatically validate field content based on AI confidence scores.

Warning: The old behavior enabled default_score_threshold set to null on queue. When threshold on queue was set to null then default value 0.975 was used. Starting from February 24, 2020 setting of default_score_threshold to null is deprecated. Due to backward compatibility if null value is passed then default value 0.8 is set to default_score_threshold.

automation_enabled
boolean
Default: false

Toggle for switching automation on/off.

automation_level
string
Default: "never"
Enum: "never" "confident" "always"

Set level of automation. always - Auto-export all documents with no validation errors. When there is an error triggered for a non-required field, such values are deleted and export is re-tried. confident - Auto-export documents with at least one validation source and no validation errors. never - Annotation is not automatically exported and must be validated in UI manually.

locale
string
Default: "en_GB"

Typical originating region of documents processed in this queue specified in the locale format. If auto option is chosen, the locale will be detected automatically if the organization group has access to Aurora engine. Otherwise, default option (en_GB) will be used.

The locale field is a hint for the AI Engine on how to resolve some ambiguous cases during data extraction, concerning e.g. date formats or decimal separators that may depend on the locale. For example, in US the typical date format is mm/dd/yyyy whilst in Europe it is dd.mm.yyyy. A date such as "12. 6. 2018" will be extracted as Jun 12 when locale is en_GB, while the same date will be extracted as Dec 6 when locale is en_US.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

use_confirmed_state
boolean
Default: false

Affects exporting - when true, confirm endpoint transitions annotation to confirmed status instead to exporting.

document_lifetime
string or null
Default: null

Data retention period -- annotations will be automatically purged this time after their creation. The format of the value is '[DD] [HH:[MM:]]ss[.uuuuuu]', e.g. 90 days retention can be set as '90 00:00:00'. Please keep in mind that purging documents in Rossum can limit its learning capabilities. This is a priced feature and has no effect unless enabled.

delete_after
string or null <date-time>
Default: null

For internal use only (When a queue is marked for its deletion it will be done after this date).

status
string
Default: "active"
Enum: "active" "deletion_requested" "deletion_in_progress" "deletion_failed"

Current status of the queue. active - This is the default status. Queue is usable. deletion_requested - Queue is marked for deletion (by calling DELETE /v1/queues/<id>). Will be asynchronously deleted after delete_after. deletion_in_progress - Queue is currently being deleted. When a queue has this status some raise conditions may occur as the related objects are being gradually deleted. deletion_failed - Something wrong happened in the process of queue deletion. The queue may be in an inconsistent state.

Please note, that document import (via upload as well as email) is disabled while the queue status is one of deletion_requested, deletion_in_progress, deletion_failed.

modified_by
string or null <uri> (modified_by)

URL of the last modifier.

modified_at
string or null <date-time> (modified_at)

Date of the last modification.

object
Default: {}

Queue UI settings.

Array of objects
Default: []

Workflows set for the queue.

{}

Create queue

Create a new queue object.

Authorizations:
BearerAuth
Request Body schema: application/json
name
required
string <= 255 characters

Name of the queue (max. 255 characters).

workspace
string or null <uri>

Workspace in which the queue should be placed (it can be set to null, but bare in mind that it will make the queue invisible in the Rossum UI and it may cause some unexpected consequences).

connector
string or null <uri>
Default: null

Connector associated with the queue.

webhooks
Array of strings <uri> [ items <uri > ]
Deprecated
Default: []

(Deprecated) Webhooks associated with the queue (serves as an alias for hooks attribute).

hooks
Array of strings <uri> [ items <uri > ]
Default: []

Hooks associated with the queue.

schema
required
string <uri>

Schema which will be applied to annotations in this queue.

inbox
string or null <uri>
Default: null

Inbox for import to this queue.

users
Array of strings <uri> [ items <uri > ]
Default: []

Users associated with this queue.

session_timeout
string
Default: "01:00:00"

Time before annotation will be returned from reviewing status to to_review (timeout is evaluated every 10 minutes).

rir_url
string or null <uri>
Deprecated
Default: null

(Deprecated) Use generic_engine or dedicated_engine to set AI Core Engine.

Warning: Since April 5, 2022, rir_url and agenda in rir_params is no longer used to set AI Engine to the Queue. To change engine use attributes generic_engine and dedicated_engine. Queues created with parameter rir_url will have corresponding generic_engine or dedicated_engine set automatically.

rir_params
string or null
Default: null

URL parameters to be passed to the AI Core Engine. More specific AI Core Engine parameters influencing the extraction may be set using this field.

Publicly available parameters:

  • effective_page_count (int): Limits the extraction to the first effective_page_count pages of the document. Useful to prevent data extraction from additional pages of unrelated, but included documents. Default: 32 (pages to be extracted from a document).
  • tables (boolean): Allows disabling line item data extraction. Useful to speed up data extraction when line item details are not required, especially on long documents with large tables. Default: true (line items are being extracted).
dedicated_engine
string or null <uri>
Default: null

Dedicated engine used for processing documents uploaded to this queue. If dedicated_engine is set generic_engine must be null. If both engines are null, a default generic one gets set.

generic_engine
string or null <uri>
Default: null

Generic engine used for processing documents uploaded to this queue. If generic_engine is set dedicated_engine must be null. If both engines are null, a default generic one gets set.

default_score_threshold
number <float> [ 0 .. 1 ]
Default: 0.8

Threshold used to automatically validate field content based on AI confidence scores.

Warning: The old behavior enabled default_score_threshold set to null on queue. When threshold on queue was set to null then default value 0.975 was used. Starting from February 24, 2020 setting of default_score_threshold to null is deprecated. Due to backward compatibility if null value is passed then default value 0.8 is set to default_score_threshold.

automation_enabled
boolean
Default: false

Toggle for switching automation on/off.

automation_level
string
Default: "never"
Enum: "never" "confident" "always"

Set level of automation. always - Auto-export all documents with no validation errors. When there is an error triggered for a non-required field, such values are deleted and export is re-tried. confident - Auto-export documents with at least one validation source and no validation errors. never - Annotation is not automatically exported and must be validated in UI manually.

locale
string
Default: "en_GB"

Typical originating region of documents processed in this queue specified in the locale format. If auto option is chosen, the locale will be detected automatically if the organization group has access to Aurora engine. Otherwise, default option (en_GB) will be used.

The locale field is a hint for the AI Engine on how to resolve some ambiguous cases during data extraction, concerning e.g. date formats or decimal separators that may depend on the locale. For example, in US the typical date format is mm/dd/yyyy whilst in Europe it is dd.mm.yyyy. A date such as "12. 6. 2018" will be extracted as Jun 12 when locale is en_GB, while the same date will be extracted as Dec 6 when locale is en_US.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

use_confirmed_state
boolean
Default: false

Affects exporting - when true, confirm endpoint transitions annotation to confirmed status instead to exporting.

document_lifetime
string or null
Default: null

Data retention period -- annotations will be automatically purged this time after their creation. The format of the value is '[DD] [HH:[MM:]]ss[.uuuuuu]', e.g. 90 days retention can be set as '90 00:00:00'. Please keep in mind that purging documents in Rossum can limit its learning capabilities. This is a priced feature and has no effect unless enabled.

object
Default: {}

Queue UI settings.

Array of objects
Default: []

Workflows set for the queue.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

List queues

Retrieve all queue objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Id of a queue.

name
string

Name of a queue.

workspace
integer <int64>

Id of a workspace.

inbox
integer <int64>

Id of an inbox.

connector
integer <int64>

Id of a connector.

webhooks
string

Ids of hooks.

hooks
string

Ids of hooks.

locale
string

Queue object locale.

dedicated_engine
integer <int64>

Id of a dedicated engine.

generic_engine
integer <int64>

Id of a generic engine.

deleting
boolean

Bool filter - queue is being deleted (delete_after is set).

ordering
string
Enum: "id" "-id" "name" "-name" "workspace" "-workspace" "connector" "-connector" "webhooks" "-webhooks" "schema" "-schema" "inbox" "-inbox" "locale" "-locale"

Result ordering. Supported ordering - id, name, workspace, connector, webhooks, schema, inbox, locale.

Responses

Request samples

curl -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  'https://example.rossum.app/api/v1/queues?workspace=7540&ordering=name'

Response samples

Content type
application/json
{}

Retrieve queue

Get a queue object.

Authorizations:
BearerAuth
path Parameters
id
required
integer <int64>

Queue ID

Responses

Request samples

curl -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  'https://example.rossum.app/api/v1/queues/8198'

Response samples

Content type
application/json
{}

Update queue

Update queue object.

Authorizations:
BearerAuth
path Parameters
id
required
integer <int64>

Queue ID

Request Body schema: application/json
name
required
string <= 255 characters

Name of the queue (max. 255 characters).

workspace
string or null <uri>

Workspace in which the queue should be placed (it can be set to null, but bare in mind that it will make the queue invisible in the Rossum UI and it may cause some unexpected consequences).

connector
string or null <uri>
Default: null

Connector associated with the queue.

webhooks
Array of strings <uri> [ items <uri > ]
Deprecated
Default: []

(Deprecated) Webhooks associated with the queue (serves as an alias for hooks attribute).

hooks
Array of strings <uri> [ items <uri > ]
Default: []

Hooks associated with the queue.

schema
required
string <uri>

Schema which will be applied to annotations in this queue.

inbox
string or null <uri>
Default: null

Inbox for import to this queue.

users
Array of strings <uri> [ items <uri > ]
Default: []

Users associated with this queue.

session_timeout
string
Default: "01:00:00"

Time before annotation will be returned from reviewing status to to_review (timeout is evaluated every 10 minutes).

rir_url
string or null <uri>
Deprecated
Default: null

(Deprecated) Use generic_engine or dedicated_engine to set AI Core Engine.

Warning: Since April 5, 2022, rir_url and agenda in rir_params is no longer used to set AI Engine to the Queue. To change engine use attributes generic_engine and dedicated_engine. Queues created with parameter rir_url will have corresponding generic_engine or dedicated_engine set automatically.

rir_params
string or null
Default: null

URL parameters to be passed to the AI Core Engine. More specific AI Core Engine parameters influencing the extraction may be set using this field.

Publicly available parameters:

  • effective_page_count (int): Limits the extraction to the first effective_page_count pages of the document. Useful to prevent data extraction from additional pages of unrelated, but included documents. Default: 32 (pages to be extracted from a document).
  • tables (boolean): Allows disabling line item data extraction. Useful to speed up data extraction when line item details are not required, especially on long documents with large tables. Default: true (line items are being extracted).
dedicated_engine
string or null <uri>
Default: null

Dedicated engine used for processing documents uploaded to this queue. If dedicated_engine is set generic_engine must be null. If both engines are null, a default generic one gets set.

generic_engine
string or null <uri>
Default: null

Generic engine used for processing documents uploaded to this queue. If generic_engine is set dedicated_engine must be null. If both engines are null, a default generic one gets set.

default_score_threshold
number <float> [ 0 .. 1 ]
Default: 0.8

Threshold used to automatically validate field content based on AI confidence scores.

Warning: The old behavior enabled default_score_threshold set to null on queue. When threshold on queue was set to null then default value 0.975 was used. Starting from February 24, 2020 setting of default_score_threshold to null is deprecated. Due to backward compatibility if null value is passed then default value 0.8 is set to default_score_threshold.

automation_enabled
boolean
Default: false

Toggle for switching automation on/off.

automation_level
string
Default: "never"
Enum: "never" "confident" "always"

Set level of automation. always - Auto-export all documents with no validation errors. When there is an error triggered for a non-required field, such values are deleted and export is re-tried. confident - Auto-export documents with at least one validation source and no validation errors. never - Annotation is not automatically exported and must be validated in UI manually.

locale
string
Default: "en_GB"

Typical originating region of documents processed in this queue specified in the locale format. If auto option is chosen, the locale will be detected automatically if the organization group has access to Aurora engine. Otherwise, default option (en_GB) will be used.

The locale field is a hint for the AI Engine on how to resolve some ambiguous cases during data extraction, concerning e.g. date formats or decimal separators that may depend on the locale. For example, in US the typical date format is mm/dd/yyyy whilst in Europe it is dd.mm.yyyy. A date such as "12. 6. 2018" will be extracted as Jun 12 when locale is en_GB, while the same date will be extracted as Dec 6 when locale is en_US.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

use_confirmed_state
boolean
Default: false

Affects exporting - when true, confirm endpoint transitions annotation to confirmed status instead to exporting.

document_lifetime
string or null
Default: null

Data retention period -- annotations will be automatically purged this time after their creation. The format of the value is '[DD] [HH:[MM:]]ss[.uuuuuu]', e.g. 90 days retention can be set as '90 00:00:00'. Please keep in mind that purging documents in Rossum can limit its learning capabilities. This is a priced feature and has no effect unless enabled.

object
Default: {}

Queue UI settings.

Array of objects
Default: []

Workflows set for the queue.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Partial update queue

Update part of queue object.

Authorizations:
BearerAuth
path Parameters
id
required
integer <int64>

Queue ID

Request Body schema: application/json
name
string <= 255 characters

Name of the queue (max. 255 characters).

workspace
string or null <uri>

Workspace in which the queue should be placed (it can be set to null, but bare in mind that it will make the queue invisible in the Rossum UI and it may cause some unexpected consequences).

connector
string or null <uri>
Default: null

Connector associated with the queue.

webhooks
Array of strings <uri> [ items <uri > ]
Deprecated
Default: []

(Deprecated) Webhooks associated with the queue (serves as an alias for hooks attribute).

hooks
Array of strings <uri> [ items <uri > ]
Default: []

Hooks associated with the queue.

schema
string <uri>

Schema which will be applied to annotations in this queue.

inbox
string or null <uri>
Default: null

Inbox for import to this queue.

users
Array of strings <uri> [ items <uri > ]
Default: []

Users associated with this queue.

session_timeout
string
Default: "01:00:00"

Time before annotation will be returned from reviewing status to to_review (timeout is evaluated every 10 minutes).

rir_url
string or null <uri>
Deprecated
Default: null

(Deprecated) Use generic_engine or dedicated_engine to set AI Core Engine.

Warning: Since April 5, 2022, rir_url and agenda in rir_params is no longer used to set AI Engine to the Queue. To change engine use attributes generic_engine and dedicated_engine. Queues created with parameter rir_url will have corresponding generic_engine or dedicated_engine set automatically.

rir_params
string or null
Default: null

URL parameters to be passed to the AI Core Engine. More specific AI Core Engine parameters influencing the extraction may be set using this field.

Publicly available parameters:

  • effective_page_count (int): Limits the extraction to the first effective_page_count pages of the document. Useful to prevent data extraction from additional pages of unrelated, but included documents. Default: 32 (pages to be extracted from a document).
  • tables (boolean): Allows disabling line item data extraction. Useful to speed up data extraction when line item details are not required, especially on long documents with large tables. Default: true (line items are being extracted).
dedicated_engine
string or null <uri>
Default: null

Dedicated engine used for processing documents uploaded to this queue. If dedicated_engine is set generic_engine must be null. If both engines are null, a default generic one gets set.

generic_engine
string or null <uri>
Default: null

Generic engine used for processing documents uploaded to this queue. If generic_engine is set dedicated_engine must be null. If both engines are null, a default generic one gets set.

default_score_threshold
number <float> [ 0 .. 1 ]
Default: 0.8

Threshold used to automatically validate field content based on AI confidence scores.

Warning: The old behavior enabled default_score_threshold set to null on queue. When threshold on queue was set to null then default value 0.975 was used. Starting from February 24, 2020 setting of default_score_threshold to null is deprecated. Due to backward compatibility if null value is passed then default value 0.8 is set to default_score_threshold.

automation_enabled
boolean
Default: false

Toggle for switching automation on/off.

automation_level
string
Default: "never"
Enum: "never" "confident" "always"

Set level of automation. always - Auto-export all documents with no validation errors. When there is an error triggered for a non-required field, such values are deleted and export is re-tried. confident - Auto-export documents with at least one validation source and no validation errors. never - Annotation is not automatically exported and must be validated in UI manually.

locale
string
Default: "en_GB"

Typical originating region of documents processed in this queue specified in the locale format. If auto option is chosen, the locale will be detected automatically if the organization group has access to Aurora engine. Otherwise, default option (en_GB) will be used.

The locale field is a hint for the AI Engine on how to resolve some ambiguous cases during data extraction, concerning e.g. date formats or decimal separators that may depend on the locale. For example, in US the typical date format is mm/dd/yyyy whilst in Europe it is dd.mm.yyyy. A date such as "12. 6. 2018" will be extracted as Jun 12 when locale is en_GB, while the same date will be extracted as Dec 6 when locale is en_US.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

use_confirmed_state
boolean
Default: false

Affects exporting - when true, confirm endpoint transitions annotation to confirmed status instead to exporting.

document_lifetime
string or null
Default: null

Data retention period -- annotations will be automatically purged this time after their creation. The format of the value is '[DD] [HH:[MM:]]ss[.uuuuuu]', e.g. 90 days retention can be set as '90 00:00:00'. Please keep in mind that purging documents in Rossum can limit its learning capabilities. This is a priced feature and has no effect unless enabled.

object
Default: {}

Queue UI settings.

Array of objects
Default: []

Workflows set for the queue.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Delete queue

Delete queue object. Calling this endpoint will schedule the queue to be asynchronously deleted.

Authorizations:
BearerAuth
path Parameters
id
required
integer <int64>

Queue ID

query Parameters
delete_after
string <duration>
Default: "24:00:00"

The queue deletion will be postponed by the given time delta.

Responses

Request samples

curl -X DELETE -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  'https://example.rossum.app/api/v1/queues/8236'

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Create queue from template

Create new queue object from template organization.

Authorizations:
BearerAuth
query Parameters
legacy
boolean

If you want to create queue from template with legacy engines. Otherwise the next generation engine will be created.

Request Body schema: application/json
required
name
required
string

Name of a queue.

template_name
required
string

Template to use for new queue.

workspace
required
string <uri>

Id of a workspace.

include_documents
boolean

Whether to copy documents from the template queue.

engine
string <uri>

Engine to be attached to the queue.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Duplicate queue

Duplicate a queue object.

Authorizations:
BearerAuth
path Parameters
id
required
integer <int64>

Queue ID

Request Body schema: application/json
required
name
required
string

Name of the duplicated queue.

copy_extensions_settings
boolean
Default: true

Whether to copy hooks.

copy_email_settings
boolean
Default: true

Whether to copy email notifications settings.

copy_delete_recommendations
boolean
Default: true

Whether to copy delete recommendations.

copy_automation_settings
boolean
Default: true

Whether to copy automation level, automation settings and automation_enabled queue settings.

copy_permissions
boolean
Default: true

Whether to copy users and memberships.

copy_rules_and_actions
boolean
Default: true

Whether to copy rules.

Responses

Request samples

Content type
application/json
{
  • "name": "Invoice Processing - ACME Corp (Copy)",
  • "copy_extensions_settings": true,
  • "copy_email_settings": true,
  • "copy_delete_recommendations": true,
  • "copy_automation_settings": true,
  • "copy_permissions": true,
  • "copy_rules_and_actions": true
}

Response samples

Content type
application/json
{}

Export annotations

Export annotations from the queue in XML, CSV, JSON or XLSX format.

Output format is negotiated by Accept header or format parameter. Supported formats are: csv, xml, xlsx and json.

Calling GET will give you results for all the annotations with any of the selected status.

Authorizations:
BearerAuth
path Parameters
id
required
integer <int64>

Queue ID

query Parameters
format
string
Enum: "csv" "xml" "json" "xlsx"

Output format.

columns
string

Columns to include in CSV/XLSX output (comma-separated schema_ids and meta-columns).

prepend_columns
string

Columns to prepend at the beginning of CSV/XLSX output.

append_columns
string

Columns to append at the end of CSV/XLSX output.

delimiter
string
Default: ","

One-character string used to separate fields in CSV.

quote_char
string
Default: "\""

One-character string used to quote fields containing special characters in CSV.

quoting
string
Enum: "quote_minimal" "quote_none" "quote_all" "quote_non_numeric"

Controls when quotes should be generated in CSV.

escape_char
string

One-character string used by the writer to escape the delimiter in CSV.

id
integer <int64>

Id of a queue.

status
string

Annotation status filter.

modifier
integer <int64>

User id filter.

arrived_at_before
string <date-time>

ISO 8601 timestamp filter.

arrived_at_after
string <date-time>

ISO 8601 timestamp filter.

exported_at_before
string <date-time>

ISO 8601 timestamp filter.

exported_at_after
string <date-time>

ISO 8601 timestamp filter.

export_failed_at_before
string <date-time>

ISO 8601 timestamp filter.

export_failed_at_after
string <date-time>

ISO 8601 timestamp filter.

page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

search
string

Search filter (limited to 10,000 results).

Responses

Request samples

curl -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  'https://example.rossum.app/api/v1/queues/8236/export?format=csv&columns=meta_file_name,document_id,date_issue,sender_name,amount_total&id=315777,315778'

Response samples

Content type
{ }

Export annotations

Export annotations from the queue in XML, CSV, JSON or XLSX format.

Calling POST is useful if you are using confirmed state (queue.use_confirmed_state = true). Without specifying to_status, annotations will stay in their current status. If called on annotations that are already in exporting or exported status, POST call will only download the data, it will not move the annotations to a different state.

Authorizations:
BearerAuth
path Parameters
id
required
integer <int64>

Queue ID

query Parameters
format
string
Enum: "csv" "xml" "json" "xlsx"

Output format.

to_status
string
Enum: "exporting" "exported"

Status of annotations under export is switched to defined to_status state. This parameter is only valid with POST method, status can be changed only to exporting or exported. Annotations with current status exported or exporting are left untouched.

columns
string

Columns to include in CSV/XLSX output (comma-separated schema_ids and meta-columns).

prepend_columns
string

Columns to prepend at the beginning of CSV/XLSX output.

append_columns
string

Columns to append at the end of CSV/XLSX output.

delimiter
string
Default: ","

One-character string used to separate fields in CSV.

quote_char
string
Default: "\""

One-character string used to quote fields containing special characters in CSV.

quoting
string
Enum: "quote_minimal" "quote_none" "quote_all" "quote_non_numeric"

Controls when quotes should be generated in CSV.

escape_char
string

One-character string used by the writer to escape the delimiter in CSV.

id
integer <int64>

Id of a queue.

status
string

Annotation status filter.

modifier
integer <int64>

User id filter.

arrived_at_before
string <date-time>

ISO 8601 timestamp filter.

arrived_at_after
string <date-time>

ISO 8601 timestamp filter.

exported_at_before
string <date-time>

ISO 8601 timestamp filter.

exported_at_after
string <date-time>

ISO 8601 timestamp filter.

export_failed_at_before
string <date-time>

ISO 8601 timestamp filter.

export_failed_at_after
string <date-time>

ISO 8601 timestamp filter.

page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

search
string

Search filter (limited to 10,000 results).

Responses

Request samples

curl -X POST -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  'https://example.rossum.app/api/v1/queues/8236/export?to_status=exporting&status=confirmed'

Response samples

Content type
{ }

Import document (deprecated) Deprecated

Deprecated: Please note that this upload endpoint is deprecated in favor of create upload endpoint.

Uploads a document to the queue (starting in the importing state). This creates a document object and an empty annotation object.

The file can be sent as a part of multipart/form-data or, alternatively, in the request body. Multiple files upload is supported, the total size of the data uploaded may not exceed 40 MB. UTF-8 filenames are supported.

You can also specify additional properties using form field:

  • metadata could be passed using metadata form field. Metadata will be set to newly created annotation object.
  • values could be passed using values form field. It may be used to initialize datapoint values by setting the value of rir_field_names in the schema.

Upload endpoint also supports basic authentication to enable easy integration with third-party systems.

Authorizations:
BearerAuthBasicAuth
path Parameters
id
required
integer <int64>

Queue ID

Request Body schema:
content
Array of strings <binary> [ items <binary > ]

Files to upload.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

values
object

Values to initialize datapoint values.

Responses

Request samples

curl -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  -F content=@document.pdf \
  'https://example.rossum.app/api/v1/queues/8236/upload'

Response samples

Content type
application/json

Import document with filename (deprecated) Deprecated

Deprecated: Please note that this upload endpoint is deprecated in favor of create upload endpoint.

Uploads a document to the queue with filename specified in URL (starting in the importing state). This creates a document object and an empty annotation object.

UTF-8 filenames must be URL encoded.

Upload endpoint also supports basic authentication to enable easy integration with third-party systems.

Authorizations:
BearerAuthBasicAuth
path Parameters
id
required
integer <int64>

Queue ID

filename
required
string

Filename for the uploaded document (UTF-8 filename must be URL encoded)

Request Body schema: application/octet-stream
string <binary>

Responses

Response samples

Content type
application/json

Retrieve suggested email recipients

Retrieves suggested email recipients depending on Queues suggested recipients settings.

Authorizations:
BearerAuth
path Parameters
id
required
integer <int64>

Queue ID

Request Body schema: application/json
required
annotations
Array of strings <uri> [ items <uri > ]

List of annotation urls.

email_threads
Array of strings <uri> [ items <uri > ]

List of email thread urls.

Responses

Request samples

Response samples

Content type
application/json
{
  • "results": [
    • {
      • "source": "email_header",
      • "email": "don.joe@corp.us",
      • "name": "Don Joe"
      }
    ]
}

Start validation

Warning: This endpoint is INTERNAL and may change in the future.

Start reviewing the next available annotation from the queue by the calling user.

Authorizations:
BearerAuth
path Parameters
id
required
integer <int64>

Queue ID

Request Body schema: application/json
annotation_ids
Array of integers

List of annotation ids to select from (optional).

statuses
Array of strings

List of allowed statuses (optional).

Responses

Request samples

Content type
application/json
{
  • "annotation_ids": [
    • 315123,
    • 315124,
    • 315125
    ],
  • "statuses": [
    • "to_review",
    • "reviewing"
    ]
}

Response samples

Content type
application/json
{}

Relations

A relation object introduces common relations between annotations. An annotation could be related to one or more other annotations and it may belong to several relations at the same time.

Relation types:

  • edit relation is created after editing annotation in user interface (rotation or split of the document). The original annotation is set to parent attribute and newly created annotations are set to annotations attribute. To find all siblings of edited annotation see filters on annotation
  • attachment is a relationship representing the state that one or more documents are attachments to another document. key is null in this case. Feature must be enabled.
  • duplicate relation is created after importing the same document that already exists in Rossum for current organization. If duplicate relation already exists then corresponding annotation is added to existing relation. key of duplicate relation is set to hash of document content. To find all duplicates of the annotation filter annotations with appropriate hash in relation key. See filters on annotation

Note: The resource supports ETag HTTP header handling.

Relation object

id
integer

Id of the relation

type
string
Default: "edit"
Enum: "edit" "attachment" "duplicate"

Type of relationship. Possible values are edit, attachment or duplicate.

  • edit relation is created after editing annotation in user interface (rotation or split of the document)
  • attachment is a relationship representing the state that one or more documents are attachments to another document
  • duplicate relation is created after importing the same document that already exists in Rossum for current organization
key
string or null

Key used to distinguish several instances of the same type.

  • For attachment relations, this is null
  • For duplicate relations, this is set to a hash of document content
  • For edit relations, this is typically null
parent
string or null <uri>

URL of the parent annotation in case of 1-M relationship

annotations
Array of strings <uri> [ items <uri > ]

List of related annotations

url
string <uri>

URL of the relation

Create relation

Create a new relation object.

Authorizations:
BearerAuth
Request Body schema: application/json
type
required
string
Default: "edit"
Enum: "edit" "attachment" "duplicate"

Type of relationship. Possible values are edit, attachment or duplicate.

  • edit relation is created after editing annotation in user interface (rotation or split of the document)
  • attachment is a relationship representing the state that one or more documents are attachments to another document
  • duplicate relation is created after importing the same document that already exists in Rossum for current organization
key
string or null

Key used to distinguish several instances of the same type.

  • For attachment relations, this is null
  • For duplicate relations, this is set to a hash of document content
  • For edit relations, this is typically null
parent
string or null <uri>

URL of the parent annotation in case of 1-M relationship

annotations
required
Array of strings <uri> [ items <uri > ]

List of related annotations

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json

List relations

Retrieve all relation objects (annotations from queues not with active status are excluded).

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

type
string
Enum: "edit" "attachment" "duplicate"

Relation type. Multiple values may be separated using a comma.

parent
integer <int64>

Id of parent annotation. Multiple values may be separated using a comma.

key
string

Relation key

annotation
integer <int64>

Id of related annotation. Multiple values may be separated using a comma.

ordering
string
Enum: "type" "-type" "parent" "-parent" "key" "-key"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve relation

Get a relation object.

Authorizations:
BearerAuth
path Parameters
relationId
required
integer <int64>

A unique integer value identifying this relation.

Responses

Response samples

Content type
application/json

Update relation

Update relation object.

Authorizations:
BearerAuth
path Parameters
relationId
required
integer <int64>

A unique integer value identifying this relation.

Request Body schema: application/json
type
required
string
Default: "edit"
Enum: "edit" "attachment" "duplicate"

Type of relationship. Possible values are edit, attachment or duplicate.

  • edit relation is created after editing annotation in user interface (rotation or split of the document)
  • attachment is a relationship representing the state that one or more documents are attachments to another document
  • duplicate relation is created after importing the same document that already exists in Rossum for current organization
key
string or null

Key used to distinguish several instances of the same type.

  • For attachment relations, this is null
  • For duplicate relations, this is set to a hash of document content
  • For edit relations, this is typically null
parent
string or null <uri>

URL of the parent annotation in case of 1-M relationship

annotations
required
Array of strings <uri> [ items <uri > ]

List of related annotations

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json

Partial update relation

Update part of relation object.

Authorizations:
BearerAuth
path Parameters
relationId
required
integer <int64>

A unique integer value identifying this relation.

Request Body schema: application/json
type
string
Default: "edit"
Enum: "edit" "attachment" "duplicate"

Type of relationship. Possible values are edit, attachment or duplicate.

  • edit relation is created after editing annotation in user interface (rotation or split of the document)
  • attachment is a relationship representing the state that one or more documents are attachments to another document
  • duplicate relation is created after importing the same document that already exists in Rossum for current organization
key
string or null

Key used to distinguish several instances of the same type.

  • For attachment relations, this is null
  • For duplicate relations, this is set to a hash of document content
  • For edit relations, this is typically null
parent
string or null <uri>

URL of the parent annotation in case of 1-M relationship

annotations
Array of strings <uri> [ items <uri > ]

List of related annotations

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json

Delete relation

Delete relation object.

Authorizations:
BearerAuth
path Parameters
relationId
required
integer <int64>

A unique integer value identifying this relation.

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Rules

Rule object represents arbitrary business rules added to schema objects.

Note: 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).

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

Rule actions

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

Attribute Type Read-only Description
id string no Rule action ID. Needs to be unique within the Rule's actions.
enabled bool no If false the action is disabled (default: true).
type string no See the following for the list of possible actions.
payload object no See the following for the payload structure for each action.
event object no Actions 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:

Attribute Type Description
type string One of: error, warning, info.
content string Message content to be displayed.
schema_id Optional[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:

Attribute Type Description
content string Automation blocker content to be displayed.
schema_id Optional[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:

Attribute Type Description
method string Possible 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:

Attribute Type Description
reimport Optional[bool] Flag that controls whether the annotation will be reimported during the action execution.
queue_id integer ID 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:

Attribute Type Description
labels list[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:

Attribute Type Description
labels list[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:

Attribute Type Description
labels list[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:

Attribute Type Description
schema_ids List[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:

Attribute Type Description
schema_ids List[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:

Attribute Type Description
schema_ids List[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:

Attribute Type Description
schema_id string Schema 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.

Attribute Type Description Required
email_template string Email template URL. Yes
attach_document boolean When 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:

Attribute Type Description Required
to List[string] List of recipients. Yes
subject string Subject of the email. Yes
body string Body of the email. Yes
cc List[string] List of cc. No
bcc List[string] List of bcc. No

Rule object

id
integer

Rule object ID.

url
string <uri>

Rule object URL.

name
string

Name of the rule.

enabled
boolean
Default: true

If false the rule is disabled.

organization
string <uri>

Organization the rule belongs to.

schema
string <uri>

Schema the rule belongs to.

trigger_condition
string
Default: "True"

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

created_by
string <uri>

User who created the rule.

created_at
string <date-time>

Timestamp of the rule creation.

modified_by
string or null <uri> (modified_by)

URL of the last modifier.

modified_at
string or null <date-time> (modified_at)

Date of the last modification.

rule_template
string or null <uri>

Rule template the rule was created from.

synchronized_from_template
boolean
Default: false

Signals whether the rule is automatically updated from the linked template.

Array of action_show_message (object) or action_add_automation_blocker (object) or action_change_status (object) or action_change_queue (object) or action_add_label (object) or action_remove_label (object) or action_add_remove_label_base (object) or action_show_field (object) or action_hide_field (object) or action_show_hide_field_base (object) or action_add_validation_source (object) or action_send_email (object) or action_custom (object) (Rule action)

List of the rule action objects.

{}

Create rule Beta

Create a new rule object.

Authorizations:
BearerAuth
Request Body schema: application/json
name
required
string

Name of the rule.

enabled
boolean
Default: true

If false the rule is disabled.

schema
required
string <uri>

Schema the rule belongs to.

trigger_condition
string
Default: "True"

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

created_by
string <uri>

User who created the rule.

created_at
string <date-time>

Timestamp of the rule creation.

rule_template
string or null <uri>

Rule template the rule was created from.

synchronized_from_template
boolean
Default: false

Signals whether the rule is automatically updated from the linked template.

Array of action_show_message (object) or action_add_automation_blocker (object) or action_change_status (object) or action_change_queue (object) or action_add_label (object) or action_remove_label (object) or action_add_remove_label_base (object) or action_show_field (object) or action_hide_field (object) or action_show_hide_field_base (object) or action_add_validation_source (object) or action_send_email (object) or action_custom (object) (Rule action)

List of the rule action objects.

Responses

Request samples

Content type
application/json
{
  • "name": "rule",
  • "enabled": true,
  • "trigger_condition": "True",
  • "created_at": "2022-01-01T15:02:25.653324Z",
  • "rule_template": null,
  • "synchronized_from_template": false,
  • "actions": [
    • {
      • "id": "f3c43f16-b5f1-4ac8-b789-17d4c26463d7",
      • "enabled": true,
      • "type": "show_message",
      • "event": "validation",
      • "payload": {
        }
      }
    ]
}

Response samples

Content type
application/json
{}

List rules Beta

List all rules objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer

ID of the rule to filter by.

queue
Array of integers

List rules by queue ids.

enabled
boolean

List only enabled/disabled rules.

linked
boolean

List only linked/unlinked rules (linked rules have more than one queue connected).

actions
Array of strings

Comma separated list of action types (e.g. show_message,change_queue).

schema
integer

ID of the schema to filter rules by.

rule_template
integer

ID of the rule template to filter rules by.

name
string

Name of the rule to filter by.

organization
integer

ID of the organization to filter rules by.

ordering
string
Enum: "id" "-id" "name" "-name" "organization" "-organization"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve rule Beta

Retrieve a rule object.

Authorizations:
BearerAuth
path Parameters
ruleId
required
integer

A unique integer value identifying this rule.

Responses

Response samples

Content type
application/json
{}

Update rule Beta

Update rule object.

Authorizations:
BearerAuth
path Parameters
ruleId
required
integer

A unique integer value identifying this rule.

Request Body schema: application/json
name
required
string

Name of the rule.

enabled
boolean
Default: true

If false the rule is disabled.

schema
required
string <uri>

Schema the rule belongs to.

trigger_condition
string
Default: "True"

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

created_by
string <uri>

User who created the rule.

created_at
string <date-time>

Timestamp of the rule creation.

rule_template
string or null <uri>

Rule template the rule was created from.

synchronized_from_template
boolean
Default: false

Signals whether the rule is automatically updated from the linked template.

Array of action_show_message (object) or action_add_automation_blocker (object) or action_change_status (object) or action_change_queue (object) or action_add_label (object) or action_remove_label (object) or action_add_remove_label_base (object) or action_show_field (object) or action_hide_field (object) or action_show_hide_field_base (object) or action_add_validation_source (object) or action_send_email (object) or action_custom (object) (Rule action)

List of the rule action objects.

Responses

Request samples

Content type
application/json
{
  • "name": "rule",
  • "enabled": true,
  • "trigger_condition": "True",
  • "created_at": "2022-01-01T15:02:25.653324Z",
  • "rule_template": null,
  • "synchronized_from_template": false,
  • "actions": [
    • {
      • "id": "f3c43f16-b5f1-4ac8-b789-17d4c26463d7",
      • "enabled": true,
      • "type": "show_message",
      • "event": "validation",
      • "payload": {
        }
      }
    ]
}

Response samples

Content type
application/json
{}

Partial update rule Beta

Update part of rule object.

Authorizations:
BearerAuth
path Parameters
ruleId
required
integer

A unique integer value identifying this rule.

Request Body schema: application/json
name
string

Name of the rule.

enabled
boolean
Default: true

If false the rule is disabled.

schema
string <uri>

Schema the rule belongs to.

trigger_condition
string
Default: "True"

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

created_by
string <uri>

User who created the rule.

created_at
string <date-time>

Timestamp of the rule creation.

rule_template
string or null <uri>

Rule template the rule was created from.

synchronized_from_template
boolean
Default: false

Signals whether the rule is automatically updated from the linked template.

Array of action_show_message (object) or action_add_automation_blocker (object) or action_change_status (object) or action_change_queue (object) or action_add_label (object) or action_remove_label (object) or action_add_remove_label_base (object) or action_show_field (object) or action_hide_field (object) or action_show_hide_field_base (object) or action_add_validation_source (object) or action_send_email (object) or action_custom (object) (Rule action)

List of the rule action objects.

Responses

Request samples

Content type
application/json
{
  • "name": "rule",
  • "enabled": true,
  • "trigger_condition": "True",
  • "created_at": "2022-01-01T15:02:25.653324Z",
  • "rule_template": null,
  • "synchronized_from_template": false,
  • "actions": [
    • {
      • "id": "f3c43f16-b5f1-4ac8-b789-17d4c26463d7",
      • "enabled": true,
      • "type": "show_message",
      • "event": "validation",
      • "payload": {
        }
      }
    ]
}

Response samples

Content type
application/json
{}

Delete rule Beta

Delete rule object.

Authorizations:
BearerAuth
path Parameters
ruleId
required
integer

A unique integer value identifying this rule.

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Schemas

A schema object specifies the set of datapoints that are extracted from the document. For more information see Document Schema.

Schema content consists of a list of section objects. Each section represents a logical part of the document, such as amounts or vendor info. Schema allows multiple sections, and there should be at least one section in the schema.

Rossum schema supports data fields with single values (datapoint), fields with multiple values (multivalue) or tuples of fields (tuple). At the topmost level, each schema consists of sections, which may either directly contain actual data fields (datapoints) or use nested multivalues and tuples as containers for single datapoints.

The supported shapes are:

  • simple: atomic datapoints of type number, string, date or enum
  • list: simple datapoint within a multivalue
  • tabular: simple datapoint within a "multivalue tuple" (a multivalue list containing a tuple for every row)

All schema objects use discriminators based on the 'category' field for proper type identification.

Schema object

id
integer

Id of the schema.

name
string

Name of the schema (not visible in UI).

url
string <uri>

URL of the schema.

queues
Array of strings <uri> [ items <uri > ]

List of queues that use schema object.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

modified_by
string or null <uri> (modified_by)

URL of the last modifier.

modified_at
string or null <date-time> (modified_at)

Date of the last modification.

Array of objects (section)

Schema content: list of sections.

{
  • "id": 31336,
  • "name": "Basic Schema",
  • "metadata": {
    • "some_key": "some_value"
    },
  • "modified_at": "2020-01-01T10:08:03.856648Z",
  • "content": [
    • {
      • "category": "section",
      • "id": "invoice_info_section",
      • "label": "Basic information",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "line_items_section",
      • "label": "Line items",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "tax_details_section",
      • "label": "Tax details",
      • "icon": null,
      • "children": [
        ]
      }
    ]
}

Create schema

Create a new schema object.

Authorizations:
BearerAuth
Request Body schema: application/json
name
required
string

Name of the schema (not visible in UI).

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

required
Array of objects (section_w_required)

Schema content: list of sections.

Responses

Request samples

Content type
application/json
{
  • "name": "Basic Schema",
  • "metadata": {
    • "some_key": "some_value"
    },
  • "content": [
    • {
      • "category": "section",
      • "id": "invoice_info_section",
      • "label": "Basic information",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "line_items_section",
      • "label": "Line items",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "tax_details_section",
      • "label": "Tax details",
      • "icon": null,
      • "children": [
        ]
      }
    ]
}

Response samples

Content type
application/json
{
  • "id": 31336,
  • "name": "Basic Schema",
  • "metadata": {
    • "some_key": "some_value"
    },
  • "modified_at": "2020-01-01T10:08:03.856648Z",
  • "content": [
    • {
      • "category": "section",
      • "id": "invoice_info_section",
      • "label": "Basic information",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "line_items_section",
      • "label": "Line items",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "tax_details_section",
      • "label": "Tax details",
      • "icon": null,
      • "children": [
        ]
      }
    ]
}

List schemas

Retrieve all schema objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

name
string

Name filter

queue
integer <int64>

Queue filter

ordering
string
Enum: "id" "-id"

Result ordering.

Responses

Response samples

Content type
application/json
{
  • "pagination": {
    • "total": 1,
    • "total_pages": 1,
    • "next": null,
    • "previous": null
    },
  • "results": [
    • {
      • "id": 31336,
      • "name": "Basic Schema",
      • "metadata": {
        },
      • "modified_at": "2020-01-01T10:08:03.856648Z",
      • "content": [
        ]
      }
    ]
}

Retrieve schema

Get a schema object.

Authorizations:
BearerAuth
path Parameters
schemaId
required
integer <int64>
Example: 31336

Schema ID

Responses

Response samples

Content type
application/json
{
  • "id": 31336,
  • "name": "Basic Schema",
  • "metadata": {
    • "some_key": "some_value"
    },
  • "modified_at": "2020-01-01T10:08:03.856648Z",
  • "content": [
    • {
      • "category": "section",
      • "id": "invoice_info_section",
      • "label": "Basic information",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "line_items_section",
      • "label": "Line items",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "tax_details_section",
      • "label": "Tax details",
      • "icon": null,
      • "children": [
        ]
      }
    ]
}

Update schema

Update schema object. See Updating schema for more details about consequences of schema update.

Authorizations:
BearerAuth
path Parameters
schemaId
required
integer <int64>
Example: 31336

Schema ID

Request Body schema: application/json
name
required
string

Name of the schema (not visible in UI).

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

required
Array of objects (section_w_required)

Schema content: list of sections.

Responses

Request samples

Content type
application/json
{
  • "name": "Basic Schema",
  • "metadata": {
    • "some_key": "some_value"
    },
  • "content": [
    • {
      • "category": "section",
      • "id": "invoice_info_section",
      • "label": "Basic information",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "line_items_section",
      • "label": "Line items",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "tax_details_section",
      • "label": "Tax details",
      • "icon": null,
      • "children": [
        ]
      }
    ]
}

Response samples

Content type
application/json
{
  • "id": 31336,
  • "name": "Basic Schema",
  • "metadata": {
    • "some_key": "some_value"
    },
  • "modified_at": "2020-01-01T10:08:03.856648Z",
  • "content": [
    • {
      • "category": "section",
      • "id": "invoice_info_section",
      • "label": "Basic information",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "line_items_section",
      • "label": "Line items",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "tax_details_section",
      • "label": "Tax details",
      • "icon": null,
      • "children": [
        ]
      }
    ]
}

Partial update schema

Update part of schema object. See Updating schema for more details about consequences of schema update.

Warning: This request can only change top-level properties of the schema object. Partial update of schema content is not available. To update a part of the schema content, send the whole schema content in the request, containing the new changes you would like to apply to the original schema.

Authorizations:
BearerAuth
path Parameters
schemaId
required
integer <int64>
Example: 31336

Schema ID

Request Body schema: application/json
name
string

Name of the schema (not visible in UI).

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

Array of objects (section)

Schema content: list of sections.

Responses

Request samples

Content type
application/json
{
  • "name": "Basic Schema",
  • "metadata": {
    • "some_key": "some_value"
    },
  • "content": [
    • {
      • "category": "section",
      • "id": "invoice_info_section",
      • "label": "Basic information",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "line_items_section",
      • "label": "Line items",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "tax_details_section",
      • "label": "Tax details",
      • "icon": null,
      • "children": [
        ]
      }
    ]
}

Response samples

Content type
application/json
{
  • "id": 31336,
  • "name": "Basic Schema",
  • "metadata": {
    • "some_key": "some_value"
    },
  • "modified_at": "2020-01-01T10:08:03.856648Z",
  • "content": [
    • {
      • "category": "section",
      • "id": "invoice_info_section",
      • "label": "Basic information",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "line_items_section",
      • "label": "Line items",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "tax_details_section",
      • "label": "Tax details",
      • "icon": null,
      • "children": [
        ]
      }
    ]
}

Delete schema

Delete schema object.

Warning: In case the schema is linked to some objects, like queue or annotation, the deletion is not possible and the request will fail with 409 status code.

Authorizations:
BearerAuth
path Parameters
schemaId
required
integer <int64>
Example: 31336

Schema ID

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Create schema from template

Create new schema object from template organization, see available templates in organization.

Authorizations:
BearerAuth
Request Body schema: application/json
name
required
string

Name of the new schema

template_name
required
string

Name of the template to use

Responses

Request samples

Content type
application/json
{
  • "name": "ACME Corp Invoice Schema",
  • "template_name": "EU Invoice Template"
}

Response samples

Content type
application/json
{
  • "id": 31336,
  • "name": "Basic Schema",
  • "metadata": {
    • "some_key": "some_value"
    },
  • "modified_at": "2020-01-01T10:08:03.856648Z",
  • "content": [
    • {
      • "category": "section",
      • "id": "invoice_info_section",
      • "label": "Basic information",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "line_items_section",
      • "label": "Line items",
      • "icon": null,
      • "children": [
        ]
      },
    • {
      • "category": "section",
      • "id": "tax_details_section",
      • "label": "Tax details",
      • "icon": null,
      • "children": [
        ]
      }
    ]
}

Validate schema

Validate schema object, check for errors.

Authorizations:
BearerAuth
Request Body schema: application/json
content
required
Array of objects

Schema content to validate

id
integer

Schema ID (required for Aurora engines)

url
string <uri>

Schema URL (required for Aurora engines)

Responses

Request samples

Content type
application/json
{
  • "content": [
    • {
      • "category": "section",
      • "id": "invoice_details",
      • "label": "Invoice Details",
      • "children": [
        ]
      }
    ],
  • "id": 12345,
}

Response samples

Content type
application/json
{ }

Suggested Edits

A suggested edit object contains splittings of incoming document suggested by the AI engine.

Suggested edit objects are created automatically during document import.

Suggested Edit object

id
integer <int64>

ID of the suggested edit.

url
string <url>

URL of the suggested edit.

annotation
string <url>

Annotation that suggested edit is related to.

Array of objects (document_split_descriptor)

List of document split descriptors.

{}

Create suggested edit

Create a new suggested edit object.

Authorizations:
BearerAuth
Request Body schema: application/json
required
annotation
required
string <url>

Annotation that suggested edit is related to.

required
Array of objects (document_split_descriptor)

List of document split descriptors.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

List suggested edits

Retrieve all suggested edit objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

annotation
integer <int64>

Annotation filter

ordering
string
Enum: "annotation" "-annotation"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve suggested edit

Get a suggested edit object.

Authorizations:
BearerAuth
path Parameters
suggestedEditId
required
integer <int64>

ID of the suggested edit

Responses

Response samples

Content type
application/json
{}

Update suggested edit

Update suggested edit object.

Authorizations:
BearerAuth
path Parameters
suggestedEditId
required
integer <int64>

ID of the suggested edit

Request Body schema: application/json
required
annotation
required
string <url>

Annotation that suggested edit is related to.

required
Array of objects (document_split_descriptor)

List of document split descriptors.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Partial update suggested edit

Update part of suggested edit object.

Authorizations:
BearerAuth
path Parameters
suggestedEditId
required
integer <int64>

ID of the suggested edit

Request Body schema: application/json
required
annotation
string <url>

Annotation that suggested edit is related to.

Array of objects (document_split_descriptor)

List of document split descriptors.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Delete suggested edit

Delete suggested edit object.

Authorizations:
BearerAuth
path Parameters
suggestedEditId
required
integer <int64>

ID of the suggested edit

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Survey Templates

A Survey template object represents a collection of questions related to a survey.

Warning: Please note that Survey Template is an internal API and can be changed without notice.

Survey Template object object

uuid
string <uuid>

UUID of the survey template

url
string <uri>

URL of the survey template

name
string

Name of the survey template

Array of objects (Question object)

List of question objects

{}

List survey templates

Retrieve all survey template objects.

Warning: Please note that Survey Template is an internal API and can be changed without notice.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

Responses

Response samples

Content type
application/json
{}

Retrieve survey template

Get a survey template object.

Warning: Please note that Survey Template is an internal API and can be changed without notice.

Authorizations:
BearerAuth
path Parameters
surveyTemplateId
required
string <uuid>
Example: 4d73ac4b-bd1a-4b6d-b274-4e976a382b5b

UUID of the survey template

Responses

Response samples

Content type
application/json
{}

Surveys

A Survey object represents a collection of answers and metadata related to the survey.

Warning: Please note that Survey is an internal API and can be changed without notice._

Survey object

id
integer

Id of the survey

url
string <uri>

URL of the survey

organization
string <uri>

Related organization

template
string <uri>

Related survey template

created_at
string <date-time>

Timestamp of object's creation

modifier
string <uri>

User that last modified the annotation

modified_by
string or null <uri> (modified_by)

URL of the last modifier.

modified_at
string or null <date-time> (modified_at)

Date of the last modification.

additional_data
object
Default: {}

Client data

required
Array of objects (answer)

Answers linked to the questions. The number of the answers can't be changed.

{}

List surveys

Retrieve all survey objects.

Warning: Please note that Survey is an internal API and can be changed without notice.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

template_uuid
string <uuid>
Example: template_uuid=4d73ac4b-bd1a-4b6d-b274-4e976a382b5b

UUID of the survey template to filter by

ordering
string
Enum: "id" "-id" "modified_at" "-modified_at"

Result ordering

Responses

Response samples

Content type
application/json
{}

Retrieve survey object

Get a survey object.

Warning: Please note that Survey is an internal API and can be changed without notice.

Authorizations:
BearerAuth
path Parameters
surveyId
required
integer <int64>
Example: 456

Survey ID

Responses

Response samples

Content type
application/json
{}

Update survey

Update survey object.

Warning: Please note that Survey is an internal API and can be changed without notice.

Authorizations:
BearerAuth
path Parameters
surveyId
required
integer <int64>
Example: 456

Survey ID

Request Body schema: application/json
additional_data
object
Default: {}

Client data

required
Array of objects (answer)

Answers linked to the questions. The number of the answers can't be changed.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Partial update survey

Update part of a survey object. Empty answer object will not update contents of that answer.

Warning: Please note that Survey is an internal API and can be changed without notice.

Authorizations:
BearerAuth
path Parameters
surveyId
required
integer <int64>
Example: 456

Survey ID

Request Body schema: application/json
additional_data
object
Default: {}

Client data

required
Array of objects (answer)

Answers linked to the questions. The number of the answers can't be changed.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Delete survey

Delete a survey object.

Warning: Please note that Survey is an internal API and can be changed without notice.

Authorizations:
BearerAuth
path Parameters
surveyId
required
integer <int64>
Example: 456

Survey ID

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Create survey object

Create new survey object. Will have all answers pre-filled with null answers.

Note: Please note that Survey is an internal API and can be changed without notice.

Authorizations:
BearerAuth
Request Body schema: application/json
uuid
required
string <uuid>

UUID of the survey template

Responses

Request samples

Content type
application/json
{
  • "uuid": "4d73ac4b-bd1a-4b6d-b274-4e976a382b5b"
}

Response samples

Content type
application/json
{}

Tasks

Tasks are used as status monitors of asynchronous operations.

Tasks with succeeded status can redirect to the object created as a result of them. If no_redirect=true is passed as a query parameter, endpoint won't redirect to an object created, but will return information about the task itself instead.

Task object

id
integer

Task object ID.

url
string <uri>

Task object URL.

type
string
Enum: "documents_download" "upload_created" "email_imported"
status
string
Enum: "running" "succeeded" "failed"
expires_at
string <date-time>

Timestamp of a guaranteed availability of the task object. Expired tasks are being deleted periodically.

detail
string or null

Detailed message on the status of the task. For failed tasks, error id is included in the message and can be used in communication with Rossum support for further investigation.

content
object

Detailed information related to tasks. Content structure varies by task type:

  • For documents_download: contains file_name (string) - File name of the archive to be downloaded.
  • For upload_created: contains upload (url) - URL of the object representing the upload.
code
string or null

Error code.

result_url
string or null <uri>

Succeeded status resulting redirect URL.

{}

Task Types

Currently supported task types:

  • documents_download - Used for monitoring document download operations.
  • upload_created - Used for monitoring upload creation operations.
  • email_imported - Used for monitoring email import operations.

Task Content

The content field contains detailed information related to tasks, which varies by task type:

Documents Download Task Content

  • file_name (string) - File name of the archive to be downloaded specified when creating a download.

Documents Upload Task Content

  • upload (url) - URL of the object representing the upload.

Retrieve task Beta

Get a task object.

Response Behavior:

  • If the task has status running or failed, the endpoint returns status 200 with the task object.
  • If the task has status succeeded and no_redirect parameter is not set or is false, the endpoint redirects with status 303 to the newly created object (URL provided in result_url).
  • If the task has status succeeded and no_redirect=true is passed, the endpoint returns the task object with status 200.
Authorizations:
BearerAuth
path Parameters
taskId
required
integer <int64>

Task ID.

query Parameters
no_redirect
boolean
Default: false

If true, prevents redirect to the created object and returns the task object instead.

Responses

Response samples

Content type
application/json
Example
{
  • "id": 24,
  • "type": "documents_download",
  • "status": "running",
  • "expires_at": "2021-09-11T09:59:00.000000Z",
  • "detail": null,
  • "content": {
    • "file_name": "my-archive.zip"
    }
}

Triggers

A Trigger object represents a condition that will trigger its related object's actions when an event occurs.

Note: A Trigger with trigger event type of email_with_no_processable_attachments can be only retrieved. It can not be created, updated nor deleted.

Trigger object

id
integer <int64>

ID of the trigger

url
string <url>

URL of the trigger

queue
string <url>

URL of the associated queue

event
string

Event that will trigger the trigger (see trigger event types)

condition
object
Default: {}

A subset of MongoDB Query Language (see trigger condition)

email_templates
Array of strings <url> [ items <url > ]

URLs of the linked email templates

delete_recommendations
Array of strings <url> [ items <url > ]

URLs of the linked delete recommendations

Create trigger

Create new trigger object.

Authorizations:
BearerAuth
Request Body schema: application/json
required
queue
required
string <url>

URL of the associated queue

event
required
string

Event that will trigger the trigger (see trigger event types)

condition
object
Default: {}

A subset of MongoDB Query Language (see trigger condition)

email_templates
Array of strings <url> [ items <url > ]

URLs of the linked email templates

delete_recommendations
Array of strings <url> [ items <url > ]

URLs of the linked delete recommendations

Responses

Request samples

Response samples

List triggers

Retrieve all trigger objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
Array of integers <int64> [ items <int64 > ]

Filter by a list of ids, e.g. ?id=1,2,3

event
string

Event filter

queue
integer <int64>

Queue filter

ordering
string
Enum: "id" "-id" "event" "-event"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve trigger

Get a trigger object.

Authorizations:
BearerAuth
path Parameters
triggerId
required
integer <int64>
Example: 1234

Trigger ID

Responses

Response samples

Update trigger

Update trigger object.

Authorizations:
BearerAuth
path Parameters
triggerId
required
integer <int64>
Example: 1234

Trigger ID

Request Body schema: application/json
required
queue
required
string <url>

URL of the associated queue

event
required
string

Event that will trigger the trigger (see trigger event types)

condition
object
Default: {}

A subset of MongoDB Query Language (see trigger condition)

email_templates
Array of strings <url> [ items <url > ]

URLs of the linked email templates

delete_recommendations
Array of strings <url> [ items <url > ]

URLs of the linked delete recommendations

Responses

Request samples

Response samples

Partial update trigger

Update part of a trigger object.

Authorizations:
BearerAuth
path Parameters
triggerId
required
integer <int64>
Example: 1234

Trigger ID

Request Body schema: application/json
required
queue
string <url>

URL of the associated queue

event
string

Event that will trigger the trigger (see trigger event types)

condition
object
Default: {}

A subset of MongoDB Query Language (see trigger condition)

email_templates
Array of strings <url> [ items <url > ]

URLs of the linked email templates

delete_recommendations
Array of strings <url> [ items <url > ]

URLs of the linked delete recommendations

Responses

Request samples

Response samples

Delete trigger

Delete a trigger object.

Note: Trigger of email_with_no_processable_attachments event cannot be deleted.

Authorizations:
BearerAuth
path Parameters
triggerId
required
integer <int64>
Example: 1234

Trigger ID

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Uploads

Object representing an upload. An upload contains information about documents uploaded to a queue, including the creator, creation time, and associated documents and annotations.

Create upload endpoints also support basic authentication to enable easy integration with third-party systems.

Upload object

id
integer <int64>

ID of the upload.

url
string <url>

Upload object URL.

queue
string <url>

URL of the target queue of the upload.

creator
string <url>

URL of the user who created the upload.

created_at
string <date-time>

Time of the creation of the upload.

email
string or null <url>

URL of the email that created the upload object (if applicable).

organization
string <url>

URL of related organization.

documents
Array of strings <url> [ items <url > ]

URLs of the uploaded documents.

additional_documents
Array of strings or null <url> [ items <url > ]

URLs of additional documents created in upload.created event hooks.

annotations
Array of strings or null <url> [ items <url > ]

URLs of all created annotations.

Create upload

Uploads a document to the queue specified as query parameter (starting in the importing state).

Multiple files upload is supported, the total size of the data uploaded may not exceed 40 MB. UTF-8 filenames are supported, see examples.

The file can be sent as a part of multipart/form-data or, alternatively, in the request body.

The {filename} parameter in the URL path only works when sending the file in the request body using --data-binary. When uploading via multipart/form-data, the filename is automatically extracted from the form field and the {filename} parameter in the URL is ignored. Use the Content-Disposition header or specify the filename in the form field instead.

You can also specify additional properties using form field:

  • Metadata could be passed using metadata form field. Metadata will be set to newly created annotation object.
  • Values could be passed using values form field. It may be used to initialize datapoint values by setting the value of rir_field_names in the schema.

For example upload:organization_unit field may be referenced in a schema like this:

{
  "category": "datapoint",
  "id": "organization_unit", 
  "label": "Org unit",
  "type": "string",
  "rir_field_names": ["upload:organization_unit"]
}

The endpoint is asynchronous and response contains created task url. Further information about the import status may be acquired by retrieving the upload object or the task (for more information, please refer to task).

Authorizations:
BearerAuthBasicAuth
query Parameters
queue
required
integer <int64>
Example: queue=8236

ID of the target queue for the upload.

reject_identical
boolean
Default: false

[Beta] When enabled, upload checks for identical documents within a given organization. If such document is found, upload fails with status 409. The check is performed based on file name and file content. Only one file is allowed when reject_identical is set to true.

Request Body schema:
content
required
string <binary>

The file(s) to upload. Multiple files are supported.

metadata
string

JSON string containing metadata to be set on the newly created annotation object.

values
string

JSON string containing values to initialize datapoint values.

Responses

Request samples

curl -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  -F content=@document.pdf \
  'https://example.rossum.app/api/v1/uploads?queue=8236'

Response samples

Content type
application/json

Retrieve upload

Returns upload object.

Authorizations:
BearerAuth
path Parameters
uploadId
required
integer <int64>

Upload ID

Responses

Response samples

Create upload with filename

Uploads a document to the queue specified as query parameter with filename specified in the URL path. UTF-8 filenames are supported and must be URL encoded.

The file should be sent in the request body. The total size of the data uploaded may not exceed 40 MB.

The endpoint is asynchronous and response contains created task url. Further information about the import status may be acquired by retrieving the upload object or the task (for more information, please refer to task).

Authorizations:
BearerAuthBasicAuth
path Parameters
filename
required
string
Example: document%20%F0%9F%8E%81.pdf

The filename for the uploaded document. UTF-8 filenames must be URL encoded.

query Parameters
queue
required
integer <int64>
Example: queue=8236

ID of the target queue for the upload.

reject_identical
boolean
Default: false

When enabled, upload checks for identical documents within a given organization. If such document is found, upload fails with status 409. The check is performed based on file name and file content. Only one file is allowed when reject_identical is set to true.

Request Body schema:
string <binary>

Responses

Request samples

curl -H 'Authorization: Bearer db313f24f5738c8e04635e036ec8a45cdd6d6b03' \
  --data-binary @file.pdf \
  'https://example.rossum.app/api/v1/uploads/document%20%F0%9F%8E%81.pdf?queue=8236'

Response samples

Content type
application/json

User Roles

User role is a group of permissions that are assigned to the user. Permissions are assigned to individual operations on objects.

There are multiple pre-defined roles:

Role Description
viewer Read-only user, cannot change any API object. May be useful for automated data export or auditor access.
annotator In addition to permissions of annotator_limited the user is also allowed to import a document.
admin User can modify API objects to set-up organization (e.g. workspaces, queues, schemas)
manager In addition to permissions of annotator the user is also allowed to access usage-reports.
annotator_limited User that is allowed to change annotation and its datapoints. Note: this role is under active development and should not be used in production environment.
annotator_embedded This role is specifically designed to be used with embedded mode. User can modify annotation and its datapoints, also has read-only permissions for objects needed for interaction on embedded validation screen.
organization_group_admin In addition to permissions of admin the user can manage memberships among organizations within her organization group. Talk with a Rossum representative about enabling this feature.
approver In addition to permission of viewer the user can also approve/reject annotations. This may be combined with other roles. Talk with a Rossum representative about enabling this feature. For more info see workflows.

Note: Please note that id may be different between organizations, use names to identify groups properly.

User can only access annotations from queues it is assigned to, except for admin and organization_group_admin roles that can access any queue.

Permissions assigned to the role cannot be changed through the API.

User Role object

id
integer

Id of the user role (may differ between different organizations)

url
string <uri>

URL of the user role

name
string

Name of the user role

{}

List user roles

Retrieve all user role objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

name
string

Name of the user role filter

ordering
string
Enum: "name" "-name"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve user role

Get a user role object.

Authorizations:
BearerAuth
path Parameters
groupId
required
integer

A unique integer value identifying this user role.

Responses

Response samples

Content type
application/json
{}

Users

A user object represents individual user of Rossum. Every user is assigned to an organization.

A user can be assigned user roles (permission groups). User usually has only one assigned role (with the exception of approver role).

User may be assigned to one or more queues and can only access annotations from the assigned queues. This restriction is not applied to admin users, who may access annotations from all queues.

Users cannot be deleted, but can be disabled (set is_active to false). Field email cannot be changed through the API (due to security reasons). Field password can be set on user creation but cannot be changed through the API (due to security reasons). Field oidc_id will be set to User's email when transitioning to sso authorization, if empty.

User object

id
integer

Id of the user

url
string <uri>

URL of the user

first_name
string

First name of the user

last_name
string

Last name of the user

email
string <email>

Email of the user

phone_number
string or null

Phone number of the user

password
string

Password (not shown on API)

date_joined
string <date-time>

Date of user join

username
string

Username of a user

groups
Array of strings <uri> [ items <uri > ]
Default: []

List of user role (permission groups)

organization
string <uri>

Related organization

queues
Array of strings <uri> [ items <uri > ]
Default: []

List of queues user is assigned to

is_active
boolean
Default: true

Whether user is enabled or disabled

last_login
string or null <date-time>

Date of last login

ui_settings
object
Default: {}

User-related frontend UI settings (e.g. locales). Rossum internal.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

oidc_id
string or null
Default: null

OIDC provider id used to match Rossum user (displayed only to admin user)

auth_type
string
Default: "password"
Enum: "sso" "password"

Authorization method, can be sso or password. This field can be edited only by admin.

deleted
boolean
Default: false

Whether a user is deleted

{}

Create user

Create a new user object.

Note: For security reasons, it is better to create users without a specified password. Such users have an invalid password. Later, they can set their password after using reset-password endpoint.

Authorizations:
BearerAuth
Request Body schema: application/json
first_name
string

First name of the user

last_name
string

Last name of the user

phone_number
string or null

Phone number of the user

password
string

Password (not shown on API)

date_joined
string <date-time>

Date of user join

username
required
string

Username of a user

groups
Array of strings <uri> [ items <uri > ]
Default: []

List of user role (permission groups)

organization
required
string <uri>

Related organization

queues
Array of strings <uri> [ items <uri > ]
Default: []

List of queues user is assigned to

is_active
boolean
Default: true

Whether user is enabled or disabled

last_login
string or null <date-time>

Date of last login

ui_settings
object
Default: {}

User-related frontend UI settings (e.g. locales). Rossum internal.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

oidc_id
string or null
Default: null

OIDC provider id used to match Rossum user (displayed only to admin user)

auth_type
string
Default: "password"
Enum: "sso" "password"

Authorization method, can be sso or password. This field can be edited only by admin.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

List users

Retrieve all user objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

organization
integer <int64>

ID of an organization to filter users by

username
string

Username filter

first_name
string

First name filter

last_name
string

Last name filter

email
string

Email filter

is_active
boolean

Filter by active/inactive status

last_login
string <date-time>

Last login date filter

groups
string

Filter by user groups

queue
integer <int64>

Filter by queue assignment

deleted
boolean

Filter by deleted status

ordering
string
Enum: "id" "-id" "username" "-username" "first_name" "-first_name" "last_name" "-last_name" "email" "-email" "last_login" "-last_login" "date_joined" "-date_joined" "deleted" "-deleted" "not_deleted" "-not_deleted"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve user

Get a user object.

Authorizations:
BearerAuth
path Parameters
userId
required
integer <int64>
Example: 10775

User ID

Responses

Response samples

Content type
application/json
{}

Update user

Update user object.

Authorizations:
BearerAuth
path Parameters
userId
required
integer <int64>
Example: 10775

User ID

Request Body schema: application/json
first_name
string

First name of the user

last_name
string

Last name of the user

phone_number
string or null

Phone number of the user

password
string

Password (not shown on API)

date_joined
string <date-time>

Date of user join

username
required
string

Username of a user

groups
Array of strings <uri> [ items <uri > ]
Default: []

List of user role (permission groups)

organization
required
string <uri>

Related organization

queues
Array of strings <uri> [ items <uri > ]
Default: []

List of queues user is assigned to

is_active
boolean
Default: true

Whether user is enabled or disabled

last_login
string or null <date-time>

Date of last login

ui_settings
object
Default: {}

User-related frontend UI settings (e.g. locales). Rossum internal.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

oidc_id
string or null
Default: null

OIDC provider id used to match Rossum user (displayed only to admin user)

auth_type
string
Default: "password"
Enum: "sso" "password"

Authorization method, can be sso or password. This field can be edited only by admin.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Partial update user

Update part of user object.

Authorizations:
BearerAuth
path Parameters
userId
required
integer <int64>
Example: 10775

User ID

Request Body schema: application/json
first_name
string

First name of the user

last_name
string

Last name of the user

phone_number
string or null

Phone number of the user

password
string

Password (not shown on API)

date_joined
string <date-time>

Date of user join

username
string

Username of a user

groups
Array of strings <uri> [ items <uri > ]
Default: []

List of user role (permission groups)

organization
string <uri>

Related organization

queues
Array of strings <uri> [ items <uri > ]
Default: []

List of queues user is assigned to

is_active
boolean
Default: true

Whether user is enabled or disabled

last_login
string or null <date-time>

Date of last login

ui_settings
object
Default: {}

User-related frontend UI settings (e.g. locales). Rossum internal.

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

oidc_id
string or null
Default: null

OIDC provider id used to match Rossum user (displayed only to admin user)

auth_type
string
Default: "password"
Enum: "sso" "password"

Authorization method, can be sso or password. This field can be edited only by admin.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Delete user

Soft-delete a user - marking a user as deleted, without a possibility of reversing the deletion.

The following rules apply to user soft-deletion:

  • A regular user can delete self and nobody else
  • An organization admin can delete other users within the organization, including other admins
    • For trial organizations, the admin deleting self actually means the whole trial organization will be deleted
    • For non-trial organization
      • The last admin cannot be deleted via API, but must instead create a ticket with support
      • If the organization has an organization group admin, the admin can delete self but the org will be preserved
  • An organization group admin
    • Cannot be deleted via API
    • Can remove any organization admin or regular user
Authorizations:
BearerAuth
path Parameters
userId
required
integer <int64>
Example: 10775

User ID

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}

Change password

Change password of current user.

Due to security reasons, user passwords cannot be set directly using the standard CRUD operations. Instead, the following endpoints can be used for resetting and changing passwords.

Password requirements:

  • Length: 12–64 characters
  • May not be similar to username
  • May not contain common words
  • May not be numeric only
  • Must pass complexity check
Authorizations:
BearerAuth
Request Body schema: application/json
new_password1
required
string [ 12 .. 64 ] characters

New password

new_password2
required
string [ 12 .. 64 ] characters

New password confirmation (must match new_password1)

old_password
required
string

Current password

Responses

Request samples

Content type
application/json
{
  • "new_password1": "MyNewSecurePassword",
  • "new_password2": "MyNewSecurePassword",
  • "old_password": "MyOldPassword"
}

Response samples

Content type
application/json
{}

Reset password

Reset password to a users specified by their emails. The users are sent an email with a verification URL leading to web form, where they can set their password.

Authorizations:
BearerAuth
Request Body schema: application/json
email
required
string <email>

Email of the user to reset password for

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "detail": "Password reset e-mail has been sent."
}

Retrieve current user

Get user object for the currently authorized user.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{}

Retrieve password score

Score to allow users to see how strong their password is from 0 (risky password) to 4 (strong password).

Authorizations:
BearerAuth
Request Body schema: application/json
password
required
string

Password to be scored

email
string <email>

Email of the user

first_name
string

First name of the user

last_name
string

Last name of the user

Responses

Request samples

Content type
application/json
{
  • "password": "MySecureP@ssw0rd",
  • "email": "joe.doe@example.com",
  • "first_name": "Joe",
  • "last_name": "Doe"
}

Response samples

Content type
application/json
{
  • "score": 2,
  • "messages": [
    • "Add another word or two. Uncommon words are better."
    ]
}

Workflow Activities

Workflow activity objects represent actions and events that occur during the execution of workflows. They track the progression of documents through workflow steps, including when steps are started, completed, approved, rejected, or when users are reassigned.

Workflow Activity object

id
integer

Id of the workflow activity

url
string <uri>

URL of the workflow activity

organization
string <uri>

URL of the organization

annotation
string <uri>

URL of the related annotation

workflow
string <uri>

URL of the related workflow

workflow_step
string <uri>

URL of the related workflow step

workflow_run
string <uri>

URL of the related workflow run

assignees
Array of strings <uri> [ items <uri > ]

List of all assigned users

action
string
Enum: "step_started" "step_completed" "approved" "rejected" "workflow_started" "workflow_completed" "reassigned"

Supported values are: step_started, step_completed, approved, rejected, workflow_started, workflow_completed, reassigned

note
string

String note of the activity

created_at
string <date-time>

Date and time of when the activity was created

created_by
string or null <uri>

User who created the activity

{}

List workflow activities

Retrieve all workflow activity objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

annotation
integer <int64>

ID of an annotation to filter workflow activities by

workflow_run
integer <int64>

ID of a workflow run to filter workflow activities by

created_at_before
string <date-time>

Filter workflow activities created before this date and time

created_at_after
string <date-time>

Filter workflow activities created after this date and time

assignees
integer <int64>

ID of a user to filter workflow activities by assignees

action
string
Enum: "step_started" "step_completed" "approved" "rejected" "workflow_started" "workflow_completed" "reassigned"

Filter workflow activities by action type

ordering
string
Enum: "id" "-id"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve workflow activity

Get a workflow activity object.

Authorizations:
BearerAuth
path Parameters
workflowActivityId
required
integer <int64>

ID of a workflow activity.

Responses

Response samples

Content type
application/json
{}

Workflow Runs

A workflow run object represents the execution of a workflow for a specific annotation. It tracks the current step and status of the workflow process.

Workflow Run object

id
integer

Id of the workflow run

url
string <uri>

URL of the workflow run

organization
string <uri>

URL of the organization

annotation
string <uri>

URL of the annotation

current_step
string <uri>

URL of the workflow step

workflow_status
string
Default: "pending"
Enum: "pending" "approved" "rejected"

Status of the workflow run

{}

List workflow runs

Retrieve all workflow run objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

ID of the workflow run to filter by

annotation
integer <int64>

ID of the annotation to filter workflow runs by

current_step
integer <int64>

ID of the current workflow step to filter by

workflow_status
string
Enum: "pending" "approved" "rejected"

Status of the workflow run to filter by

ordering
string
Enum: "id" "-id"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve workflow run

Get a workflow run object.

Authorizations:
BearerAuth
path Parameters
workflowRunId
required
integer

A unique integer value identifying this workflow run.

Responses

Response samples

Content type
application/json
{}

Reset workflow run

Resetting the workflow run leads to:

  • change its workflow status to in_review
  • empty annotation's assignees
  • set the annotation status to to_review
  • create workflow activity of action pushed_back

Note: Resetting is allowed only for workflow runs with related annotation in in_workflow state. See Document Lifecycle for more information about states.

Authorizations:
BearerAuth
path Parameters
workflowRunId
required
integer

A unique integer value identifying this workflow run.

Request Body schema: application/json
note_content
string
Default: ""

String note for the reset action

Responses

Request samples

Content type
application/json
{
  • "note_content": "Resetting due to invalid due date."
}

Response samples

Content type
application/json
{
  • "annotation_status": "to_review",
  • "workflow_status": "in_review"
}

Workflow Steps

A workflow step object defines individual steps within a workflow that control the approval process for annotations. Each step has a specific type, mode, and condition that determines how the workflow progresses.

Currently, the only supported step type is approval, which requires designated assignees to approve annotations before they can proceed in the workflow.

Workflow Step object

id
integer

Id of the workflow step

name
string

Name of the workflow step

url
string <uri>

URL of the workflow step

organization
string <uri>

URL of the organization

workflow
string <uri>

URL of the workflow

condition
object

Condition that designates whether the workflow step will be entered

type
string
Default: "approval"
Value: "approval"

Type of the workflow step (currently the only supported value is approval)

mode
string
Enum: "any" "all" "auto"

Supported values:

  • any - approval of one assignee is enough
  • all - all assignees must approve
  • auto - automatically approved if the condition matches
ordering
integer

Designates the evaluation order of steps within a workflow (must be unique per a workflow)

{}

List workflow steps

Retrieve all workflow step objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer

ID of the workflow step to filter by

workflow
integer

ID of the workflow to filter workflow steps by

mode
string
Enum: "any" "all" "auto"

Mode of the workflow step to filter by

type
string
Value: "approval"

Type of the workflow step to filter by

ordering
string
Enum: "id" "-id"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve workflow step

Get a workflow step object.

Authorizations:
BearerAuth
path Parameters
workflowStepId
required
integer

A unique integer value identifying this workflow step.

Responses

Response samples

Content type
application/json
{}

Workflows

A workflow object represents an approval workflow for an organization. Workflows define conditions that determine when they will be entered during document processing.

Note: Talk with a Rossum representative about enabling this feature. Read more about workflows here.

Workflow object

id
integer

Id of the workflow

name
string

Name of the workflow

url
string <uri>

URL of the workflow

organization
string <uri>

URL of the organization

condition
object

Condition that designates whether the workflow will be entered

{}

List workflows

Retrieve all workflow objects.

Supported filters: id, queue

Supported ordering: id

For additional info please refer to filters and ordering.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

queue
integer <int64>

Queue filter

ordering
string
Enum: "id" "-id"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve workflow

Get a workflow object.

Authorizations:
BearerAuth
path Parameters
workflowId
required
integer <int64>

Workflow ID

Responses

Response samples

Content type
application/json
{}

Workspaces

A workspace object is a container of queue objects.

Workspace object

id
integer

Id of the workspace

name
string

Name of the workspace

url
string <uri>

URL of the workspace

autopilot
boolean
Deprecated

Whether to automatically confirm datapoints from previously seen annotations.

Note: Please note that autopilot configuration has been moved to Queue. Option autopilot remains read-only on Workspace and represents autopilot configuration set to queues within a workspace.

organization
string <uri>

Related organization

queues
Array of strings <uri> [ items <uri > ]

List of queues that belongs to the workspace

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

{}

Create workspace

Create a new workspace object.

Authorizations:
BearerAuth
Request Body schema: application/json
name
required
string

Name of the workspace

organization
required
string <uri>

Related organization

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

List workspaces

Retrieve all workspace objects.

Authorizations:
BearerAuth
query Parameters
page
integer <int32>
Default: 1

Page of results

page_size
integer <int32> <= 100
Default: 20

Number of results per page

id
integer <int64>

Object ID filter

name
string

Name of the workspace filter

organization
integer <int64>

ID of an organization to filter workspaces by

ordering
string
Enum: "id" "-id" "name" "-name"

Result ordering.

Responses

Response samples

Content type
application/json
{}

Retrieve workspace

Get a workspace object.

Authorizations:
BearerAuth
path Parameters
workspaceId
required
integer <int64>

ID of a workspace.

Responses

Response samples

Content type
application/json
{}

Update workspace

Update workspace object.

Authorizations:
BearerAuth
path Parameters
workspaceId
required
integer <int64>

ID of a workspace.

Request Body schema: application/json
name
required
string

Name of the workspace

organization
required
string <uri>

Related organization

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Partial update workspace

Update part of workspace object.

Authorizations:
BearerAuth
path Parameters
workspaceId
required
integer <int64>

ID of a workspace.

Request Body schema: application/json
name
string

Name of the workspace

organization
string <uri>

Related organization

metadata
object (metadata)

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Delete workspace

Delete workspace object.

Note: Please note that only empty workspaces without queues can be deleted. To delete a non-empty workspace, first delete all related queues.

Authorizations:
BearerAuth
path Parameters
workspaceId
required
integer <int64>

ID of a workspace.

Responses

Response samples

Content type
application/json
{
  • "detail": "Bad Request.",
  • "code": "bad_request"
}