Skip to content

  • Documentation
    • Mobile App – Signatus
    • Web App – Signatus 2 API
    • Web App – OKdokument API
    • Web App – OKdokument
  • Contact Us

Customization – Wizard SDK

  • 1. What is a Wizard
  • 2. Introduction to Wizard Javascript API Calls
  • 2.1 Integration
  • 2.2 Document signing
  • 2.3 PDF Document Processing
  • 2.4 Device Features
  • 2.5 Files & Folders
  • 2.6 Application Features
  • 2.7 System Utilities
  • 3. Example: Simple process

Customization – PDF & Form Preparation

  • PDF Forms creation
  • 1. Tags
  • 2. Acrofields
  • 3. Sample document

Integration – REST API

  • 1. Introduction
  • 2. Download
  • 3. Upload

Integration – App-to-App

  • 1. Introduction
  • 2. How does it work?
  • 3. START-ACTIVITY-FOR-RESULT (APP – SIGNATUS – APP)
  • 4. Sending data to Master Wizard via Intent
  • 5. Runtime Configuration Parameters (Display, Fields, Signing Process)

Hardware

  • 1. Android
  • 2. iOS / iPadOS
  • 3. Windows

Signatus user manual

  • 1. Introduction
  • 2. Main menu
  • 3. Signing
  • 4. Submit signed document
  • 5. Settings in detail
  • 6. Example Wizard
View Categories
  • Home
  • Documentation
  • Mobile App - Signatus
  • Customization – Wizard SDK
  • 2.1 Integration

2.1 Integration

The Integration section provides APIs for exchanging data with external systems.
It includes operations such as uploading and downloading data, acknowledgements, and related integration flows.

These APIs support reliable communication and synchronization between systems.

downloadList (Android, Windows, iOS) #

Retrieves a list of available files from the specified channel as a JSON array (for example, to display documents available for signing).

The function supports multiple channel types configured in the Signatus settings, including Browse local storage, Browse REST, Browse CMIS, Send to local storage, Upload REST, and Upload CMIS. When used with upload channels, it returns the list of files that are currently pending upload.

For operations that do not require network communication—such as local storage and upload channels—the function can be executed synchronously.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {string} - Returns empty JSON if asynchronous
 */
function downloadList(arg);

Parameter description :

NameRequiredFormatDescription
channeltrue / falsestringDownload channel name
urltruestringabsolute or relative download URL (if relative URL is used, the “channel” parameter is required; if “url” is specified, the processing will be asynchronous)
calltruestringCallback function name
cookieToHolder falsebooleanif true, do not reuse the cookie obtained during login in subsequent REST downloads (repeat login with password instead) – useful if you need to communicate with different servers that do not share the same session ID (cookies), default is false
user falsestringuser name for server authentication (if specified, the processing will be asynchronous)
password falsestringpassword for server authentication

Example :

 const arg = {
    "channel": "MyRestDocuments",
    "call": "onDownloadList"
}
downloadList(arg);

/**
 * callback function for download list
 * @param res - result in string format
 */
function onDownloadList (res) {
    const result= JSON.parse(res);
}

Result example :

If the above conditions for synchronous processing are fulfilled, the result is returned as JSON string. Otherwise, the return value is an empty string and the actual result is returned asynchronously as an argument to the specified callback function. The result is an unparsed JSON string containing one object attribute parameter. The parameter object contains the following attributes: status String attribute (OK / ERROR), Code: 400/650  message String (human-readable text for status), data JSON array – list of documents and subfolders

{
	"parameter": {
		"status": "OK",
		"message": "Download OK",
		"code": 200,
		"messageDetail": "",
		"data": [
			{
				"date": 1768487075526,
				"filename": "28cd41ac-b504-4ac6-96ab-f46e3e8b9577.pdf",
				"id": "OyAzj2_jep2hUsTFD5wZycjtO4RNHFvpSIlplz5DNnAcWiGAaK2bfp-BamyyP0hkFo-Wxk1tVzuDSQsKV7Evv6CbeyyDfwg8UtFTAoNAmb4",
				"modification": "2026-01-15 15:24:35",
				"reuploadState": "signed",
				"state": "tosign",
				"url": "https://ds-sts.ana.sk/rest/document/OyAzj2_jep2hUsTFD5wZycjtO4RNHFvpSIlplz5DNnAcWiGAaK2bfp-BamyyP0hkFo-Wxk1tVzuDSQsKV7Evv6CbeyyDfwg8UtFTAoNAmb4",
				"number": "146",
				"name": "Shirley",
				"box": "Inbox",
				"group": "wiki",
				"sid": ""
			}
		]
	}
}

download (Android, Windows, iOS) #

Downloads a file from a server using the SIGNATUS REST API.

For operations that do not require network communication (for example, when using local storage channels), the function can be used synchronously. In this case, the parameters call, saveChannel, user and password must be left empty. Only the url, savePath, channel parameters are required.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {string} - Returns empty JSON in string format
 */
function download(arg);

Parameter description :

NameRequiredFormatDescription
channeltrue / falsestringDownload channel name
urltruestringabsolute or relative download URL (if relative URL is used, the channel parameter is required)
savePathtruestringpath to the workspace directory where the downloaded file will be saved
calltruestringCallback function name
loginfalsestringwhenused with the value „channel“, the Login URL of the channel will be used to log in before downloading the file
cookieToHolder falsebooleanif true, do not reuse the cookie obtained during login in subsequent REST downloads (repeat login with password instead) – useful if you need to communicate with different servers that do not share the same session ID (cookies), default is false
user falsestringuser name for server authentication
password falsestringpassword for server authentication
idfalsestringunique document ID
saveChannel falsestringLocal Device Storage channel name, where downloaded file is stored (if saveChannel is set, savePath parameter is ignored)
filename falsestringhow to name the downloaded file in the destination
data falseJSON ObjectAdditional data in JSON format that will be stored in a separate metadata file linked to the downloaded file
overwrite falsebooleanif false (default), avoid overwriting existing files by automatically renaming them in the destination directory
useChannelAck falsebooleanif true, acknowledge download using the ACK URL configured for the channel (default is false)
deleteWhenAckFailed falsebooleanif true and acknowledgement of download (using the ACK URL) fails, the downloaded file is deleted from the device so that only successfully acknowledged files are visible (default is false), code – unique identifier of the download request – this code will be logged in the application log and passed to the asynchronous callback function to identify which download the result belongs to
showProgress falsebooleanif true, shows a progress animation during the download (default is false)

Example :

 const arg = {
    "channel": "MyRestDocuments",
    "url": "https://ds-sts.ana.sk/rest/document/OyAzj2_jep2hUsTFD5wZycjtO4RNHFvpSIlplz5DNnAcWiGAaK2bfp-BamyyP0hkFo-Wxk1tVzuDSQsKV7Evv6CbeyyDfwg8UtFTAoNAmb4",
    "savePath": "/tosign/Test1.pdf",
    "call": "onDownloadDocument"
}
download(arg);

/**
 * callback function for download
 * @param res - result in string format
 */
function onDownloadDocument (res) {
    const result= JSON.parse(res);
}

Result example :

{
	"parameter": {
		"status": "OK",
		"message": "Download OK",
		"savePath": "/tosign/Test1.pdf",
		"data": {
			"id": "Test1.pdf",
			"filename": "Test1.pdf",
			"url": "file:/data/user/0/com.anasoft.signatus.app/files/WorkSpace/tosign/Test1.pdf",
			"size": 25605,
			"lastModified": 1768487975000,
			"pwd": ""
		},
		"transactionCode": "2075700742",
		"code": 200
	}
}

multiDownload (Android) #

Downloads multiple files from a server using the SIGNATUS REST API.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {void} 
 */
function download(arg);

Parameter description :

NameRequiredFormatDescription
listtrue / falseJSON ArrayElement has the attributes supported by the download function. Described on download chapter
statefalsestringCANCEL – Interrupts the download of all files. The currently downloaded file will be downloaded.

Example :

const arg = {
    "list": [
        {
            "channel": "MyRestDocuments",
            "url": "https://ds-sts.ana.sk/rest/document/OyAzj2_jep2hUsTFD5wZycjtO4RNHFvpSIlplz5DNnAcWiGAaK2bfp-BamyyP0hkFo-Wxk1tVzuDSQsKV7Evv6CbeyyDfwg8UtFTAoNAmb4",
            "savePath": "/tosign/Test1.pdf",
            "call": "onDownloadDocument"
        }, {
            "channel": "MyRestDocuments",
            "url": "https://ds-sts.ana.sk/rest/document/XYAzj2_jep2hUsTFD5wZycjtO4RNHFvpSIlplz5DNnAcWiGAaK2bfp-BamyyP0hkFo-Wxk1tVzuDSQsKV7Evv6CbeyyDfwg8UtFTAojhjUU",
            "savePath": "/tosign/Test2.pdf",
            "call": "onDownloadDocument"
        }
    ]
}
multiDownload(arg);

/**
 * callback function for download
 * @param res - result in string format
 */
function onDownloadDocument (res) {
    const result= JSON.parse(res);
}

or

 const arr = {
    "state" : "CANCEL"
}
multiDownload(arg);

Result is described in download chapter

isDownloading (Android) #

Checks if the download or multi download of a file is running in the background. Function is suitable for scenarios, when there is an intention to cancel download of a multiple files, to find out if there is a file being downloaded at the moment.

/**
 * @param {Object} arg- Parameter Empty JSON object.
 * @returns {boolean} - Returns true if downloadis running in background, false otherwise.
 */
function isDownloading (arg);

Example :


isDownloading ({});

send (Android, Windows, iOS) #

Submits the file to a configured REST upload channel.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {void} 
 */
function send(arg);

Parameter description :

NameRequiredFormatDescription
filetruestringName of the file to upload
channelfalsestringName of the upload channel to use for uploading (if not specified and more than one channel has been defined in the settings, it prompts the user with a dialog window)
calltruestringCallback function name
saveChannelfalsestringIf specified,the uploaded file is read from the directory of the local channel instead of the wizard workspace (avoids the need to copy a file from local channel to workspace for example if signing is done on the server)
filenamefalsestringRequired if “saveChannel” is specified – the name of the file from the local channel to upload
datafalseJSON Objectadditional data for the uploader in JSON format
uploadfalseboolean– true (default value) : file is prepared for upload and uploader is called immediately
– false : file is only prepared for upload, the uploader can be started later using the ‘upload’ function

Example :

const arg = {
    "channel" : "SignedDocuments",
    "file" : "/signed/Test1.pdf",
    "call" : "onSendDocument"
};
send(arg);

/**
 * callback function for send function
 * @param res - result in string format
 */
function onSendDocument (res) {
    const result = JSON.parse(res);
}

Result example :

{
	"parameter": {
		"status": "OK",
		"message": ""
	}
}

multiSend (Android) #

Submits multiple files to a configured REST upload channel..

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {void} 
 */
function multiSend(arg);

Parameter description :

NameRequiredFormatDescription
listtrue JSON ArrayElement has the attributes supported by the send function. Described on send chapter

Example :

const arg = [
  {
      "channel": "SignedDocuments",
      "file": "/signed/Test1.pdf",
      "call": "onSendDocument"
  },
  {
      "channel": "SignedDocuments",
      "file": "/signed/Test2.pdf",
      "call": "onSendDocument"
  }
];

multiSend(arg);

/**
 * callback function for send function
 * @param res - result in string format
 */
function onSendDocument (res) {
    const result = JSON.parse(res);
}

Result is described in send chapter

upload (Android, Windows, iOS) #

Starts the file upload service.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {void} 
 */
function upload(arg);

Parameter description :

NameRequiredFormatDescription
loginfalsestring– show (default value) : if authentication is required for upload service, application show native authentication dialog
– propagate : propagate authentication required information to callback function
calltruestringCallback function name

Example :

 const arg = {
    "login" : "propagate",
    "call" : "onUpload"
};
upload(arg);

/**
 * callback function for upload function
 * @param res - result in string format
 */
function onUpload (res) {
    const result = JSON.parse(res);
}

Result example :

{
	"parameter": {
		"status": "OK",
		"message": ""
	}
}

onSystem (Android) #

This is not a function that your JavaScript code should call, on the contrary, this is a function that Signatus calls when some system events occur.

The list of system events:

  • a document is successfully uploaded (code 72),
  • a document failed to upload (code 73),
  • document upload requires authentication (code 74).

If you do not define this function, a default implementation is used that only logs the event to the logs.

function onSystem (res) {
    const result = JSON.parse(res);
}

Result description :

NameFormatDescription
codeintType of event
dataJSON ObjectDetailed information about the event

Result example :

{
	"parameter": {
		"code": 72,
		"data": {
			"action": "uploaded",
			"channelName": "LOCAL_0",
			"cout": 1726,
			"message": "Test1.pdf"
		}
	}
}

sendAck (Android, Windows, iOS) #

Sends metadata about the state of the document (e.g. “signed” in order to acknowledge that the document has been signed and can be removed from the list of documents available for signature).

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {string} - Returns "run" string
 */
function sendAck (arg);

Parameter description :

NameRequiredFormatDescription
channeltruestringDownload channel name
statetruestringNew document state
– download : document has been downloaded
– cancel : document signing has been cancelled
– open : document has been opened
– or some custom state value understood by the server
calltruestringCallback function name
idfalsestringDocument unique ID
datafalseJSON ObjectAdditional data in JSON format
user falsestringUser name for server authentication (if specified, the processing will be asynchronous)
password falsestringPassword for server authentication

Example :

const arg = {
    "channel" : "MyRestDocuments",
    "state" : "open",
    "id": "OyAzj2_jep2hUsTFD5wZycjtO4RNHFvpSIlplz5DNnAcWiGAaK2bfp-BamyyP0hkFo-Wxk1tVzuDSQsKV7Evv6CbeyyDfwg8UtFTAoNAmb4",
    "call" : "onAck"
};
sendAck(arg);

/**
 * callback function for sendAck
 * @param res - result in string format
 */
function onAck (res) {
    const result= JSON.parse(res);
}

Result example :

{
	"parameter": {
		"status": "OK",
		"message": "",
		"data": "{\"message\":\"msg.document.move.success\",\"result\":\"OyAzj2_jep2hUsTFD5wZycjtO4RNHFvpSIlplz5DNnAcWiGAaK2bfp-BamyyP0hkFo-Wxk1tVzuDSQsKV7Evv6CbeyyDfwg8UtFTAoNAmb4\"}",
		"code": 200
	}
}

postRequest (Android) #

Executes an HTTP POST request (with JSON data) to the server specified in an upload channel configuration. Returns server response as a string. The request is encoded as multipart/form-data.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {void} 
 */
function postRequest (arg);

Parameter description :

NameRequiredFormatDescription
channeltruestringUpload channel name.
idtruestringString sent as a separate form field of multipart/form-data named “id”
datatruestringString as a form field of multipart/form-data named “data”
calltruestringCallback function name

Example :

const arg = {
    "id" : "123456",
    "data" : "reason=clear",
    "channell": "Rules",
    "call" : "onPostRequest"
};
postRequest (arg);

/**
 * callback function for postRequest function
 * @param res - result in string format
 */
function onPostRequest(res) {
    const result = JSON.parse(res);
}

Result example :

{
	"parameter": {
		"status": "OK",
		"message": "Response message from server"
	}
}

saveAuthentication (Android, Windows, iOS) #

Stores a username and password in the application’s authentication holder for use in subsequent REST requests. The validity period of the stored authentication can be configured in the application settings.

If the function is called with empty credentials, all previously stored authentication data and cookies are cleared. This effectively performs a logout, with an optional logout request sent to the server.

The logout request is sent only if the channel parameter is specified. Logout is performed using an HTTP GET request, where the logout URL is derived from the channel’s configured login URL by replacing the login path segment with logout.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {boolean} - Returns true if user name and password are successfully stored, false otherwise
 */
function saveAuthentication (arg);

Parameter description :

NameRequiredFormatDescription
channeltruestringChannel to logout.
user truestringUser name to remember , empty for logout
password truestringPassword to remember, empty for logout

Example :

const arg = {
    "channel" : "MyRestDocuments",
    "user" : "wiki",
    "password": "secret"
};
saveAuthentication (arg);

isAuthentication (Android, Windows, iOS) #

Checks if the authentication stored with the ‘saveAuthentication’ function is valid.

/**
 * @param {Object} arg- Parameter Empty JSON object.
 * @returns {boolean} - Returns true if authentication is valid. false if the authentication does not exist, or has expired.
 */
function isAuthentication (arg);

Example :


isAuthentication({});
Updated on 04/02/2026
2. Introduction to Wizard Javascript API Calls2.2 Document signing
Table of Contents
  • downloadList (Android, Windows, iOS)
  • download (Android, Windows, iOS)
  • multiDownload (Android)
  • isDownloading (Android)
  • send (Android, Windows, iOS)
  • multiSend (Android)
  • upload (Android, Windows, iOS)
  • onSystem (Android)
  • sendAck (Android, Windows, iOS)
  • postRequest (Android)
  • saveAuthentication (Android, Windows, iOS)
  • isAuthentication (Android, Windows, iOS)
  • Documentation
    • Mobile App – Signatus
    • Web App – Signatus 2 API
    • Web App – OKdokument API
    • Web App – OKdokument
  • Contact Us
Proudly powered by WordPress