ViewSign Cloud On-Premise SDK Documentation API Documentation

    From ViewSonic User Guide Database

    API Documentation

    Info Icon.svg
    We declared SOAP as deprecated and therefore SOAP will not be included in versions after 20.76. Latest release including SOAP API for eSAW will be 20.76, released in spring 2021 and with the software maintenance on 20.76 until spring 2023.

    Therefore, we recommend REST technology for integration. Please see also the migration guide.

    API and Samplecode

    The API is for developers, who want to integrate eSignAnyWhere into their application and for administrators, who want to script interactions with eSignAnyWhere (e.g. user synchronization).

    Quick Overview: eSAW uses REST or SOAP (with JSON or XML) as API. We recommend the REST interface. The basic workflow is to upload a document (uploadTemporarySspFile) and then call sendEnvelope with a envelope configuration. The configuration consists out of the envelope part (workflow configuration) and for each recipient a definition and a signing configuration (workstep configuration). The workstep configuration is the description (as JSON for REST) of tasks for signer (e.g. Signature Fields, Form-Fields) and additional document configurations.

    The easiest way to start is enabling the DeveloperMode for a user. As developer (and power user) you can send envelopes via eSignAnywhere in the UI and download the complete envelope configuration (including the workstep configurations). So eSAW can be a seen as configuration designer, where you can easily prepare the envelope configuration. After you downloaded the configuration you just have to replace the recipient information and configuration.

    Resources

    API Reference* visit API Reference (eSAW & Usermanagement)
    eSAW SOAP API endpoint
    https://demo.esignanywhere.net/api.asmx
    eSAW SOAP WSDL https://demo.esignanywhere.net/api.asmx?WSDL
    Usermanagement SOAP API endpoint https://demo.esignanywhere.net/UserManagementApi.asmx
    Usermanagement SOAP WSDL https://demo.esignanywhere.net/UserManagementApi.asmx?WSDL
    REST with JSON + Swagger
    ( eSAW v3.1+)
    https://demo.esignanywhere.net/Api
    Migration Guides* Migration Guide (REST Api) and Migration Guide (SOAP to REST)
    Sample Code in C# and Java Here you can find the C# sample: Download. (Contains examples with SOAP and REST until eSAW 3.4 features).

    Here you can find the java sample: Download. (Contains example with REST, developed with JavaSE-12)

    Tutorial: Hello World* visit Hello World Tutorial
    Tutorial: SoapUI (SOAP) visit SoapUI Tutorial
    Tutorial: Postman* (REST)
    REST in SOAPUI
    visit Postman Tutorial
    visit REST in SOAPUI Tutorial
    Developer mode* visit developer mode
    SignAnyWhere Viewer 2019 visit SignAnyWhere Viewer 2019 Information
    SignAnyWhere Viewer Extended Customization visit SignAnyWhere Viewer Extended Customization
    The Envelope XML and WorkstepConfiguration XML visit Envelope XML Guide
    Tutorial: Java Library Tutorial and Sample Code visit Java Library Tutorial
    Integration & Use Cases visit Integration & Use Cases
    How To’s visit How To Guides
    Developer FAQ visit Developer FAQ
    eSAW Error Codes visit eSAW Error Codes

    * Recommended

    The User Guide, Signer Guide and Administration Guide (for on-premise customers) can be also helpful.

    SOAP calls with XML/REST with JSON

    SOAP uses XML, which have to be encoded via HTML special charaters (“<” in “<” and “>” in “>”). Higher programming languages takes automatically care of the conversion, so just in lower languages it is required (or also SoapUI). If this encoding is not done you will receive a HTTP 400 Bad Request error.

    REST uses JSON. We recommend to have a look in the sample code first, otherwise Swagger UI is available for integration, which is available under /api (demo.xyzmo.com/api or esignanywhere.net/api).

    Authentication

    For authentication, you’ll need a application key and your email-address. You can find this information in Settings / Organization / Application key. Note that all API methods require authentication. Start with the Hello World, SoapUI Tutorial or Postman Tutorial (REST) and you might have a look in the envelope XML guide. Please note, that the email is automatically the user, who sends the envelope.

    <!-- SOAP XML Authentication -->
    <authorization>
     <organizationKey>4647688a-xxxx-xxxx-xxxx-xxxxxxxx</organizationKey>
     <userLoginName>your@email.address</userLoginName>
    </authorization>
    

    SOAP Response and Errors

    The SOAP response is a XML datastructure with the state of the response and the response itself. In baseResult you see the state of the call (ok/failed) and in errorInfo or okInfo the response of your request. In case of an error a helpful message is in the errorInfo.

    The following you see an authorization error:

    <apiResult version="2.2.458.6616">
     <baseResult>failed</baseResult>
     <errorInfo>
       <error>ERR0011</error>
       <errorMsg>ERR0011: Parameter apiAuthorizationXml is incorrect: Failed to parse</errorMsg>
     </errorInfo>
    </apiResult>
    

    REST/JSON + XML (Deprecated)

    The REST with JSON and inline XML is deprecated. Please use the REST/JSON interface (https://www.esignanywhere.net/api).

    You have to use HTTP-POSTs, set the content-type to application/json, and wrap the parameter into a JSON object for the request content. Furthermore, the result is wrapped in a JSON object with a single property.

    Sample for the method string DisposeSspFile_v1(string authorizationXml, string sspFileId):

    • HTTP Post Request to YOURSERVER\Api.asmx\DisposeSspFile_v1
    • Add HTTP header content-type=application/json

    Request content:

    {
     "authorizationXml" : "<authorization>...<\/authorization>",
     "sspFileId" : "MyFileId" 
    }
    

    Request response:

    {
    "d": "<apiResult>...</apiResult>"
    }
    

    eSAW API description for SOAP

    SOAP API endpoint is https://www.significant.com/api.asmx
    WSDL can be found here: SOAP API

    Methods for sending an envelope or to create a draft of an envelope

    An envelope can consist of multiple documents and can contain multiple recipients for signing (steps). Your backend application will provide the documents for the envelope and the configuration of the workflow and worksteps. Once the envelope has been completed or rejected, your backend will be notified from eSignAnyWhere about this (callback). Therefore you can provide a callback url, so you don’t need to poll the eSAW system.

    The pattern for sending an envelope

    Upload all documents for this envelope (UploadTemporarySspFile_v1) Optional: Analyze all documents to get a default configuration. (GetAdHocWorkstepConfiguration_v1) Optional: Prepare configuration for every signing step in the envelope, by adjusting the xml accordingly. Start the workflow of the envelope by providing the general configuration of the envelope and the configuration for every step (SendEnvelope_v1)

    The pattern for creating a draft of an envelope:

    Upload all documents for this envelope (UploadTemporarySspFile_v1) Create the draft by providing the general configuration of the envelope (CreateDraft_v1) You can redirect the user to the designer of eSignAnyWhere to manually position and assign fields for the recipients pf this envelope.

    Methods for downloading the documents of an completed envelope

    Once you get the notification from eSignAnyWhere that an envelope has been completed, you can download the signed documents and the log of the envelope.

    The pattern for downloading documents of a completed envelope

    Check the status of that Envelope, to be sure it is completed and not rejected. (GetEnvelopeById_v1)

    Download all the signed documents and the envelope log. (DownloadCompletedDocument_v1)

    Methods for managing an envelope

    SendReminders_v1: Send reminders to all recipients that currently can sign the envelope
    CancelEnvelope_v1: Cancels the envelope
    DeleteEnvelope_v1: Delets an envelope or a draft of an envelope
    RestartEnvelope_v1: Restarts an expired envelope