Build Electronic Identity, Authentication and Signature Integrations 2017-01-04T12:32:58+00:00

 Back to top

CHANGELOG

Version: 1.1.2 09/11/15

  • Added plugin communication service for retrieving plugin version status and logging plugin errors.

Version: 1.1.1 02/09/15

  • Added templates and documents support
  • Added possibility to share SignWise documents
  • Changed /container/share/… URI’s to /share/… old way is deprecated but has backward compatibility
  • When creating template then the placeholders are checked against template file to look for the placeholders that does not exist.
  • When creating document, the document measurements (width and height by points) by page are added to the document return object.
  • When creating or updating document, then page sizes are added to the document entity.
  • You can use visualSignature in the share recipient section. (possible types are: placeholder, coordinates and user)
  • New path – /container/preview – where it is possible to see PDF document preview.
  • When container is shared you can now add documentPreviewPath attribute to the share object which is used to make PDF preview images.
  • When PDF container is shared or signed the preview is updated.
  • Added support for intermediary certificates (certificateChain) – Sign prepare; User authentication verification; Validate certificate.

Version: v1.0.21 18/06/15

  • Internal changes.

Version: v1.0.20 03/02/15

  • Added user specific configuration option to require filling in comment when declining.
  • Fixed bug where deleting file from container deleted all files with the same digest value.

Version: v1.0.19 21/11/14

  • Internal changes.
  • Added ECC mID PDF signing error message.

Version: v1.0.18 21/11/14

  • Removed passive status from recipients.

Version: v1.0.17 05/11/14

  • Fixed signature timezone in share-completed emails.

Version: v1.0.16 16/09/14

  • Added recipient.notifications. Can be used to specify recipient-based share-reminder notifications.

Version: v1.0.15 16/09/14

  • Removed POST /container/log
  • Added POST /user/log

Version: v1.0.14 15/09/14

  • Added “share-created-viewer” notification template. If role is viewer and this template is set, viewer will get share-created notification with modified template.

Version: v1.0.13 09/09/14

  • Added “recipient.disableReasonField”. Defaults to false. Allows disabling of Reason field in Signlink.

Version: v1.0.12 04/09/14

  • Added “access” event. Sent when recipient accesses the share. Sent once per authenticated session. Sent every time for auth=no shares.

Version: v1.0.11 29/08/14

  • Added optional recipient.role (signer/viewer).

Version: v1.0.10 21/08/14

  • Removed container.files and fileMappings objects. File data and mappigns are now included in container.data.dataFiles.

Version: v1.0.9 15/08/14

  • Added “share-updated” event. Sent when recipient or share expiration date changes
  • “share-created” event will be also sent when new recipient has been added after share create

Version: v1.0.8 13/08/14

  • Removed shareId, recipientId, tmpPath and signatureId parameters from /container/sign/finalize endpoint
  • Removed shareId and recipientId parameters from /container/sign/cancel endpoint
  • Removed shareId and recipientId parameters from /container/sign/decline endpoint
  • Changed share notification transports parameter optional
  • Added share recipient country and language validation

Version: v1.0.7 11/08/14

  • Removed share.authType parameter. Use share.auth instead.

Version: v1.0.6 10/08/14

  • Added generic response codes table
  • Made files parameter mandatory for container create endpoint
  • Removed share.brand parameter

Version: v1.0.5 06/08/14

  • Use UNIX timestamp instead of RFC datetime strings

Version: v1.0.4 05/08/14

  • Added “recipient.msisdn” field
  • “recipient.email” parameter is required if one of the notifications requires “email” transport
  • “recipient.msisdn” parameter is required if one of the notifications requires “sms” transport

Version: v1.0.2 30/07/14

  • Documentation cleanup

Version: v1.0.1 28/07/14

  • Return 401 status code instead of 400 if certificate was not found
  • Added “share.description” field
  • Added support for container overwrite. See “overwrite” parameter.

Version: v1.0.0 28/07/14

  SignWise Services API provides an integration layer for 3rd party services to connect with Signwise backend services.

Authentication

Authentication is done via SSL client certificate authentication. Certificates can be obtained by contacting support@signwise.org

Endpoint

Live: //api.signwise.org Test: //api-test.signwise.org

Media types

Where applicable this API uses the application/json media-type to represent resources states. Requests with a message-body are using plain JSON to set or update resource states.

Resource models

Common resource entities returned in the responses. Container

Key Type Description
path string Path/URL to container file
data string Container metadata
locked boolean Container lock state
lockModified number Container lock modification date. UNIX timestamp with milliseconds
shares array List of related share id’s

Share

Key Type Description
id string Share identifier
name string Share name
description string Share description
fileName string Share filename
metadata object Share metadata
sharer object Share creator metadata
auth string Authorization type (basic/residence)
callbackURL string Callback URL
created number Share creation date. UNIX timestamp with milliseconds
expires number Share expiration date. UNIX timestamp with milliseconds
recipients array List of recipients
type string Share type (sequential/parallel)
status string Share status (active/finished/expired/deleted)

Recipient

Key Type Description
id string Share identifier
key string Unique recipient share key
name string Recipient name
userMessage string Recipient message (etc. decline message)
signlinkURL string Recipient Signlink URL
redirectURL string Redirect URL
email string Recipient email
msisdn number Recipient msisdn/mobile phone number
ssn string Recipient social security number
language string Recipient language
country string Recipient country. Required if ssn is set
tmpPath string Recipient tmp path
bcc boolean Blind copy flag
disableReasonField boolean Reason field flag
modified number Recipient modification date. UNIX timestamp with milliseconds
status string Recipient status (active/queued/declined/signed/deleted/expired)

Response codes

List of returned response codes.

Code Type Description
200 Success Request was successfully completed
400 Error Validation error. One of the input parameters didn’t pass the validation
401 Error Authentication error. Invalid auth cert was sent
420 Error Signer error. Signer service low level error details
422 Error Lock error. File container is locked and can’t be changed (also blocked for signing)
425 Error Recipient error. Signing certificate details (country/ssn) doesn’t match or recipient is already signed
500 Error Internal error

Container 

Create 

Creates a new file container and writes it to outputPath. Optionally accepts list of files which will be added to created file container. Supported container types: ddoc, bdoc, edoc, asandoc

/container
  • Parameters
  • containerType
    string (required) Example: ddocContainer type.
    outputPath
    string (required) Example: //fp/path/to/containerContainer output path.
    overwrite
    boolean (optional) Example: falseIf set and true then removes existing container record and creates a new one.
    files
    array (required)List of files to add.
    files.inputPath
    string (required) Example: //fp/path/to/filePath to file to add.
    files.fileName
    string (required) Example: filenameFile name.
    files.fileType
    string (required) Example: application/octet-streamFile mime type.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "outputPath":"//fp/path/to/container",
      "containerType":"ddoc",
      "overwrite":true,
      "files":[
        {
          "inputPath":"//fp/path/to/container/file-1",
          "fileName":"file1",
          "fileType":"application/octet-stream"
        },
        {
          "inputPath":"//fp/path/to/container/file-2",
          "fileName":"file2",
          "fileType":"application/octet-stream"
        }
      ]
    }
    
  • Response  200Toggle
  • Body
    {
      "container":{
        "type":"ddoc",
        "path":"//fp/path/to/container",
        "data":{
          "signatures":[  ],
      "dataFiles":[
        {
          "path":"//fp/path/to/container/file-1",
          "size":705298,
          "mimeType":"application/octet-stream",
          "fileName":"file1",
          "id":"D0"
        },
        {
          "path":"//fp/path/to/container/file-2",
          "size":705298,
          "mimeType":"application/octet-stream",
          "fileName":"file2",
          "id":"D1"
        }
      ],
      "size":705617,
      "version":"1.3",
      "format":"DIGIDOC-XML"
    },
    "shares":[
    
    ],
    "locked":false,
    "lockModified":"1407329039436"
      }
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "\"containerType\" is required" }
    { "message": "Validation error", "reason": "\"outputPath\" is required" }
    { "message": "Validation error", "reason": "\"files.inputPath\" is required at index 1" }
    { "message": "Validation error", "reason": "\"files.fileName\" is required at index 1" }
    { "message": "Validation error", "reason": "\"files.fileType\" is required at index 1" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  409Toggle
  • Body
    { "message": "Conflict", "reason": "Container already exists" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Metadata 

Returns file container info.

/container/info
  • Parameters
  • containerType
    string (required) Example: ddocContainer type.
    inputPath
    string (required) Example: //fp/path/to/containerContainer input path.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "inputPath":"//fp/path/to/container",
      "containerType":"ddoc"
    }
    
  • Response  200Toggle
  • Body
    {
      "container":{
        "type":"ddoc",
        "path":"//fp/path/to/container",
        "data":{
          "signatures":[  ],
      "dataFiles":[
        {
          "path":"//fp/path/to/container/file-1",
          "size":705298,
          "mimeType":"application/octet-stream",
          "fileName":"file1",
          "id":"D0"
        },
        {
          "path":"//fp/path/to/container/file-2",
          "size":705298,
          "mimeType":"application/octet-stream",
          "fileName":"file2",
          "id":"D1"
        }
      ],
      "size":705617,
      "version":"1.3",
      "format":"DIGIDOC-XML"
    },
    "shares":[
    
    ],
    "locked":false,
    "lockModified":"1407329039436"
      },
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "\"containerType\" is required" }
    { "message": "Validation error", "reason": "\"inputPath\" is required" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Download 

Returns container if fileId is not added to the request body. Returns file from the container if the fileId is added to the request body.

/container/download
  • Parameters
  • containerType
    string (required) Example: ddocContainer type.
    inputPath
    string (required) Example: //fp/path/to/containerContainer input path.
    fileId
    string (optional) Example: D0Container file internal id.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "inputPath":"//fp/path/to/container",
      "containerType":"ddoc"
    }
    
  • Response  200Toggle
  • Headers
    Content-type: application/octet-stream
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "\"containerType\" is required" }
    { "message": "Validation error", "reason": "\"inputPath\" is required" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Preview 

Returns PNG image if the id, page and zoomLevel exists.

/container/preview
  • Parameters
  • id
    string (required) Example: 536b33d28aa660df1ed358d8Container ID.
    page
    number (required) Example: 1The page of the PDF document that you need the preview for.
    zoomLevel
    number (required) Example: 1Zoom level of the preview. There are three levels: 1, 2 and 3. The levels are calculated so as the level 1 is the 99DPI print of an PDF document to the PNG. Level 2 is level 1×1.5. Level 3 is level 1×2.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "id":"536b33d28aa660df1ed358d8",
      "page": 1,
      "zoomLevel": 1
    }
    
  • Response  200Toggle
  • Headers
    Content-type: image/png
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "Invalid \"zoomLevel\" value" }
    { "message": "Validation error", "reason": "Invalid \"page\" value" }
    { "message": "Validation error", "reason": "Container with id of \"536b33d28aa660df1ed358e3\" does not exist." }
    { "message": "Validation error", "reason": "Container with id of \"536b33d28aa660df1ed358e3\" does not have a preview." }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Share 

Create 

Creates a new share for input container. Events When certain events happen then messages are sent to share callback URL (defined as callbackURL parameter in share request body). Event type can be distinguished by event field value. Share access. Sent when recipient accesses the share. Sent once per authenticated session. Sent every time for auth=no shares.

Key Type Description
event string “access”
container object Container object
recipient object Recipient object
share object Share object

Recipient sign. Sent if recipient signs container.

Key Type Description
event string “sign”
container object Container object
recipient object Recipient object
share object Share object

Recipient mobile sign. Sent if recipient signs container.

Key Type Description
event string “mobile-sign”
error object Only present if error occurred
error.code String Signer error code
error.message String Signer error message
container object Container object
recipient object Recipient object
share object Share object

Recipient decline. Sent if recipient declines sign request.

Key Type Description
event string “decline”
container object Container object
recipient object Recipient object
share object Share object

Share expire. Sent if share or share recipient expires. If share recipient expires then payload body contains expired recipient data.

Key Type Description
event string “expired”
container object Container object
recipient object Recipient object (optional)
share object Share object

Share complete. Sent if no active (all signed and/or declined) recipients left.

Key Type Description
event string “complete”
container object Container object
share object Share object

Recipient auth. Sent only if recipient residence auth fails.

Key Type Description
event string “auth”
error object Only present if error occurred
error.code String Signer error code
error.message String Signer error message
recipient object Recipient object
share object Share object

Notifications Notifications are meant to notify share recipients when share is created or its state changes. List of supported predefined notifications.

  • share-created – share was created
  • share-created-viewer – share was created with reader role
  • share-updated – share was updated (share or one of its recipients expiration date changed)
  • share-reminder – share is waiting recipient signature
  • share-expired – share was expired
  • share-deleted – share was deleted
  • share-completed – share was completed, all recipients signed/declined
/share
  • Parameters
  • containerType
    string (required) Example: ddocContainer type. If shareable object is SignWise document then containerType value must be “pdf”.
    inputPath
    string (required) Example: //fp/path/to/containerContainer input path. If shareable object is SignWise document then inputPath should be empty.
    document
    string (optional) Example: 553a29f3408e44e33dcc1ce3If you are sharing SignWise document you have to use this parameter instead of inputPath
    documentPreviewPath
    string (optional) Example: //fp/path/to/document/preview/If you are sharing PDF document then it is possible to see it’s preview using our API. The preview images are saved to the pointed directory of your fileproxy. To get the preview images check the container preview section of this API documentation.
    callbackURL
    string (optional) Example: //127.0.0.1:65001/callbackEndpoint which receives message when share state changes.
    expires
    number (required) Example: 1407329039436Expiration date. UNIX timestamp with milliseconds.
    name
    string (required) Example: A shareShare name.
    description
    string (optional) Example: Share descriptionShare description.
    fileName
    string (optional) Example: A shareShare container filename.
    auth
    string (optional)Authorization type (basic/residence).
    type
    boolean (optional) Example: parallelShare type, defaults to “parallel”. (parallel/sequential)
    metadata
    object (optional)Share metadata.
    sharer
    object (optional)Sharer data.
    recipients
    object (optional)List of recipients.
    recipients.key
    string (optional) Example: recipientKey1Unique recipient share key.
    recipients.name
    string (optional) Example: Mati KuuskRecipient name.
    recipients.redirectURL
    string (optional) Example: //sl.singwise.org/sw/f5424125-6e0b-4d1e-9a36-ac618b62aaecRecipient redirect URL.
    recipients.email
    string (optional) Example: recipient@recipient.comRecipient email. Required if one of the notifications requires “email” transport.
    recipients.msisdn
    number (optional) Example: 372192304554Recipient msisdn. Required if one of the notifications requires “sms” transport. Accepts numeric values only (without special characters).
    recipients.ssn
    string (optional) Example: 14212128025Recipient social security number.
    recipients.language
    string (required) Example: en-GBRecipient language. Supported languages: et-EE, en-EE, ru-EE, en-LV, ru-LV, lv-LV, en-LT, ru-LT, lt-LT, en-AZ, az-AZ, en-FI, fi-FI.
    recipients.country
    string (required) Example: EERecipient country. Required if ssn is set. Supported countries: EE, LV, LT, AZ, FI
    recipients.tmpPath
    string (required) Example: //fp/path/to/mati-tmpRecipient tmp path.
    recipients.bcc
    boolean (optional)Blind copy flag. If set to true then recipient only sees himself and other recipients doesn’t see him.
    recipients.group
    number (optional) Example: 0Recipient group. Defaults to 0. Used and required by sequential share.
    recipients.expires
    number (optional) Example: 1407329039436Expiration date. UNIX timestamp with milliseconds.
    recipients.role
    string (optional) Example: signerRecipient role (signer/viewer). Defaults to signer.
    recipients.status
    string (optional) Example: activeRecipient status (active/queued/declined/signed/deleted/expired).
    recipients.disableReasonField
    boolean (optional)Reason field switch. If set to true then recipient cannot enter reason field in Signlink.
    recipients.visualSignature
    object (optional)When shared object is PDF or SignWise document then you can use this property to allow visual signature badge to be placed on the document.
    recipients.visualSignature.type
    sting (required) Example: coordinatesVisual signature placement type. Types are as follows: placeholder – visual signature is placed on top of the placeholer (text) in the SignWise document; user – Signatory can drag and drop the visual signature on the PDF document; coordinates – Visual signature is placed on the coordinates described in the recepient object.
    recipients.visualSignature.placeholder
    string (required) Example: [my placeholder]Visual signature position in the document. This field is only required with visualSignature.type of placeholder.
    recipients.visualSignature.coordinates
    array (required)Array of two integers (points – pt) where the first value represents X coordinate and the second Y coordinate. This property is only needed when visualSignature.type is coordinates.
    recipients.visualSignature.page
    integer (required) Example: 1Describes the page in the PDF document, where the signature should be placed. This property is only needed when visualSignature.type is coordinates.
    recipients.notifications
    array (optional)List of notifications.
    recipients.notifications.template
    string (required) Example: share-reminderPredefined notification typel/template. Recipients currently supports only share-reminder.
    recipients.notifications.sendAt
    number (optional) Example: 1407329039436Send date. UNIX timestamp with milliseconds.
    recipients.notifications.transports
    array (required) Example: emailList of transport to use to deliver notification to the share recipients. Currently supported transports: “email”
    notifications
    array (optional)List of notifications.
    notifications.template
    string (required) Example: share-createPredefined notification typel/template.
    notifications.sendAt
    number (optional) Example: 1407329039436Send date. UNIX timestamp with milliseconds.
    notifications.transports
    array (optional) Example: emailList of transport to use to deliver notification to the share recipients. Currently supported transports: “email”
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "name":"A share",
      "description": "Share description",
      "fileName":"file.ddoc",
      "inputPath":"//fp/path/to/container",
      "containerType":"ddoc",
      "callbackURL":"//127.0.0.1:65001/callback",
      "expires":"1407929731426",
      "auth":"basic",
      "type":"parallel",
      "metadata":{
        "field1":"value1"
      },
      "sharer":{
        "name":"Sharer Name",
        "email":"Sharer email"
      },
      "recipients":[
        {
          "name":"Mati Kuusk",
          "tmpPath":"//fp/path/to/mati-tmp",
          "country":"EE",
          "language":"en-GB",
          "ssn":"14212128025",
          "bcc":false,
          "role": "signer",
          "metadata":{
            "field1":"value1"
          },
          "notifications":[
            {
              "template":"share-reminder",
              "sendAt":"1407329339232",
              "transports":[
                "email"
              ]
            }
          ]
        }
      ],
      "notifications":[
        {
          "template":"share-created",
          "transports":[
            "email"
          ]
        },
        {
          "template":"share-expired"
        },
        {
          "template":"share-deleted"
        },
        {
          "template":"share-reminder",
          "sendAt":"1407329339236"
        },
        {
          "template":"share-reminder",
          "sendAt":"1407329439441"
        },
        {
          "template":"share-completed"
        }
      ]
    }
    
  • Response  200Toggle
  • Body
    {
      "id":"536b33d28aa660df1ed358d7", // Share id
      "name": "A share",
      "description": "Share description",
      "fileName": "file.ddoc",
      "callbackURL": "//127.0.0.1:65001/callback",
      "expires": "1407929731426",
      "status": "active",
      "metadata": {
        "field1": "value1"
      },
      "sharer": {
        "name": "Sharer Name",
        "email", "Sharer email"
      },
      "recipients": [
        {
          "id": "536b33d28aa660df1ed358d8"
          "signlinkURL": "//sl/sw/f5424125-6e0b-4d1e-9a36-ac618b62aaec",
          "redirectURL": "//sl/sw/f5424125-6e0b-4d1e-9a36-ac618b62aaec",
          "key": "f5424125-6e0b-4d1e-9a36-ac618b62aaec",
          "ssn": "14212128025",
          "metadata": {
            "field1": "value1"
          },
          "country": "EE",
          "language": "en-GB",
          "tmpPath": "//fp/path/to/mati-tmp",
          "name": "Mati Kuusk",
          "role": "signer",
          "status": "active",
          "modified": "1407329039436"
        }
      ],
      "created": "1407329039436",
      "auth": true,
      "auth": "basic",
      "type": "parallel"
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "\"containerType\" is required" }
    { "message": "Validation error", "reason": "\"inputPath\" is required" }
    { "message": "Validation error", "reason": "\"name\" is required" }
    { "message": "Validation error", "reason": "\"expires\" is required" }
    { "message": "Validation error", "reason": "Invalid \"auth\" value" }
    { "message": "Validation error", "reason": "Invalid \"expires\" value" }
    { "message": "Validation error", "reason": "Expiration date is too near in the future" }
    { "message": "Validation error", "reason": "Expiration date is greater than the share expiration date" }
    { "message": "Validation error", "reason": "Invalid \"callbackURL\" value" }
    { "message": "Validation error", "reason": "Can't set share status" }
    { "message": "Validation error", "reason": "Invalid \"status\" value" }
    { "message": "Validation error", "reason": "Invalid \"sharer.email\" value" }
    { "message": "Validation error", "reason": { "message": "Can't change \"key\" value", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "\"tmpPath\" is required", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "\"group\" is required", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "\"language\" is required", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "Invalid \"name\" value", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "Invalid \"email\" value", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "Invalid \"status\" value", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "\"country\" is required if \"ssn\" is set", "index": 0, "recipient": <recipient data> } }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Update 

Updates share attributes. Updates share attribute only if parameter is set in the request body. If recipients array is present in request body then it tries to update existing (target recipient id must be set) recipient, otherwise new recipient will be added.

/share/:shareId
  • Parameters
  • shareId
    string (required) Example: 536b33d28aa660df1ed358d7Share unique identifier.
    callbackURL
    string (optional) Example: //127.0.0.1:65001/callbackEndpoint which receives message when share state changes.
    expires
    number (optional) Example: 1407329039436Expiration date. UNIX timestamp with milliseconds.
    name
    string (optional) Example: A shareShare name.
    description
    string (optional) Example: Share descriptionShare description.
    fileName
    string (optional) Example: A shareShare container filename. Filename displayed on file container download.
    auth
    string (optional)Authorization type (basic/residence)
    type
    boolean (optional) Example: parallelShare type, defaults to “parallel”. (parallel/sequential)
    status
    string (optional) Example: activeShare status (active/finished/expired/deleted)
    metadata
    object (optional)Share metadata.
    recipients
    object (optional)List of recipients.
    recipients.id
    string (optional) Example: 536b33d28aa660df1ed358d8Recipient id. If present, existing recipient will be updated. If not, new recipient will be added.
    recipients.key
    string (optional) Example: recipientKey1Unique recipient share key.
    recipients.redirectURL
    string (optional) Example: //sl.singwise.org/sw/f5424125-6e0b-4d1e-9a36-ac618b62aaecRecipient redirect URL.
    recipients.name
    string (optional) Example: Mati KuuskRecipient name.
    recipients.email
    string (optional) Example: recipient@recipient.comRecipient email.
    recipients.msisdn
    number (optional) Example: 372192304554Recipient msisdn. Accepts numeric values only (without special characters).
    recipients.ssn
    string (optional) Example: 14212128025Recipient social security number.
    recipients.language
    string (required) Example: en-GBRecipient language.S upported languages: et-EE, en-EE, ru-EE, en-LV, ru-LV, lv-LV, en-LT, ru-LT, lt-LT, en-AZ, az-AZ, en-FI, fi-FI.
    recipients.bcc
    boolean (optional)Blind copy flag. If set to true then recipient only sees himself and other recipients doesn’t see him.
    recipients.country
    string (required) Example: EERecipient country. Required if ssn is set. Supported countries: EE, LV, LT, AZ, FI
    recipients.tmpPath
    string (required) Example: //fp/path/to/mati-tmpRecipient tmp path.
    recipients.group
    number (optional) Example: 0Recipient group. Defaults to 0. Used and required by sequential share.
    recipients.expires
    number (optional) Example: 1407329039436Expiration date. UNIX timestamp with milliseconds.
    recipients.role
    string (optional) Example: signerRecipient role (signer/viewer). Defaults to signer.
    recipients.status
    string (optional) Example: activeRecipient status (active/queued/declined/signed/deleted/expired).
    recipients.disableReasonField
    boolean (optional)Reason field switch. If set to true then recipient cannot enter reason field in Signlink.
    recipients.visualSignature
    object (optional)When shared object is PDF or SignWise document then you can use this property to allow visual signature badge to be placed on the document.
    recipients.visualSignature.type
    sting (required) Example: coordinatesVisual signature placement type. Types are as follows: placeholder – visual signature is placed on top of the placeholer (text) in the SignWise document; user – Signatory can drag and drop the visual signature on the PDF document; coordinates – Visual signature is placed on the coordinates described in the recepient object.
    recipients.visualSignature.placeholder
    string (required) Example: [my placeholder]Visual signature position in the document. This field is only required with visualSignature.type of placeholder.
    recipients.visualSignature.coordinates
    array (required)Array of two integers (points – pt) where the first value represents X coordinate and the second Y coordinate. This property is only needed when visualSignature.type is coordinates.
    recipients.visualSignature.page
    integer (required) Example: 1Describes the page in the PDF document, where the signature should be placed. This property is only needed when visualSignature.type is coordinates.
    recipients.notifications
    array (optional)List of notifications.
    recipients.notifications.template
    string (required) Example: share-createPredefined notification type/template. Recipients currently supports only share-reminder.
    recipients.notifications.sendAt
    number (required) Example: 1407329039436Send date. UNIX timestamp with milliseconds.
    recipients.notifications.transports
    array (required) Example: emailList of transport to use to deliver notification to the share recipients. Currently supported transports: “email”
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "name": "A share",
      "fileName": "file.ddoc",
      "inputPath": "//fp/path/to/container",
      "containerType": "ddoc",
      "callbackURL": "//127.0.0.1:65001/callback",
      "expires":"1407929731426",
      "auth": "basic",
      "type": "parallel",
      "metadata": {
        "field1": "value1"
      },
      "sharer": {
        "name": "Sharer Name",
        "email", "Sharer email"
      },
      "recipients": [
        {
          "id": "136b33d28aa660df1ed358d5",
          "name": "Mari Kuusk"
          "notifications":[
            {
              "template":"share-reminder",
              "sendAt":"1407329339232",
              "transports":[
                "email"
              ]
            }
          ]
        },
        {
          "name": "Mati Kuusk",
          "redirectURL": "//sl/sw/f5424125-6e0b-4d1e-9a36-ac618b62aaec",
          "tmpPath": "//fp/path/to/mati-tmp",
          "country": "EE",
          "language": "en-GB",
          "ssn": "14212128025",
          "role": "signer",
          "metadata": {
            "field1": "value1"
          },
          "bcc": true,
          "group": 0
        }
      ]
    }
    
  • Response  200Toggle
  • Body
    {
      "id":"536b33d28aa660df1ed358d7"
      "name": "A share",
      "fileName": "file.ddoc",
      "callbackURL": "//127.0.0.1:65001/callback",
      "expires": "1407929731426",
      "status": "active",
      "metadata": {
        "field1": "value1"
      },
      "sharer": {
        "name": "Sharer Name",
        "email", "Sharer email"
      },
      "recipients": [
        {
          "id": "536b33d28aa660df1ed358d8"
          "signlinkURL": "//sl/sw/f5424125-6e0b-4d1e-9a36-ac618b62aaec",
          "redirectURL": "//sl/sw/f5424125-6e0b-4d1e-9a36-ac618b62aaec",
          "key": "f5424125-6e0b-4d1e-9a36-ac618b62aaec",
          "ssn": "14212128025",
          "metadata": {
            "field1": "value1"
          },
          "bcc": true,
          "group": 0,
          "country": "EE",
          "language": "en-GB",
          "tmpPath": "//fp/path/to/mati-tmp",
          "name": "Mati Kuusk",
          "role": "signer",
          "status": "active",
          "modified": "1407329039436"
        }
      ],
      "created": "1407329039436",
      "auth": "basic",
      "type": "parallel"
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "Share not found" }
    { "message": "Validation error", "reason": "Recipient not found" }
    { "message": "Validation error", "reason": "Invalid \"auth\" value" }
    { "message": "Validation error", "reason": "Invalid \"expires\" value" }
    { "message": "Validation error", "reason": "Expiration date is too near in the future" }
    { "message": "Validation error", "reason": "Expiration date is greater than the share expiration date" }
    { "message": "Validation error", "reason": "Invalid \"callbackURL\" value" }
    { "message": "Validation error", "reason": "Invalid \"status\" value" }
    { "message": "Validation error", "reason": { "message": "Can't change \"key\" value", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "\"tmpPath\" is required", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "\"language\" is required", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "Invalid \"name\" value", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "Invalid \"email\" value", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "Invalid \"status\" value", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "\"country\" is required if \"ssn\" is set", "index": 0, "recipient": <recipient data> } }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Delete 

Changes target share status to “deleted” (soft delete). Also changes its recipients statuses to “deleted”.

/share/:shareId
  • Parameters
  • shareId
    string (required) Example: 536b33d28aa660df1ed358d7Share id.
    message
    object (optional)Optional delete message.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "message": {
        "en-US": "Share was deleted",
        "et-EE": "Jagamine kustutati"
      }
    }
    
  • Response  200Toggle
  • Body
    {
      "id":"536b33d28aa660df1ed358d7"
      "name": "A share",
      "fileName": "file.ddoc",
      "callbackURL": "//127.0.0.1:65001/callback",
      "expires": "1407929731426",
      "status": "deleted",
      "metadata": {
        "field1": "value1"
      },
      "sharer": {
        "name": "Sharer Name",
        "email", "Sharer email"
      },
      "recipients": [
        {
          "id": "536b33d28aa660df1ed358d8"
          "signlinkURL": "//sl/sw/f5424125-6e0b-4d1e-9a36-ac618b62aaec",
          "redirectURL": "//sl/sw/f5424125-6e0b-4d1e-9a36-ac618b62aaec",
          "key": "f5424125-6e0b-4d1e-9a36-ac618b62aaec",
          "ssn": "14212128025",
          "metadata": {
            "field1": "value1"
          },
          "country": "EE",
          "language": "en-GB",
          "tmpPath": "//fp/path/to/mati-tmp",
          "name": "Mati Kuusk",
          "role": "signer",
          "status": "deleted",
          "modified": "1407329039436"
        }
      ],
      "created": "1407329039436",
      "auth": "basic",
      "type": "parallel"
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "Share not found" }
    { "message": "Validation error", "reason": "Recipient not found" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Recipient 

Create 

Adds a new recipient to share.

/share/:shareId/recipient
  • Parameters
  • shareId
    string (required) Example: 536b33d28aa660df1ed358d7Share id.
    key
    string (optional) Example: recipientKey1Unique recipient share key.
    name
    string (optional) Example: Mati KuuskRecipient name.
    ssn
    string (optional) Example: 14212128025Recipient social security number.
    bcc
    boolean (optional)Blind copy flag. If set to true then recipient only sees himself and other recipients doesn’t see him.
    language
    string (required) Example: en-GBRecipient language.
    email
    string (optional) Example: recipient@recipient.comRecipient email. Required if one of the notifications requires “email” transport.
    msisdn
    number (optional) Example: 372192304554Recipient msisdn. Required if one of the notifications requires “sms” transport. Accepts numeric values only (without special characters).
    country
    string (required) Example: EERecipient country. Required if ssn is set.
    tmpPath
    string (required) Example: //fp/path/to/mati-tmpRecipient tmp path.
    group
    number (optional) Example: 0Recipient group. Defaults to 0. Used and required by sequential share.
    expires
    number (optional) Example: 1407329039436Expiration date. UNIX timestamp with milliseconds.
    role
    string (optional) Example: signerRecipient role (signer/viewer). Defaults to signer.
    status
    string (optional) Example: activeRecipient status (active/declined/signed/deleted).
    disableReasonField
    boolean (optional)Reason field switch. If set to true then recipient cannot enter reason field in Signlink.
    visualSignature
    object (optional)When shared object is PDF or SignWise document then you can use this property to allow visual signature badge to be placed on the document.
    visualSignature.type
    sting (required) Example: coordinatesVisual signature placement type. Types are as follows: placeholder – visual signature is placed on top of the placeholer (text) in the SignWise document; user – Signatory can drag and drop the visual signature on the PDF document; coordinates – Visual signature is placed on the coordinates described in the recepient object.
    visualSignature.placeholder
    string (required) Example: [my placeholder]Visual signature position in the document. This field is only required with visualSignature.type of placeholder.
    visualSignature.coordinates
    array (required)Array of two integers (points – pt) where the first value represents X coordinate and the second Y coordinate. This property is only needed when visualSignature.type is coordinates.
    visualSignature.page
    integer (required) Example: 1Describes the page in the PDF document, where the signature should be placed. This property is only needed when visualSignature.type is coordinates.
    notifications
    array (optional)List of notifications for the recipient.
    notifications.template
    string (required) Example: share-reminderPredefined notification type/template. Recipients currently supports only share-reminder.
    notifications.sendAt
    number (required) Example: 1407329039436Send date. UNIX timestamp with milliseconds.
    notifications.transports
    array (required) Example: emailList of transport to use to deliver notification to the share recipients. Currently supported transports: “email”
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "name": "Mati Kuusk",
      "tmpPath": "//fp/path/to/mati-tmp",
      "country": "EE",
      "language": "en-GB",
      "ssn": "14212128025",
      "role": "signer",
      "visualSignature": {
        "type": "coordinates",
        "page": 1,
        "coordinates": [10, 300]
      },
      "notifications":[
        {
          "template":"share-reminder",
          "sendAt":"1407329339232",
          "transports":[
            "email"
          ]
        }
      ]
    }
    
  • Response  200Toggle
  • Body
    {
      "id": "536b33d28aa660df1ed358d8"
      "signlinkURL": "//sl/sw/f5424125-6e0b-4d1e-9a36-ac618b62aaec",
      "redirectURL": "//sl/sw/f5424125-6e0b-4d1e-9a36-ac618b62aaec",
      "key": "f5424125-6e0b-4d1e-9a36-ac618b62aaec",
      "ssn": "14212128025",
      "country": "EE",
      "language": "en-GB",
      "tmpPath": "//fp/path/to/mati-tmp",
      "name": "Mati Kuusk",
      "role": "signer",
      "visualSignature": {
        "type": "coordinates",
        "page": 1,
        "coordinates": [10, 300]
      },
      "status": "active",
      "modified": "1407329039436"
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "Share not found" }
    { "message": "Validation error", "reason": { "message": "Can't change \"key\" value", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "Expiration date is greater than the share expiration date", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "\"tmpPath\" is required", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "\"group\" is required", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "\"language\" is required", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "\"group\" is required", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "Invalid \"name\" value", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "Invalid \"email\" value", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "Invalid \"status\" value", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "\"country\" is required if \"ssn\" is set", "index": 0, "recipient": <recipient data> } }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Update 

Update share recipient attributes. Performs partial update. Updates share field only if parameter is set in the request body. Requires recipient unique id.

/share/:shareId/recipient/:recipientId
  • Parameters
  • shareId
    string (required) Example: 536b33d28aa660df1ed358d7Share id.
    recipientId
    string (required) Example: 536b33d28aa660df1ed358d8Recipient id.
    key
    string (optional) Example: recipientKey1Unique recipient share key.
    name
    string (optional) Example: Mati KuuskRecipient name.
    ssn
    string (optional) Example: 14212128025Recipient social security number.
    bcc
    boolean (optional)Blind copy flag. If set to true then recipient only sees himself and other recipients doesn’t see him.
    email
    string (optional) Example: recipient@recipient.comRecipient email.
    msisdn
    number (optional) Example: 372192304554Recipient msisdn. Accepts numeric values only (without special characters).
    language
    string (optional) Example: en-GBRecipient language.
    country
    string (optional) Example: EERecipient country. Required if ssn is set.
    tmpPath
    string (optional) Example: //fp/path/to/mati-tmpRecipient tmp path.
    group
    number (optional) Example: 0Recipient group. Defaults to 0. Used and required by sequential share.
    expires
    number (optional) Example: 1407929731426Expiration date. UNIX timestamp with milliseconds.
    role
    string (optional) Example: signerRecipient role (signer/viewer). Defaults to signer.
    status
    string (optional) Example: activeRecipient status (active/declined/signed/deleted).
    disableReasonField
    boolean (optional)Reason field switch. If set to true then recipient cannot enter reason field in Signlink.
    visualSignature
    object (optional)When shared object is PDF or SignWise document then you can use this property to allow visual signature badge to be placed on the document.
    visualSignature.type
    sting (required) Example: coordinatesVisual signature placement type. Types are as follows: placeholder – visual signature is placed on top of the placeholer (text) in the SignWise document; user – Signatory can drag and drop the visual signature on the PDF document; coordinates – Visual signature is placed on the coordinates described in the recepient object.
    visualSignature.placeholder
    string (required) Example: [my placeholder]Visual signature position in the document. This field is only required with visualSignature.type of placeholder.
    visualSignature.coordinates
    array (required)Array of two integers (points – pt) where the first value represents X coordinate and the second Y coordinate. This property is only needed when visualSignature.type is coordinates.
    visualSignature.page
    integer (required) Example: 1Describes the page in the PDF document, where the signature should be placed. This property is only needed when visualSignature.type is coordinates.
    notifications
    array (optional)List of notifications for the recipient.
    notifications.template
    string (required) Example: share-reminderPredefined notification type/template. Recipients currently supports only share-reminder.
    notifications.sendAt
    number (required) Example: 1407329039436Send date. UNIX timestamp with milliseconds.
    notifications.transports
    array (required) Example: emailList of transport to use to deliver notification to the share recipients. Currently supported transports: “email”
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "name": "Mati Kuusk",
      "tmpPath": "//fp/path/to/mati-tmp",
      "country": "EE",
      "language": "en-GB",
      "ssn": "14212128025",
      "bcc": false,
      "role": "signer",
      "notifications":[
        {
          "template":"share-reminder",
          "sendAt":"1407329339231",
          "transports":[
            "email"
          ]
        }
      ]
    }
    
  • Response  200Toggle
  • Body
    {
      "id": "536b33d28aa660df1ed358d8"
      "signlinkURL": "//sl/sw/f5424125-6e0b-4d1e-9a36-ac618b62aaec",
      "redirectURL": "//sl/sw/f5424125-6e0b-4d1e-9a36-ac618b62aaec",
      "key": "f5424125-6e0b-4d1e-9a36-ac618b62aaec",
      "ssn": "14212128025",
      "bcc": false,
      "country": "EE",
      "language": "en-GB",
      "tmpPath": "//fp/path/to/mati-tmp",
      "name": "Mati Kuusk",
      "role": "signer",
      "status": "active",
      "modified": "1407329039436"
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "Share not found" }
    { "message": "Validation error", "reason": "Recipient not found" }
    { "message": "Validation error", "reason": { "message": "Can't change \"key\" value", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "Expiration date is greater than the share expiration date", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "\"tmpPath\" is required", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "\"language\" is required", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "Invalid \"name\" value", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "Invalid \"email\" value", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "Invalid \"status\" value", "index": 0, "recipient": <recipient data> } }
    { "message": "Validation error", "reason": { "message": "\"country\" is required if \"ssn\" is set", "index": 0, "recipient": <recipient data> } }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Delete 

Changes target recipient status to “deleted” (soft delete).

/share/:shareId/recipient/:recipientId
  • Parameters
  • shareId
    string (required) Example: 536b33d28aa660df1ed358d7Share id.
    recipientId
    string (required) Example: 536b33d28aa660df1ed358d8Recipient id.
  • Response  200Toggle
  • Body
    {
      "id": "536b33d28aa660df1ed358d8"
      "signlinkURL": "//sl/sw/f5424125-6e0b-4d1e-9a36-ac618b62aaec",
      "redirectURL": "//sl/sw/f5424125-6e0b-4d1e-9a36-ac618b62aaec",
      "key": "f5424125-6e0b-4d1e-9a36-ac618b62aaec",
      "ssn": "14212128025",
      "bcc": false,
      "country": "EE",
      "language": "en-GB",
      "tmpPath": "//fp/path/to/mati-tmp",
      "name": "Mati Kuusk",
      "role": "signer",
      "status": "deleted",
      "modified": "1407329039436"
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "Share not found" }
    { "message": "Validation error", "reason": "Recipient not found" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Sign 

Prepare 

Prepares file container for new signature. Returns signatureId and digest which are required to create and finalize signature. Writes prepared file container to path defined by tmpPath. tmpPath must be different from inputPath. shareId and recipientId are only required in share context. If recipient is set then its tmpPath is used instead of global tmpPath. To add new signatures to file container SignWise Services API backend implements signature generators where encryption procedure is kept external. This enables the use of cryptographic tokens where private key is not extractable and encryption has to be done on the token (e.g. smart card, mobile-ID). For that reason the signing procedure consists of two steps, prepare and finalize.

/container/sign/prepare
  • Parameters
  • containerType
    string (required) Example: ddocContainer type.
    inputPath
    string (required) Example: //fp/path/to/containerContainer input path.
    tmpPath
    string (required) Example: //fp/path/to/tmpContainer temp path.
    shareId
    string (optional) Example: 536a22f42f63584e12aee8eaAssociated share id.
    recipientId
    string (optional) Example: 536a22f42f63584e12aee8eaAssociated recipient id.
    supportedHashes
    array (optional) Example: [ “SHA1” ]List of supported hashing algorithms.
    signerInfo
    object (required)
    signerInfo.certificate
    string (required)Public certificate data.
    signerInfo.certificateChain
    array (optional)Certificate chain data. Applicable to some countries.
    signerInfo.country
    string (optional) Example: EECountry ISO code.
    signerInfo.state
    string (optional) Example: HarjuState name.
    signerInfo.city
    string (optional) Example: TallinnCity.
    signerInfo.postalCode
    string (optional) Example: 5111000Postal code.
    signerInfo.role
    string (optional) Example: UserSigner role. Defaults to signer.
    signerInfo.visualSignature
    object (optional)Is used with only PDF type of documents to add a badge to the document.
    signerInfo.visualSignature.placeholder
    string (optional) Example: placeholderIs used to place badge where the last “placeholder” is in the document.
    signerInfo.visualSignature.page
    number (optional) Example: 1Is used to set the page where the badge should be. Use this parameter without placeholder parameter.
    signerInfo.visualSignature.x
    integer (optional) Example: 56Is used to set the X coordinates in the page where the badge will be placed. Use this parameter without placeholder parameter.
    signerInfo.visualSignature.y
    integer (optional) Example: 99Is used to set the Y coordinates in the page where the badge will be placed. Use this parameter without placeholder parameter.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "inputPath": "//fp/path/to/container",
      "tmpPath": "//fp/path/to/tmp",
      "containerType": "ddoc",
      "supportedHashes": [
        "SHA1"
      ],
      "signerInfo": {
        "certificate": "-----BEGIN CERTIFICATE-----\r\nMIIEqDCCA5CgAwIBAgIQXZSW5EBkctNPfCkprF2XsTANBgkqhkiG9w0BAQUFADBs\r\nMQswCQYDVQQGEwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1\r\nczEfMB0GA1UEAwwWVEVTVCBvZiBFU1RFSUQtU0sgMjAxMTEYMBYGCSqGSIb3DQEJ\r\nARYJcGtpQHNrLmVlMB4XDTEyMDQwNDEwNTc0NFoXDTE1MDQwNDIwNTk1OVowga4x\r\nCzAJBgNVBAYTAkVFMRswGQYDVQQKDBJFU1RFSUQgKE1PQklJTC1JRCkxGjAYBgNV\r\nBAsMEWRpZ2l0YWwgc2lnbmF0dXJlMSgwJgYDVQQDDB9URVNUTlVNQkVSLFNFSVRT\r\nTUVTLDE0MjEyMTI4MDI1MRMwEQYDVQQEDApURVNUTlVNQkVSMREwDwYDVQQqDAhT\r\nRUlUU01FUzEUMBIGA1UEBRMLMTQyMTIxMjgwMjUwgZ8wDQYJKoZIhvcNAQEBBQAD\r\ngY0AMIGJAoGBAMFo0cOULrm6HHJdMsyYVq6bBmCU4rjg8eonNnbWNq9Y0AAiyIQv\r\nJ3xDULnfwJD0C3QI8Y5RHYnZlt4U4Yt4CI6JenMySV1hElOtGYP1EuFPf643V11t\r\n/mUDgY6aZaAuPLNvVYbeVHv0rkunKQ+ORABjhANCvHaErqC24i9kv3mVAgMBAAGj\r\nggGFMIIBgTAJBgNVHRMEAjAAMA4GA1UdDwEB/wQEAwIGQDCBmQYDVR0gBIGRMIGO\r\nMIGLBgorBgEEAc4fAwEBMH0wWAYIKwYBBQUHAgIwTB5KAEEAaQBuAHUAbAB0ACAA\r\ndABlAHMAdABpAG0AaQBzAGUAawBzAC4AIABPAG4AbAB5ACAAZgBvAHIAIAB0AGUA\r\ncwB0AGkAbgBnAC4wIQYIKwYBBQUHAgEWFWh0dHA6Ly93d3cuc2suZWUvY3BzLzAn\r\nBgNVHREEIDAegRxzZWl0c21lcy50ZXN0bnVtYmVyQGVlc3RpLmVlMB0GA1UdDgQW\r\nBBSBiUUnibDAPTHAuhRAwSvWzPfoEjAYBggrBgEFBQcBAwQMMAowCAYGBACORgEB\r\nMB8GA1UdIwQYMBaAFEG2/sWxsbRTE4z6+mLQNG1tIjQKMEUGA1UdHwQ+MDwwOqA4\r\noDaGNGh0dHA6Ly93d3cuc2suZWUvcmVwb3NpdG9yeS9jcmxzL3Rlc3RfZXN0ZWlk\r\nMjAxMS5jcmwwDQYJKoZIhvcNAQEFBQADggEBAKPzonf5auRAC8kX6zQTX0yYeQvv\r\nl2bZdbMmDAp07g3CxEaC6bk8DEx9pOJR2Wtm7J9wQke6+HpLEGgNVTAllm+oE4sU\r\nVsaIqFmrcqilWqeWIpj5uR/yU4GDDD9jAGFZtOLaFgaGCwE5++q/LZhosyyAGgvD\r\nyl+yGm5IxTRQ9uflppNZ7k2LoFkoDJhgqHqMZQjwN1kJQ/VBReCRMGUVj5wkBLTJ\r\no9GcMiugyKQib9I6vV9TdemUXKgL+MYp2S8LeIBt0eUXvpp8n/3HIKJIyJpdVvK1\r\nwX5bWYM2o6dT7FAftrkVnShTsEACuRBYSi/4a4hTsSeQTa2Oz1GoNZ7ADXI=\r\n-----END CERTIFICATE-----\r\n",
        "country": "EE",
        "city": "Tallinn",
        "state": "Harju",
        "postalCode": "5111000",
        "role": "User",
        "visualSignature": {
          "page": 1,
          "x": 56.7,
          "y": 99
        }
      },
      "shareId": "536a3788b372282419a7fead",
      "recipientId": "536a3788b372282419a7feae"
    }
    
  • Response  200Toggle
  • Body
    {
      "signatureId": "S0",
      "digest": "3a8482b44a12600db2b67dd273a14becaeca03fa92e7bf13d85a6f3b03d6dca47c3cb77cd735ebe00bfd8442c5ac90d85c65705294c37531e749092a34560e5be7e54b1e3fc05f75def9a652e18417694f64a0a4735311ae20db856759a0caddd3a22d5b69df9ce2cf8a607d82e561e9e5274511cd63ab4a16ae8e3ac77a7970924d520159c7189ee86a91b8447be94b70c06adabeeb513336df10bef25cb2205dcc6028ff6158e5cea4098c11642c150ca62845567a535ded6e8703a8d79e8fa5d4f65022c57dd00b6e88bacafbf48cef1a9fea3705e646f33f9219af2ab81ce18c7aa3fece2bbe2993b352639210a76afde687d883d5445d036892a904ea37","shareId":"536a4261f1b2dacc1b90df9c","recipientId":"536a4261f1b2dacc1b90df9d",
      "digestType": "SHA-1"
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "\"containerType\" is required" }
    { "message": "Validation error", "reason": "\"inputPath\" is required" }
    { "message": "Validation error", "reason": "\"tmpPath\" is required" }
    { "message": "Validation error", "reason": "\"supportedHashes\" is required" }
    { "message": "Validation error", "reason": "\"signerInfo.certificate\" is required" }
    { "message": "Validation error", "reason": "Invalid parameters in the singerInfo object." }
    { "message": "Validation error", "reason": "Invalid parameters in the singerInfo.visualSignature object." }
    { "message": "Validation error", "reason": "Visual signature placeholder not found in the document." }
    { "message": "Validation error", "reason": "Invalid \"signerInfo.visualSignature\" value" }
    { "message": "Validation error", "reason": "Visual signature page is out of range." }
    { "message": "Validation error", "reason": "Visual signature coordinates are out of range." }
    { "message": "Validation error", "reason": "\"visualSignature.page\" is required" }
    { "message": "Validation error", "reason": "\"visualSignature.x\" is required" }
    { "message": "Validation error", "reason": "\"visualSignature.y\" is required" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  422Toggle
  • Body
    { "message": "Lock error", "reason": "File container is locked" }
    
  • Response  425Toggle
  • Body
    { "message": "Recipient error", "reason": "Recipient country and/or ssn doesn't match with certificate values" }
    { "message": "Recipient error", "reason": "Invalid recipient status" }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Finalize 

Finalizes file container signature. Expects valid signature value. inputPath value should match with prepare step inputPath value, otherwise signature finalize will fail. If finalize succeeds then original file container will be overwritten. Changes recipient status to “signed”.

/container/sign/finalize
  • Parameters
  • containerType
    string (required) Example: ddocContainer type.
    inputPath
    string (required) Example: //fp/path/to/containerContainer input path.
    signatureValue
    string (required)Signature value.
    plugin
    string (optional) Example: swPlugin that was used for signing. Valid values are “sw” and “ee”.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "inputPath": "//fp/path/to/container",
      "containerType": "ddoc",
      "signatureValue": "3a8482b44a12600db2b67dd273a14becaeca03fa92e7bf13d85a6f3b03d6dca47c3cb77cd735ebe00bfd8442c5ac90d85c65705294c37531e749092a34560e5be7e54b1e3fc05f75def9a652e18417694f64a0a4735311ae20db856759a0caddd3a22d5b69df9ce2cf8a607d82e561e9e5274511cd63ab4a16ae8e3ac77a7970924d520159c7189ee86a91b8447be94b70c06adabeeb513336df10bef25cb2205dcc6028ff6158e5cea4098c11642c150ca62845567a535ded6e8703a8d79e8fa5d4f65022c57dd00b6e88bacafbf48cef1a9fea3705e646f33f9219af2ab81ce18c7aa3fece2bbe2993b352639210a76afde687d883d5445d036892a904ea37"
    }
    
  • Response  200Toggle
  • Body
    {
      "container": {
        "type": "ddoc",
        "path": "//fp/path/to/container",
        "data": {
          "signatures": [
            {
              "id": "S0",
              "profile": "TM",
              "status": "OK_TEST",
              "errors": [],
              "warnings": [],
              "signingTime": 1408605660000,
              "roles": [],
              "place": {
                "city": null,
                "state": null,
                "postalCode": null,
                "country": null
              },
              "signerCertificate": {
                "issuer": {
                  "raw": "email=test@signwise.org, commonName=SIGNWISE TEST, organization=SignWise Corporation Ltd., country=GB",
                  "country": "GB",
                  "email": "test@signwise.org",
                  "commonName": "TEST CARD 2014",
                  "organization": "SignWise Corporation Ltd."
                },
                "subject": {
                  "raw": "identificationCode=47101010033, firstName=John, lastName=Doe, commonName=\"Doe,John,47101010033\", unitName=digital signature, organization=SIGNID, country=GB",
                  "country": "GB",
                  "identificationCode": "47101010033",
                  "firstName": "JOHN",
                  "lastName": "DOE",
                  "commonName": "\"DOE",
                  "organization": "SIGNID",
                  "unitName": "digital signature"
                },
                "validFrom": 1360154523000,
                "validTo": 1517695199000,
                "serial": "51979518684612199197274112989154467246"
              },
              "confirmation": {
                "responderId": "C=GB,O=SignWise Corporation Ltd.,OU=OCSP,CN=TEST OCSP,E=test@signwise.org",
                "producedAt": 1408605667000,
                "certificate": {
                  "issuer": {
                    "raw": "email=test@signwise.org, commonName=TEST of CA, organization=SignWise Corporation limited, country=GB",
                    "country": "EE",
                    "email": "test@signwise.org",
                    "commonName": "TEST CA",
                    "organization": "SignWise Corporation Ltd."
                  },
                  "subject": {
                    "raw": "email=test@signwise.org, commonName=TEST of SK OCSP RESPONDER 2011, unitName=OCSP, organization=SignWise Corporation Ltd., country=GB",
                    "country": "EE",
                    "email": "test@signwise.org",
                    "commonName": "TEST OCSP",
                    "organization": "SignWise Corporation Ltd.",
                    "unitName": "OCSP"
                  },
                  "validFrom": 1299504165000,
                  "validTo": 1725711765000,
                  "serial": "138983222239407220571566848351990841243"
                }
              },
              "timestamps": []
            }
          ],
          "dataFiles": [
            {
              "path":"//fp/path/to/container/file-1",
              "size": 705298,
              "mimeType": "application/octet-stream",
              "fileName": "file1",
              "id": "D0"
            },
            {
              "path":"//fp/path/to/container/file-2",
              "size": 705298,
              "mimeType": "application/octet-stream",
              "fileName": "file2",
              "id": "D1"
            }
          ],
          "size": 705617,
          "version": "1.3",
          "format": "DIGIDOC-XML"
        },
        "shares ":[],
        "locked": false,
        "lockModified": "1407329039436"
      }
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "\"containerType\" is required" }
    { "message": "Validation error", "reason": "\"inputPath\" is required" }
    { "message": "Validation error", "reason": "\"signatureValue\" is required" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Decline 

Declines recipient signature request. Changes recipient status to “declined”.

/container/sign/decline
  • Parameters
  • containerType
    string (required) Example: ddocContainer type.
    inputPath
    string (required) Example: //fp/path/to/containerContainer input path.
    message
    string (optional)Optional recipient decline message.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "inputPath": "//fp/path/to/container",
      "containerType": "ddoc"
    }
    
  • Response  200
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "\"containerType\" is required" }
    { "message": "Validation error", "reason": "\"inputPath\" is required" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Cancel 

Cancels signing process and unlocks file container.

/container/sign/cancel
  • Parameters
  • containerType
    string (required) Example: ddocContainer type.
    inputPath
    string (required) Example: //fp/path/to/containerContainer input path.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "inputPath": "//fp/path/to/container",
      "containerType": "ddoc"
    }
    
  • Response  200
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "\"containerType\" is required" }
    { "message": "Validation error", "reason": "\"inputPath\" is required" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Mobile 

Prepare file container for mobile signature, and finalize after successful signature. ASAN requires userInfo.id. DDOC/BDOC/EDOC/PDF requires userInfo.ssn.

/container/sign/mobile
  • Parameters
  • containerType
    string (required) Example: ddocContainer type.
    inputPath
    string (required) Example: //fp/path/to/containerContainer input path.
    tmpPath
    string (required) Example: //fp/path/to/containerContainer tmp path.
    callbackURL
    string (required) Example: 536a22f42f63584e12aee8eaCallback URL. Will be called once the signing process is complete.
    message
    string (optional)Custom message to display the user. Limited to 40 characters.
    shareId
    string (optional) Example: 536a22f42f63584e12aee8eaAssociated share id.
    recipientId
    string (optional) Example: 536a22f42f63584e12aee8eaAssociated recipient id.
    userInfo
    object (required)userInfo object.
    userInfo.id
    number (optional) Example: 1ASAN user id.
    userInfo.language
    string (required) Example: etUser language.
    userInfo.ssn
    number (optional) Example: 51001091072Social security number.
    userInfo.msisdn
    number (required) Example: 37260000007Mobile Subscriber ISDN Number. Accepts numeric values only (without special characters).
    signerInfo
    object (optional)
    signerInfo.certificateSerial
    string (optional)Public certificate serial code.
    signerInfo.country
    string (optional) Example: GBCountry ISO code.
    signerInfo.state
    string (optional) Example: London CityState name.
    signerInfo.city
    string (optional) Example: LondonCity.
    signerInfo.postalCode
    string (optional) Example: EC1A 2BNPostal code.
    signerInfo.role
    string (optional) Example: UserSigner role. Defaults to signer.
    signerInfo.visualSignature
    object (optional)Is used with only PDF type of documents to add a badge to the document.
    signerInfo.visualSignature.placeholder
    string (optional) Example: placeholderIs used to place badge where the last “placeholder” is in the document.
    signerInfo.visualSignature.page
    number (optional) Example: 1Is used to set the page where the badge should be. Use this parameter without placeholder parameter.
    signerInfo.visualSignature.x
    integer (optional) Example: 56Is used to set the X coordinates in the page where the badge will be placed. Use this parameter without placeholder parameter.
    signerInfo.visualSignature.y
    integer (optional) Example: 99Is used to set the Y coordinates in the page where the badge will be placed. Use this parameter without placeholder parameter.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "inputPath": "//fp/path/to/container",
      "tmpPath": "//fp/path/to/tmp",
      "containerType": "ddoc",
      "callbackURL": "//127.0.0.1:65001/callback",
      "message": "Sign file",
      "signerInfo" :{
        "country": "EE",
        "city": "London",
        "state": "London City",
        "postalCode": "EC1A 2BN",
        "role": "User",
        "visualSignature": {
          "page": 1,
          "x": 56.7,
          "y": 99
        }
      },
      "userInfo": {
        "id": 34324343,
        "language": "et",
        "ssn": "51001091072",
        "msisdn": 37260000007
      }
    }
    
  • Response  200Toggle
  • Body
    {
      "sessionCode": "1234567890",
      "verificationCode": "1234567890"
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "\"containerType\" is required" }
    { "message": "Validation error", "reason": "\"inputPath\" is required" }
    { "message": "Validation error", "reason": "\"tmpPath\" is required" }
    { "message": "Validation error", "reason": "\"callbackURL\" is required" }
    { "message": "Validation error", "reason": "\"message\" is too long" }
    { "message": "Validation error", "reason": "\"userInfo\" is required" }
    { "message": "Validation error", "reason": "\"userInfo.language\" is required" }
    { "message": "Validation error", "reason": "\"userInfo.msisdn\" is required" }
    { "message": "Validation error", "reason": "Invalid \"userInfo.msisdn\" value" }
    { "message": "Validation error", "reason": "Invalid parameters in the singerInfo object." }
    { "message": "Validation error", "reason": "Invalid parameters in the singerInfo.visualSignature object." }
    { "message": "Validation error", "reason": "Visual signature placeholder not found in the document." }
    { "message": "Validation error", "reason": "Invalid \"signerInfo.visualSignature\" value" }
    { "message": "Validation error", "reason": "Visual signature page is out of range." }
    { "message": "Validation error", "reason": "Visual signature coordinates are out of range." }
    { "message": "Validation error", "reason": "\"visualSignature.page\" is required" }
    { "message": "Validation error", "reason": "\"visualSignature.x\" is required" }
    { "message": "Validation error", "reason": "\"visualSignature.y\" is required" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Plugin 

Communications 

Retrieves plugin version status based on input data and logs plugin errors along with plugin details for debugging purposes.   Possible values of pluginVersionStatus

Value Description
10 User has the latest plugin version
20 We do not support your smart card yet. Please contact customer support.
30 You need to update your version of SignWise Plugin to use this smart card.
40 An update is available for your SignWise Plugin.
50 An important security update is required to use SignWise Plugin.
/plugin/com
  • Parameters
  • errorCode
    string (optional) Example: unknown_cardPlugin error code. List of expected error codes (not final): no_reader, no_card, unknown_card, user_cancel_pin, user_cancel_cert, technical_error, plugin_outdated
    errorDetails
    string (optional) Example: 4|0|Unknown card in reader, ATR: 3b9f96803fc7008031e073fe211b6407720c0082900098Plugin error details. May be used to detect if ATR is supported in the latest plugin version.
    version
    string (optional) Example: 1.10.4.1The plugin version being used
    isChromeExtension
    boolean (optional)Indicates if Chrome extension is being used
    lang
    string (optional) Example: etLanguage used for initializing the plugin
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "errorCode": "unknown_card",
      "errorDetails": "4|0|Unknown card in reader, ATR: 3b9f96803fc7008031e073fe211b6407720c0082900098",
      "version": "1.10.4.1",
      "isChromeExtension": true,
      "lang": "et",
      "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36"
    }
    
  • Response  200Toggle
  • Body
    {
      "pluginVersionStatus": 20
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

User 

Logs 

Returns file container operations log for current user. Accepts additional parameters as an optional filter.

/user/log
  • Parameters
  • inputPath
    string (optional) Example: //fp/path/to/containerContainer input path.
    shareId
    string (optional) Example: 536a22f42f63584e12aee8ecShare id.
    startTime
    number (optional) Example: 1407329039436Since when (included) the entries shoulb be queried. UNIX timestamp with milliseconds.
    endTime
    number (optional) Example: 1407329039436until when (not included) the entries shoulb be queried. UNIX timestamp with milliseconds.
    pageNo
    number (optional) Example: 1Each request will return specific number of rows (default 500, configurable for brand via support). If there are more rows to return, next batch is accessible with pageNo=2…..N.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "inputPath":"//fp/path/to/container",
      "shareId": "536a22f42f63584e12aee8ec",
      "startTime": "1407329039436",
      "endTime": "1407339039436",
      "pageNo": 5
    }
    
  • Response  200Toggle
  • Body
    {
      "entries":[
        {
          "component": "dms",
          "certificate":"539848e9d99fa40000257295",
          "container":"53b273fa55dd6ebb49a8dd31",
          "inputPath":"//fp/path/to/container",
          "user": "53f2f17d9bed468a24d2f2d9",
          "path":"/container/info",
          "method":"POST",
          "success":true,
          "data":{
            "inputPath":"//fp/path/to/container",
            "containerType":"ddoc"
          },
          "created":"1407329039436",
          "id":"53b273fa55dd6ebb49a8dd34"
        },
        {
          "component": "dms",
          "certificate":"539848e9d99fa40000257295",
          "container":"53b273fa55dd6ebb49a8dd31",
          "inputPath":"//fp/path/to/container",
          "user": "53f2f17d9bed468a24d2f2d9",
          "path":"/container/download",
          "method":"POST",
          "success":true,
          "data":{
            "inputPath":"//fp/path/to/container",
            "containerType":"ddoc"
          },
          "created":"1407329039436",
          "id":"53b273fa55dd6ebb49a8dd38"
        },
        {
          "component": "dms",
          "certificate":"539848e9d99fa40000257295",
          "container":"53b273fa55dd6ebb49a8dd31",
          "inputPath":"//fp/path/to/container",
          "user": "53f2f17d9bed468a24d2f2d9",
          "path":"/container/info",
          "method":"POST",
          "success":true,
          "data":{
            "inputPath":"//fp/path/to/container",
            "containerType":"ddoc"
          },
          "created":"1407329039436",
          "id":"53b273fa55dd6ebb49a8dd41"
        }
      ]
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "Invalid \"startTime\" value" }
    { "message": "Validation error", "reason": "Invalid \"endTime\" value" }
    { "message": "Validation error", "reason": "Invalid \"pageNo\" value" }
    { "message": "Validation error", "reason": "Invalid \"shareId\" value" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

User authentication 

Verification 

Verifies user certificates validity by trying to decrypt user signed random digest with its public certificate and validates OCSP status.

/authentication/verify
  • Parameters
  • digest
    string (required) Example: 921f752cd9233ba18a4e186ffb4e71ae4018f3d1User generated digest value.
    signature
    object (required) Example: 8ccd641d5b8d6009a1a629add6d6a6ab7…Signed user generated digest value.
    certificate
    string (required) Example: —–BEGIN CERTIFICATE—–\r\nMIIFPDCCBCSgAwIBAgIQOJV4PJUqldROXjQ….Public certificate.
    certificateChain
    array (optional)Certificate chain data. Applicable to some countries.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "digest":"921f752cd9233ba18a4e186ffb4e71ae4018f3d1",
      "signature":"8ccd641d5b8d6009a1a629add6d6a6ab73df6608c82564ff8e6df3a165cc19782fc951cbdc296769c1e8d7d4dc47a22985f04aaca9bfebb2e2a88c40f173a6895c1f6cfbba34bf3ebfa1c058b8928004795dae3b57146562141567e1611bc274d3444d24818375f7bd0e9593d181d5984d59e7ccd2619609a08aa09506c33299f9d4915907f5ce30a4a3cc4f81383047478df6b577e11f91619929c8f3732d436303d3673d37a579642dbfc32f7d4ae6e345203bbc423e1022a951bc464dd1a6d4af5669a3cec6e6bd375a1fe441aa59363b9b633a55d52fa8bdcd1d027de7a69cc145acad58fbb8804c59af0a2505d1c92f8143f198b509742051e40cee18b1",
      "certificate":"-----BEGIN CERTIFICATE-----\r\nMIIFPDCCBCSgAwIBAgIQOJV4PJUqldROXjQRlpUldjANBgkqhkiG9w0BAQUFADBs\r\nMQswCQYDVQQGEwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1\r\nczEfMB0GA1UEAwwWVEVTVCBvZiBFU1RFSUQtU0sgMjAxMTEYMBYGCSqGSIb3DQEJ\r\nARYJcGtpQHNrLmVlMB4XDTExMDgzMTEzMTYwMFoXDTE2MDgyMTIwNTk1OVowgZsx\r\nCzAJBgNVBAYTAkVFMQ8wDQYDVQQKDAZFU1RFSUQxFzAVBgNVBAsMDmF1dGhlbnRp\r\nY2F0aW9uMSYwJAYDVQQDDB1Nw4ROTklLLE1BUkktTElJUyw0NzEwMTAxMDAzMzEQ\r\nMA4GA1UEBAwHTcOETk5JSzESMBAGA1UEKgwJTUFSSS1MSUlTMRQwEgYDVQQFEws0\r\nNzEwMTAxMDAzMzCCASMwDQYJKoZIhvcNAQEBBQADggEQADCCAQsCggEBAI+drQEc\r\nVXy2cOMjnsas2VCQsM2G4CAZUEPTgRFLktC8RVL/GLyy16Y96cpaYvNxyuIQnIKS\r\nBoD3bIixU/wPlvAn+ygsly5EsYRrMfEzLmsEARxdJMBduwkDC43y76PwUy3d0yJh\r\n8mYtsTKO30k3eE7TQ+aabWO21ZkCkvBgk6aeQwpWm/xR3jCNPpzoxtcrx8jcscNG\r\nWOzBt1cBWIP3agcVfn2vCeVkbCWvDLCCzZ6mUkUacovQGeFllwNeBV94cToZgMx8\r\njm85VlgFMmwQdxhicVLDKG3CYhBNK/Ho8qeP+TNJNNGxxsHMXv7TBkowPZqL/Jt3\r\nBuSAtaOpvljVZa0CBAIeqIGjggGnMIIBozAJBgNVHRMEAjAAMA4GA1UdDwEB/wQE\r\nAwIEsDCBmQYDVR0gBIGRMIGOMIGLBgorBgEEAc4fAwEBMH0wWAYIKwYBBQUHAgIw\r\nTB5KAEEAaQBuAHUAbAB0ACAAdABlAHMAdABpAG0AaQBzAGUAawBzAC4AIABPAG4A\r\nbAB5ACAAZgBvAHIAIAB0AGUAcwB0AGkAbgBnAC4wIQYIKwYBBQUHAgEWFWh0dHA6\r\nLy93d3cuc2suZWUvY3BzLzAnBgNVHREEIDAegRxtYXJpLWxpaXMubWFubmlrLjEz\r\nQGVlc3RpLmVlMB0GA1UdDgQWBBTdtCUplvkX5Xdb+9wDxqJM0r46SjAgBgNVHSUB\r\nAf8EFjAUBggrBgEFBQcDAgYIKwYBBQUHAwQwGAYIKwYBBQUHAQMEDDAKMAgGBgQA\r\njkYBATAfBgNVHSMEGDAWgBRBtv7FsbG0UxOM+vpi0DRtbSI0CjBFBgNVHR8EPjA8\r\nMDqgOKA2hjRodHRwOi8vd3d3LnNrLmVlL3JlcG9zaXRvcnkvY3Jscy90ZXN0X2Vz\r\ndGVpZDIwMTEuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQAnSOOEbMIP0Xlbh9ktoRq7\r\nxAxVJVph+SB5HOrON95f2jw5XF0fw9bnC4MrI2Y1BxcCFPeaZjEe5MEL+Z5MInWj\r\njUMzIIDzJir+UtOAdT9UWi+TUgn5VNm4rh7DtRsCYAIvZa4UJbIXgSg6yDQHlXOO\r\ndNAhdwFsGDqAkKcOvOuQzbj1bSmM7FvXUZFuiYbSAv409SWSUx4YuCRQ2m0KZTQK\r\nbgx32xpfJP646zAAi0o4CjpogMMWmtFLCrFb1TWRHnr5ApijdU4VOI+3w7Wd1roO\r\nCvvOXYPnbPcH5VTxk60dpM2ZZh/0CRnAqQvsjE7MJjQG2mkwXJ9UJgCoIJPv2TmD\r\n-----END CERTIFICATE-----\r\n"
    }
    
  • Response  200
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "Invalid signature" }
    { "message": "Validation error", "reason": "Missing hash value" }
    { "message": "Validation error", "reason": "Missing signature value" }
    { "message": "Validation error", "reason": "Missing certificate value" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  421Toggle
  • Body
    { "message": "Certificate error", "reason": "..." }
    

Mobile verification 

Mobile verification. ASAN requires userInfo.id. DDOC/BDOC/EDOC/PDF requires userInfo.ssn. Events mobile-login

Key Type Description
event string “mobile-login”
error object Only present if error occurred
error.code String Signer error code
error.message String Signer error message
personalCode String Personal code
firstName String First name
lastName String Last name
country String Country
/authentication/mobile
  • Parameters
  • callbackURL
    string (optional) Example: //127.0.0.1:65001/callbackCallback URL. Will be called once after the authentication process is complete.
    userInfo
    object (required)userInfo object.
    userInfo.id
    number (optional) Example: 1User id.
    userInfo.language
    string (required) Example: etUser language.
    userInfo.ssn
    string (optional) Example: 51001091072Social security number.
    userInfo.msisdn
    number (required) Example: 37260000007Mobile Subscriber ISDN Number. Accepts numeric values only (without special characters).
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "callbackURL":"//127.0.0.1:65001/callback?param=true",
      "userInfo":{
        "id":34324343,
        "language":"et",
        "ssn":"51001091072",
        "msisdn":37260000007
      }
    }
    
  • Response  200Toggle
  • Body
    {
      "verificationCode": "1234567890"
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "\"userInfo\" is required" }
    { "message": "Validation error", "reason": "\"userInfo.language\" is required" }
    { "message": "Validation error", "reason": "\"userInfo.msisdn\" is required" }
    { "message": "Validation error", "reason": "Invalid \"userInfo.msisdn\" value" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Certificate 

Parse certificate 

Parses input certificate.

/certificate/parse
  • Parameters
  • certificate
    string (required)Certificate data.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "certificate":"-----BEGIN CERTIFICATE-----\r\nMIIFPDCCBCSgAwIBAgIQOJV4PJUqldROXjQRlpUldjANBgkqhkiG9w0BAQUFADBs\r\nMQswCQYDVQQGEwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1\r\nczEfMB0GA1UEAwwWVEVTVCBvZiBFU1RFSUQtU0sgMjAxMTEYMBYGCSqGSIb3DQEJ\r\nARYJcGtpQHNrLmVlMB4XDTExMDgzMTEzMTYwMFoXDTE2MDgyMTIwNTk1OVowgZsx\r\nCzAJBgNVBAYTAkVFMQ8wDQYDVQQKDAZFU1RFSUQxFzAVBgNVBAsMDmF1dGhlbnRp\r\nY2F0aW9uMSYwJAYDVQQDDB1Nw4ROTklLLE1BUkktTElJUyw0NzEwMTAxMDAzMzEQ\r\nMA4GA1UEBAwHTcOETk5JSzESMBAGA1UEKgwJTUFSSS1MSUlTMRQwEgYDVQQFEws0\r\nNzEwMTAxMDAzMzCCASMwDQYJKoZIhvcNAQEBBQADggEQADCCAQsCggEBAI+drQEc\r\nVXy2cOMjnsas2VCQsM2G4CAZUEPTgRFLktC8RVL/GLyy16Y96cpaYvNxyuIQnIKS\r\nBoD3bIixU/wPlvAn+ygsly5EsYRrMfEzLmsEARxdJMBduwkDC43y76PwUy3d0yJh\r\n8mYtsTKO30k3eE7TQ+aabWO21ZkCkvBgk6aeQwpWm/xR3jCNPpzoxtcrx8jcscNG\r\nWOzBt1cBWIP3agcVfn2vCeVkbCWvDLCCzZ6mUkUacovQGeFllwNeBV94cToZgMx8\r\njm85VlgFMmwQdxhicVLDKG3CYhBNK/Ho8qeP+TNJNNGxxsHMXv7TBkowPZqL/Jt3\r\nBuSAtaOpvljVZa0CBAIeqIGjggGnMIIBozAJBgNVHRMEAjAAMA4GA1UdDwEB/wQE\r\nAwIEsDCBmQYDVR0gBIGRMIGOMIGLBgorBgEEAc4fAwEBMH0wWAYIKwYBBQUHAgIw\r\nTB5KAEEAaQBuAHUAbAB0ACAAdABlAHMAdABpAG0AaQBzAGUAawBzAC4AIABPAG4A\r\nbAB5ACAAZgBvAHIAIAB0AGUAcwB0AGkAbgBnAC4wIQYIKwYBBQUHAgEWFWh0dHA6\r\nLy93d3cuc2suZWUvY3BzLzAnBgNVHREEIDAegRxtYXJpLWxpaXMubWFubmlrLjEz\r\nQGVlc3RpLmVlMB0GA1UdDgQWBBTdtCUplvkX5Xdb+9wDxqJM0r46SjAgBgNVHSUB\r\nAf8EFjAUBggrBgEFBQcDAgYIKwYBBQUHAwQwGAYIKwYBBQUHAQMEDDAKMAgGBgQA\r\njkYBATAfBgNVHSMEGDAWgBRBtv7FsbG0UxOM+vpi0DRtbSI0CjBFBgNVHR8EPjA8\r\nMDqgOKA2hjRodHRwOi8vd3d3LnNrLmVlL3JlcG9zaXRvcnkvY3Jscy90ZXN0X2Vz\r\ndGVpZDIwMTEuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQAnSOOEbMIP0Xlbh9ktoRq7\r\nxAxVJVph+SB5HOrON95f2jw5XF0fw9bnC4MrI2Y1BxcCFPeaZjEe5MEL+Z5MInWj\r\njUMzIIDzJir+UtOAdT9UWi+TUgn5VNm4rh7DtRsCYAIvZa4UJbIXgSg6yDQHlXOO\r\ndNAhdwFsGDqAkKcOvOuQzbj1bSmM7FvXUZFuiYbSAv409SWSUx4YuCRQ2m0KZTQK\r\nbgx32xpfJP646zAAi0o4CjpogMMWmtFLCrFb1TWRHnr5ApijdU4VOI+3w7Wd1roO\r\nCvvOXYPnbPcH5VTxk60dpM2ZZh/0CRnAqQvsjE7MJjQG2mkwXJ9UJgCoIJPv2TmD\r\n-----END CERTIFICATE-----\r\n"
    }
    
  • Response  200Toggle
  • Body
    {
      "certificate":{
        "issuer":{
          "raw":"email=test@signwise.org, commonName=TEST of ESTEID-SK 2011, organization=SignWise Corporation Ltd., country=GB",
          "country":"EE",
          "email":"test@signwise.org",
          "commonName":"TEST of ESTEID-SK 2011",
          "organization":"SignWise Corporation Ltd."
        },
        "subject":{
          "raw":"identificationCode=14212128025, firstName=SEITSMES, lastName=TESTNUMBER, commonName=\"TESTNUMBER,SEITSMES,14212128025\", unitName=digital signature, organization=MOBILE-ID, country=GB",
          "country":"EE",
          "identificationCode":"14212128025",
          "firstName":"SEITSMES",
          "lastName":"TESTNUMBER",
          "commonName":"\"TESTNUMBER",
          "organization":"MOBILE-ID",
          "unitName":"digital signature"
        },
        "validFrom":1333537064000,
        "validTo":1428181199000,
        "serial":"124389723988450407130206225571707197361"
      }
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "\"certificate\" is required" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Validate certificate 

Validates certificate authenticity via OCSP service. Returns OCSP status. Possible status codes: good, revoked, unknown

/certificate/ocsp
  • Parameters
  • certificate
    string (required)Certificate data.
    certificateChain
    array (optional)Certificate chain data. Applicable to some countries.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "certificate":"-----BEGIN CERTIFICATE-----\r\nMIIFPDCCBCSgAwIBAgIQOJV4PJUqldROXjQRlpUldjANBgkqhkiG9w0BAQUFADBs\r\nMQswCQYDVQQGEwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1\r\nczEfMB0GA1UEAwwWVEVTVCBvZiBFU1RFSUQtU0sgMjAxMTEYMBYGCSqGSIb3DQEJ\r\nARYJcGtpQHNrLmVlMB4XDTExMDgzMTEzMTYwMFoXDTE2MDgyMTIwNTk1OVowgZsx\r\nCzAJBgNVBAYTAkVFMQ8wDQYDVQQKDAZFU1RFSUQxFzAVBgNVBAsMDmF1dGhlbnRp\r\nY2F0aW9uMSYwJAYDVQQDDB1Nw4ROTklLLE1BUkktTElJUyw0NzEwMTAxMDAzMzEQ\r\nMA4GA1UEBAwHTcOETk5JSzESMBAGA1UEKgwJTUFSSS1MSUlTMRQwEgYDVQQFEws0\r\nNzEwMTAxMDAzMzCCASMwDQYJKoZIhvcNAQEBBQADggEQADCCAQsCggEBAI+drQEc\r\nVXy2cOMjnsas2VCQsM2G4CAZUEPTgRFLktC8RVL/GLyy16Y96cpaYvNxyuIQnIKS\r\nBoD3bIixU/wPlvAn+ygsly5EsYRrMfEzLmsEARxdJMBduwkDC43y76PwUy3d0yJh\r\n8mYtsTKO30k3eE7TQ+aabWO21ZkCkvBgk6aeQwpWm/xR3jCNPpzoxtcrx8jcscNG\r\nWOzBt1cBWIP3agcVfn2vCeVkbCWvDLCCzZ6mUkUacovQGeFllwNeBV94cToZgMx8\r\njm85VlgFMmwQdxhicVLDKG3CYhBNK/Ho8qeP+TNJNNGxxsHMXv7TBkowPZqL/Jt3\r\nBuSAtaOpvljVZa0CBAIeqIGjggGnMIIBozAJBgNVHRMEAjAAMA4GA1UdDwEB/wQE\r\nAwIEsDCBmQYDVR0gBIGRMIGOMIGLBgorBgEEAc4fAwEBMH0wWAYIKwYBBQUHAgIw\r\nTB5KAEEAaQBuAHUAbAB0ACAAdABlAHMAdABpAG0AaQBzAGUAawBzAC4AIABPAG4A\r\nbAB5ACAAZgBvAHIAIAB0AGUAcwB0AGkAbgBnAC4wIQYIKwYBBQUHAgEWFWh0dHA6\r\nLy93d3cuc2suZWUvY3BzLzAnBgNVHREEIDAegRxtYXJpLWxpaXMubWFubmlrLjEz\r\nQGVlc3RpLmVlMB0GA1UdDgQWBBTdtCUplvkX5Xdb+9wDxqJM0r46SjAgBgNVHSUB\r\nAf8EFjAUBggrBgEFBQcDAgYIKwYBBQUHAwQwGAYIKwYBBQUHAQMEDDAKMAgGBgQA\r\njkYBATAfBgNVHSMEGDAWgBRBtv7FsbG0UxOM+vpi0DRtbSI0CjBFBgNVHR8EPjA8\r\nMDqgOKA2hjRodHRwOi8vd3d3LnNrLmVlL3JlcG9zaXRvcnkvY3Jscy90ZXN0X2Vz\r\ndGVpZDIwMTEuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQAnSOOEbMIP0Xlbh9ktoRq7\r\nxAxVJVph+SB5HOrON95f2jw5XF0fw9bnC4MrI2Y1BxcCFPeaZjEe5MEL+Z5MInWj\r\njUMzIIDzJir+UtOAdT9UWi+TUgn5VNm4rh7DtRsCYAIvZa4UJbIXgSg6yDQHlXOO\r\ndNAhdwFsGDqAkKcOvOuQzbj1bSmM7FvXUZFuiYbSAv409SWSUx4YuCRQ2m0KZTQK\r\nbgx32xpfJP646zAAi0o4CjpogMMWmtFLCrFb1TWRHnr5ApijdU4VOI+3w7Wd1roO\r\nCvvOXYPnbPcH5VTxk60dpM2ZZh/0CRnAqQvsjE7MJjQG2mkwXJ9UJgCoIJPv2TmD\r\n-----END CERTIFICATE-----\r\n"
    }
    
  • Response  200Toggle
  • Body
    {
      "status": "good"
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "\"certificate\" is required" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Mobile certificates 

Returns MID certificates. ASAN requires userInfo.id. DDOC/BDOC/EDOC/PDF requires userInfo.ssn.

/certificate/mobile
  • Parameters
  • containerType
    string (required) Example: ddocContainer type.
    userInfo
    object (required)userInfo object.
    userInfo.id
    number (optional) Example: 1User id.
    userInfo.ssn
    string (optional) Example: 51001091072Social security number.
    userInfo.msisdn
    number (required) Example: 37260000007Mobile Subscriber ISDN Number. Accepts numeric values only (without special characters).
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "containerType": "ddoc",
      "userInfo":{
        "id":34324343,
        "ssn":"51001091072",
        "msisdn":37260000007
      }
    }
    
  • Response  200Toggle
  • Body
    [
      {
        "issuer":{
          "raw":"email=test@signwise.org, commonName=TEST of 2015, organization=SignWise Corporation Ltd., country=GB",
          "country":"EE",
          "email":"test@signwise.org",
          "commonName":"TEST of ESTEID-SK 2011",
          "organization":"SignWise Corporation Ltd."
        },
        "subject":{
          "raw":"identificationCode=14212128025, firstName=SEITSMES, lastName=TESTNUMBER, commonName=\"TESTNUMBER,SEITSMES,14212128025\", unitName=digital signature, organization=MOBILE-ID, country=GB",
          "country":"EE",
          "identificationCode":"14212128025",
          "firstName":"SEITSMES",
          "lastName":"TESTNUMBER",
          "commonName":"\"TESTNUMBER",
          "organization":"MOBILE-ID",
          "unitName":"digital signature"
        },
        "validFrom":1333537064000,
        "validTo":1428181199000,
        "serial":"124389723988450407130206225571707197361"
      }
    ]
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "\"containerType\" is required" }
    { "message": "Validation error", "reason": "\"userInfo\" is required" }
    { "message": "Validation error", "reason": "\"userInfo.msisdn\" is required" }
    { "message": "Validation error", "reason": "Invalid \"userInfo.msisdn\" value" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

File 

Add 

Adds file to file container.

/container/file
  • Parameters
  • containerType
    string (required) Example: ddocContainer type.
    inputPath
    string (required) Example: //fp/path/to/containerContainer input path.
    files
    array (required)List of files to add.
    files.inputPath
    string (required) Example: //fp/path/to/filePath to file to add.
    files.fileName
    string (required) Example: filenameFile name.
    files.fileType
    string (required) Example: application/octet-streamFile mime type.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "inputPath":"//fp/path/to/container",
      "containerType":"ddoc",
      "files":[
        {
          "inputPath":"//fp/path/to/container/file-1",
          "fileName":"file1",
          "fileType":"application/octet-stream"
        },
        {
          "inputPath":"//fp/path/to/container/file-2",
          "fileName":"file2",
          "fileType":"application/octet-stream"
        }
      ]
    }
    
  • Response  200Toggle
  • Body
    {
      "container":{
        "type":"ddoc",
        "path":"//fp/path/to/container",
        "data":{
          "signatures":[  ],
      "dataFiles":[
        {
          "path":"//fp/path/to/container/file-1",
          "size":705298,
          "mimeType":"application/octet-stream",
          "fileName":"file1",
          "id":"D0"
        },
        {
          "path":"//fp/path/to/container/file-2",
          "size":705298,
          "mimeType":"application/octet-stream",
          "fileName":"file2",
          "id":"D1"
        }
      ],
      "size":705617,
      "version":"1.3",
      "format":"DIGIDOC-XML"
    },
    "shares":[
    
    ],
    "locked":false,
    "lockModified":"1407329039436"
      }
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "\"inputPath\" is required" }
    { "message": "Validation error", "reason": "\"containerType\" is required" }
    { "message": "Validation error", "reason": "Invalid container type" }
    { "message": "Validation error", "reason": "\"files\" is required" }
    { "message": "Validation error", "reason": "\"files.inputPath\" is required at index 1" }
    { "message": "Validation error", "reason": "\"files.fileName\" is required at index 1" }
    { "message": "Validation error", "reason": "\"files.fileType\" is required at index 1" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Extract 

Extracts the file from the container. The file is removed from the container and placed to the files.outputPath

/container/file
  • Parameters
  • containerType
    string (required) Example: ddocContainer type.
    inputPath
    string (required) Example: //fp/path/to/containerContainer input path.
    files
    array (required)List of files to extract.
    files.outputPath
    string (required) Example: //fp/path/to/filePath to extract the file.
    files.fileId
    string (required) Example: D0File container internal file id.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "inputPath":"//fp/path/to/container",
      "containerType":"ddoc",
      "files":[
        {
          "outputPath":"//fp/path/to/file-1",
          "fileId":"D0"
        },
        {
          "outputPath":"//fp/path/to/file-2",
          "fileId":"D1"
        }
      ]
    }
    
  • Response  200Toggle
  • Body
    {
      "container":{
        "type":"ddoc",
        "path":"//fp/path/to/container",
        "data":{
          "signatures":[  ],
      "dataFiles":[
        {
          "path":"//fp/path/to/file-1",
          "size":705298,
          "mimeType":"application/octet-stream",
          "fileName":"file1",
          "id":"D0"
        },
        {
          "path":"//fp/path/to/file-2",
          "size":705298,
          "mimeType":"application/octet-stream",
          "fileName":"file2",
          "id":"D1"
        }
      ],
      "size":705617,
      "version":"1.3",
      "format":"DIGIDOC-XML"
    },
    "shares":[
    
    ],
    "locked":false,
    "lockModified":"1407329039436"
      }
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "\"containerType\" is required" }
    { "message": "Validation error", "reason": "\"inputPath\" is required" }
    { "message": "Validation error", "reason": "\"files.outputPath\" is required at index 1" }
    { "message": "Validation error", "reason": "\"files.fileId\" is required at index 1" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Delete 

Removes file from file container.

/container/file
  • Parameters
  • containerType
    string (required) Example: ddocContainer type.
    inputPath
    string (required) Example: //fp/path/to/containerContainer input path.
    fileIds
    array (required) Example: [ “D0”, “D1” ]List of file container file ids.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "inputPath":"//fp/path/to/container",
      "containerType":"ddoc",
      "fileIds": [ "D0", "D1" ]
    }
    
  • Response  200Toggle
  • Body
    {
      "container": {
        "type": "ddoc",
        "path": "//fp/path/to/container",
        "data": {
          "signatures": [  ],
      "dataFiles": [
        {
          "path": "//fp/path/to/file-1",
          "size": 705298,
          "mimeType": "application/octet-stream",
          "fileName": "file1",
          "id": "D0"
        },
        {
          "path": "//fp/path/to/file-2",
          "size": 705298,
          "mimeType": "application/octet-stream",
          "fileName": "file2",
          "id": "D1"
        }
      ],
      "size": 705617,
      "version": "1.3",
      "format": "DIGIDOC-XML"
    },
    "shares ":[],
    "locked": false,
    "lockModified": "1407329039436"
      }
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was sent" }
    { "message": "Validation error", "reason": "\"containerType\" is required" }
    { "message": "Validation error", "reason": "\"inputPath\" is required" }
    { "message": "Validation error", "reason": "\"fileIds\" is required" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  420Toggle
  • Body
    { "message": "Signer error", "reason": "..." }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Template 

Create 

Creates a template and returns the object of the template

/template
  • Parameters
  • inputPath
    string (required) Example: //domain.ltd/path/to/template/fileTemplate file path.
    name
    string (required) Example: My template nameName of the template.
    placeholders
    array (optional)List of placeholders in template.
    placeholders.placeholder
    string (required) Example: [my_placeholder]Placeholder syntax in template file.
    placeholders.label
    string (required) Example: My placeholderPlaceholder label value for showing it on the future web application for template editing.
    placeholders.type
    string (optional) Example: placeholderPlaceholder type is used to mark the placeholder for where the visual signature will be placed if used in share request. Types are: signature, placeholder. The default type is “placeholder”
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "inputPath": "//domain.ltd/path/to/template/file",
      "name": "My template file",
      "placeholders": [
        {
          "placeholder": "[my_first_placeholder]",
          "label": "My first placeholder",
          "type": "placeholder"
        },
        {
          "placeholder": "my_second_placeholder",
          "label": "My second placeholder",
          "type": "signature"
        }
      ]
    }
    
  • Response  200Toggle
  • Body
    {
      "inputPath": "//domain.ltd/path/to/template/file",
      "name": "My template file",
      "placeholders": [
        {
          "placeholder": "[my_first_placeholder]",
          "label": "My first placeholder",
          "type": "placeholder"
        },
        {
          "placeholder": "my_second_placeholder",
          "label": "My second placeholder",
          "type": "signature"
        }
      ],
      "id": "55225b2e898193410fd955c7"
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "Input must be JSON formatted" }
    { "message": "Validation error", "reason": "\"inputPath\" is required" }
    { "message": "Validation error", "reason": "\"inputPath\" must be a valid url" }
    { "message": "Validation error", "reason": "Not allowed resource path \"//domain.ltd/not/allowed/path\", parameter \"inputPath\"" }
    { "message": "Validation error", "reason": "\"name\" is required" }
    { "message": "Validation error", "reason": "\"name\" must be minimum of 1 character" }
    { "message": "Validation error", "reason": "\"placeholders\" must be array" }
    { "message": "Validation error", "reason": "\"placeholders\" elements must be object" }
    { "message": "Validation error", "reason": "each \"placeholders\" element must have \"placeholder\" attribute" }
    { "message": "Validation error", "reason": "each \"placeholders\" element must have \"label\" attribute" }
    { "message": "Validation error", "reason": {"message": "Template creation failed because 1 or more placeholders are missing from template document.", "placeholdersNotFound": ["123"] }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Update 

Updates the template and returns the object of the template entity.

/template/:templateId
  • Parameters
  • templateId
    string (required) Example: 55225b2e898193410fd955c7Template ID that you want to update.
    name
    string (optional) Example: My template nameName of the template.
    placeholders
    array (optional)List of placeholders in template. The placeholders array is replaced with input.
    placeholders.placeholder
    string (required) Example: [my_placeholder]Placeholder syntax in template file.
    placeholders.label
    string (required) Example: My placeholderPlaceholder label value for showing it on the future web application for template editing.
    placeholders.type
    string (optional) Example: signaturePlaceholder type is used to mark the placeholder for where the visual signature will be placed if used in share request. Types are: signature, placeholder.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "name": "Change my template name",
      "placeholders": [
        {
          "placeholder": "[my_first_placeholder]",
          "label": "Placeholder"
        }
      ],
    }
    
  • Response  200Toggle
  • Body
    {
      "inputPath": "//domain.ltd/path/to/template/file",
      "name": "Change my template name",
      "placeholders": [
        {
          "placeholder": "[my_first_placeholder]",
          "label": "Placeholder",
          "type": "placeholder"
        }
      ],
      "id": "55225b2e898193410fd955c7"
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "Input must be JSON formatted" }
    { "message": "Validation error", "reason": "Template with id of \"55225b2e898193410fd955c7\" does not exist." }
    { "message": "Validation error", "reason": "\"name\" must be minimum of 1 character" }
    { "message": "Validation error", "reason": "\"placeholders\" must be array" }
    { "message": "Validation error", "reason": "\"placeholders\" elements must be object" }
    { "message": "Validation error", "reason": "each \"placeholders\" element must have \"placeholder\" attribute" }
    { "message": "Validation error", "reason": "each \"placeholders\" element must have \"label\" attribute" }
    { "message": "Validation error", "reason": {"message": "Template creation failed because 1 or more placeholders are missing from template document.", "placeholdersNotFound": ["123"] }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Delete 

Deletes the template and returns the object of the template

/template/:templateId
  • Parameters
  • templateId
    string (required) Example: 55225b2e898193410fd955c7Template ID that you want to delete.
  • Request
  • Response  200Toggle
  • Body
    {
      "inputPath": "//domain.ltd/path/to/template/file",
      "name": "Change my template name",
      "placeholders": [
        {
          "placeholder": "[my_first_placeholder]",
          "label": "My first placeholder"
        },
        {
          "placeholder": "my_second_placeholder",
          "label": "My second placeholder"
        }
      ],
      "id": "55225b2e898193410fd955c7"
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "Cannot delete template because of document related to it." }
    { "message": "Validation error", "reason": "Template with id of \"55225b2e898193410fd955c7\" does not exist." }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Document 

Create 

Creates a document entity based on template that is given as input and returns the object of the prepared document. PDF is generated when document entity is shared via share method.

/document
  • Parameters
  • template
    string (required) Example: 55225b2e898193410fd955c7Template ID.
    outputPath
    string (required) Example: //domain.ltd/path/to/document/file.pdfOutput path where the document will be saved after sharing it.
    name
    string (required) Example: My document nameName of the document.
    fields
    array (optional)List of placeholders in template to be replaced with text as described in object.
    fields.placeholder
    string (required) Example: [my_placeholder]Placeholder syntax in template file.
    fields.value
    string (required) Example: Text to replace placeholderPlaceholders replacement text if document is converted to PDF.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "template": "55225b2e898193410fd955c7",
      "outputPath": "//domain.ltd/path/to/document/file.pdf",
      "name": "Document no. 440",
      "fields": [
        {
          "placeholder": "[my_first_placeholder]",
          "value": "Mr. Smith"
        },
        {
          "placeholder": "my_second_placeholder",
          "value": "Developer"
        }
      ]
    }
    
  • Response  200Toggle
  • Body
    {
      "template": "55225b2e898193410fd955c7",
      "outputPath": "//domain.ltd/path/to/document/file.pdf",
      "name": "Document no. 440",
      "fields": [
        {
          "placeholder": "[my_first_placeholder]",
          "value": "Mr. Smith"
        },
        {
          "placeholder": "my_second_placeholder",
          "value": "Developer"
        }
      ],
      "pages": [
        {
          "page": 1,
          "width": 612,
          "height": 792
        }
      ],
      "id": "5527ded42a17b41b159c934e"
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "Input must be JSON formatted" }
    { "message": "Validation error", "reason": "\"outputPath\" is required" }
    { "message": "Validation error", "reason": "\"outputPath\" must be a valid url" }
    { "message": "Validation error", "reason": "Not allowed resource path \"//domain.ltd/not/allowed/path\", parameter \"outputPath\"" }
    { "message": "Validation error", "reason": "\"template\" is required" }
    { "message": "Validation error", "reason": "\"name\" is required" }
    { "message": "Validation error", "reason": "\"name\" must be minimum on 1 character" }
    { "message": "Validation error", "reason": "\"fields\" must be array" }
    { "message": "Validation error", "reason": "\"fields\" elements must be object" }
    { "message": "Validation error", "reason": "each \"fields\" element must have \"placeholder\" attribute" }
    { "message": "Validation error", "reason": "each \"fields\" element must have \"value\" attribute" }
    { "message": "Validation error", "reason": "Template with id of \"55225b2e898193410fd955c7\" does not exist." }
    { "message": "Validation error", "reason": { "message": "Document creation failed because 1 or more fields are missing from template document.", "fieldsNotFound": ["123"] }}
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Update 

Updates the document and returns the object of the updated document

/document/:documentId
  • Parameters
  • documentId
    string (required) Example: 5527ded42a17b41b159c934eDocument ID you want to update.
    name
    string (optional) Example: My document nameName of the document.
    fields
    array (optional)List of placeholders in template to be replaced with text as described in object.
    fields.placeholder
    string (required) Example: [my_placeholder]Placeholder syntax in template file.
    fields.value
    string (required) Example: Text to replace placeholderPlaceholders replacement text if document is converted to PDF.
  • RequestToggle
  • Headers
    Content-Type: application/json
    
    Body
    {
      "name": "Change my document name",
      "fields": [
        {
          "placeholder": "[my_first_placeholder]",
          "value": "Dr. Smith"
        },
      ],
    }
    
  • Response  200Toggle
  • Body
    {
      "template": "55225b2e898193410fd955c7",
      "outputPath": "//domain.ltd/path/to/document/file.pdf",
      "name": "Change my document name",
      "fields": [
        {
          "placeholder": "[my_first_placeholder]",
          "value": "Dr. Smith"
        }
      ],
      "id": "5527ded42a17b41b159c934e"
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "Input must be JSON formatted" }
    { "message": "Validation error", "reason": "Document with id of \"5527ded42a17b41b159c934e\" does not exist." }
    { "message": "Validation error", "reason": "\"name\" must be minimum of 1 character" }
    { "message": "Validation error", "reason": "\"fields\" must be array" }
    { "message": "Validation error", "reason": "\"fields\" elements must be object" }
    { "message": "Validation error", "reason": "each \"fields\" element must have \"placeholder\" attribute" }
    { "message": "Validation error", "reason": "each \"fields\" element must have \"value\" attribute" }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

Delete 

Deletes the document and returns the object of the deleted document

/document/:documentId
  • Parameters
  • documentId
    string (required) Example: 5527ded42a17b41b159c934eDocument ID that you want to delete.
  • Request
  • Response  200Toggle
  • Body
    {
      "template": "55225b2e898193410fd955c7",
      "outputPath": "//domain.ltd/path/to/document/file.pdf",
      "name": "Change my document name",
      "fields": [
        {
          "placeholder": "[my_first_placeholder]",
          "value": "Dr. Smith"
        }
      ],
      "id": "5527ded42a17b41b159c934e"
    }
    
  • Response  400Toggle
  • Body
    { "message": "Validation error", "reason": "Document with id of \"5527ded42a17b41b159c934e\" does not exist." }
    
  • Response  401Toggle
  • Body
    { "message": "Validation error", "reason": "No required SSL certificate was found" }
    
  • Response  500Toggle
  • Body
    { "message": "Internal error", "reason": "..." }
    

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close