Skip to main content
To exchange files with the Application Server, use a POST request. Before you send file requests, connect to the Web Services API. For more information, see Connecting to the Web Services API.

Types of actions

Use POST requests to perform the following actions:

Common use cases

  • Import images. Load image files, including in parts, and get their checksum.
  • Get original page images at any point during processing.
  • Work with attachments of batches, documents, and pages (upload and download).
  • Get the XML description of a verification task, modify the document, and save the changes on the server.
For large attachments, use POST requests. Large files are divided into smaller parts and uploaded to the server. When you use a POST request to add an attachment to an object, call the SaveAttachment method after the POST request, passing a zero-length file with the name of the transferred file as the file parameter. In other cases, use the Attachments methods developed specifically for attachments.

Request parameters

Make sure that the request fields are completed correctly.

Object types

The objectType parameter accepts the following values:
Object type 8 (task attachment) is most effective for large attachments. In other cases, use the Attachments methods developed specifically for attachments.
For files of object type 13, set projectId to 0 and batchId to 0 — these files do not belong to any project, batch, or tenant. To write a file of this type, the administrator must open a session. To read a file of this type, pass sessionId=0; there is no need to open a session.

Stream names

The streamName parameter is the name of the binary stream. Use Base64 encoding when saving a file to the server, and UrlEncode encoding when loading a file from the server. The available values depend on the object type.

Page stream names

Document stream names

Task stream names

  • Verification — An XML document that describes a verification task. Created when preparing the task for the Web stations. After verification, the changes in the document are processed. Versions are not supported; set the version parameter to 1. Save the task processing results to this file.
  • VerificationRequest — Corresponds to one of the following requests:
    • An XML document that contains a request to execute operations within a batch, including document separation and page rearrangement. This type of request is used by the Web Station for rule checks.
    • An XML document containing a routing request.
    • An XML document containing a LineItems extrapolation request.
    • An XML document containing a data verification request.

File storage

File Storage contains all files of the project. The file name encodes the object type, object identifier, and stream name in the form <object type>-<object id>-<stream name>version. Page files (objectType = 1) contain copies of images, while document files (objectType = 0) contain source images. For this reason, you cannot change an image using a POST request with objectType = 1.

Example requests

Load a file from the server

To load a page file (objectType = 1) with id=4, streamName=C:\Temp\image.pdf, and version=184201843 from the server, use the following POST request:

Save a file on the server

To save a document (objectType = 0) with id=4, projectId=3, batchId=6, version=522, and streamName=C:\Temp\image.pdf on the server, use the following POST request:
For more information, see Examples.