Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel3
stylecircle

How to integrate with Postman

Collection

In this tutorial you will do the first API call as well as sending envelopes, upload documents and download signed papers. Let us start with creating a collection so that we can save all requests there.

FigureSteps

CollectionImage Added

Steps:

  1. Go to register "new"
  2. Select "Collection"

Create a request

After creating a new Collection, we will save our first request into it.

FigureDescription

RequestImage Added

Steps:

  1. Go to register "new"
  2. Select "request"
  3. Choose a name and save the request in the collection

Authentication

The next request will show you an authorization. This is an important part of the requests for sure but not only because of security but also because we will need the authorization for all following requests.

For authentication, you’ll need an api token. Image Added

Please see the next sample authorization (Bearer token):

KeyValue
"Authorization""Bearer asdfngtmvv8pfmsuaxpzz85zux3e63dd9zttrwitx9mln6qka6tds83du3p3lroe"

Please see the next sample authorization (api token):

KeyValue
"ApiToken""asdfngtmvv8pfmsuaxpzz85zux3e63dd9zttrwitx9mln6qka6tds83du3p3lroe"

You can find this information in Settings / Api Tokens and Apps. Note that all API methods require an authentication. The API token is a user specific secret which should not be shared with other users. We recommend to create different API keys for different application integrations, to avoid configuring the same key in various integration systems. This allows, e.g. in case of sharing a key by mistake, to disable one key while keeping other integrations working with their existing configuration.

The authentication with the organizationKey and the userLoginName is not recommended! It is only available for api version 1 to 5.

First API Call (

Section

The Postman Guide leads you through a REST sample (uploading a file, sending a signature request) with Postman and the eSignAnyWhere API. In this Guide you will find information about the configuration of the first API call to sending your first signature request with REST API. Before starting with this Guide please also have a look at the Swagger which contains the documentation of our REST API: https://demo.esignanywhere.net/Api

Here you find our tutorial for SOAP and SoapUI.

Please also see the developer mode for this tutorial here: Visit the developer mode.

Download files for tutorial (JSON for Tutorial, JSON for variables, PDF): Tutorial_Files

Info

You can either use the following guide which explains Postman and shows the individual api calls or you can import the Swagger in Postman with this link: https://demo.esignanywhere.net/Api
After the import you have already imported all api calls with the descriptions.
How to import: Just select “import” in Postman and then select the “import from link” and add the link above.

Section

Collection

In this tutorial you will do the first API Call as well as sending envelopes, upload documents and download signed papers. Let us start with creating a Collection so that we can save all request there. Therefore, you must go to the register “new” and select Collection. Then Figure 1 should appear where we define a name for our Collection.

Image Removed

Section

Create a request

After creating a new Collection, we will save our first request into it. Therefore, you select again the register “new” and pick request. Afterwards the Figure 2 should appear where you choose a name for the request and make sure to save it in the Collection we just created.

Image Removed

...

version)

Let us start now with the first API call. As the name of our request tells we will first make an easy call to examine the current version.

...

You can see all requests here:

...

Version URIImage Added

FigureDescription

Version ConfigurationImage Added

Steps:

  1. Set the request type to GET
  2. Set the URI: https://demo.esignanywhere.net/Api

...

Therefore, you must select the request type to a “Get” request and you must fill in the URL. For a detailed overview see the next Figure.

...

  1. Request type
  2. URL
  3. Result of the request

As you may see from the Figure 3 you just have to fill in the URL, select the correct type (in this case it is a “Get” type) and then you just have to click the send button and you will get such a result as shown in the Figure 3.

If an error appears, make sure you have chosen the correct request type and the right URL.

Version Request JSON

not required

Version Response JSON

Code Block
languagejava
themeEclipse
{
    "Success": true,
    "Version": "20.14.0.15478"
}
  1. /v6/system/version
  2. Add the authentication (Api Token) in the header

Response

Code Block
languagejava
themeEclipse
"22.20.0.754"


Upload a file

Note
It is not allowed to upload multiple files at once (when more files are selected).

Before we can send an envelope, we must make sure that we have already uploaded a file. Therefore, the next request will be about uploading a file.

Upload URIImage Added

FigureDescription

Upload ConfigurationImage Added

Steps:

  1. Set the request type to POST
  2. Set the URI: https://demo.esignanywhere.net/Api/v6/file/upload
  3. Add a file in the section "Body" form-data
  4. Add the authentication (Api Token) in the header

Response

Code Block
languagejava
themeEclipse
{
    "FileId": "8a4fd938-1234-1234-9866-f0fe466781d3"
}

Please note: The FileId is needed for the next api call.

Sending an envelope

Send the first envelope with the document you have chosen from the upload call.

https://demo.esignanywhere.net/Api/swagger/ui/index#/Envelope/Envelope_Send

and paste it in the body of the sending request. Then change from “none” to “raw” and change the File ID to the one you get from the upload file request.

Sending Envelope URIImage Added

FigureDescription

Sending Envelope ConfigurationImage Added

Steps:

  1. Set the request type to POST
  2. Set the URI: https://demo.esignanywhere.net/Api/v6/envelope/send
  3. Add the envelope configuration in "Body" (sample configuration below)
    1. Please change the type to "raw"
    2. Change the "Text" to JSON format
  4. Add the authentication (Api Token) in the header

Response

Code Block
languagejava
themeEclipse
{
    "EnvelopeId": "1393adcf-1234-1234-9173-aba385426549"
}

Please note: The EnvelopeId is needed for the next api call.

The following sample configuration contains two recipients with the following workflow:

  1. First recipient needs to sign with a ClickToSign
  2. Second recipient just receives a copy of the signed document


Code Block
languagejava
themeEclipse
{
    "Documents": [{
            "FileId": "d33d43ca-1234-1234-1234-b645fc4e0fb2",
            "DocumentNumber": 1
        }
    ],
    "Name": "Test",
    "Activities": [{
Section

Authorization

The next request will show you an authorization. This is an important part of the requests for sure but not only because of security but also because we will need the authorization for all other requests.

Let us create another request to make our second API Call to try the authorization. The only extension to the previous call is to define the headers. If you click on “Headers” you will see three columns. The first and second one, so the keys and the values are necessary for the authorization.

Two ways of authorization

For authentication, you’ll need an api token. Image Removed

You can find this information in Settings / Api Tokens and Apps. Note that all API methods require authentication. The API token is a user specific secret which should not be shared with other users. We recommend to create different API keys for different application integrations, to avoid configuring the same key in various integration systems. This allows, e.g. in case of sharing a key by mistake, to disable one key while keeping other integrations working with their existing configuration.

Section

Image Removed

Section

You can also authorize with the organizationKey and the userLoginName.
Note: The organizationKey can also be found in Settings / Api Tokens and Apps
The organizationKey is the actual organization API key. The userLoginName is the actual login e-mail address.

Image Removed

Authorization Request JSON

not required

Authorization Response JSON

Should response 200 OK

Upload a file

...

Image Removed

As you can see in Figure 5 you must also edit the body. So, the header will be the same as we have already seen in the authorization. In the body you must select that you will upload a file and you must choose a file which you wanted to be uploaded. (In this case “Tutorial.pdf”)

Attention! It is necessary to change from “none” to “form-data”.

Afterwards you should get a file ID. It is necessary that we do not forget this ID because we will need it for the envelope sending request.

Upload Request JSON

not required

Upload Response JSON

...

Code Block
languagejava
themeEclipse
{
    "SspFileId": "17d23c79-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Sending an envelope

The sending request is a bit more complicated than the previous once. First, copy the sending description (Example value) from this link:

https://demo.esignanywhere.net/Api/swagger/ui/index#/Envelope/Envelope_Send

and paste it in the body of the sending request. Then change from “none” to “raw” and change the File ID to the one you get from the upload file request.

The next Figure should give you an overview of all changes you have to do to get a positive result. (in this case the result is the envelope ID)

...

Image Removed

...

  1. FileId from the upload
  2. Must be selected
  3. Must be changed from “Text” to “JSON”
  4. Result is your envelopeId

Sending Request JSON

Code Block
languagejava
themeEclipse
{
  "SspFileIds": [
    "17d23c79-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  ],
  "SendEnvelopeDescription": {
  "Name": "test",
  "EmailSubject": "Please sign the enclosed envelope",
  "EmailBody": "Dear #RecipientFirstName# #RecipientLastName#\n\n#PersonalMessage#\n\nPlease sign the envelope #EnvelopeName#\n\nEnvelope will expire at #ExpirationDate#",
  "DisplayedEmailSender": "",
  "EnableReminders": true,
  "FirstReminderDayAmount": 5,
  "RecurrentReminderDayAmount": 3,
  "BeforeExpirationDayAmount": 3,
  "DaysUntilExpire": 28,
  "CallbackUrl": "",
  "StatusUpdateCallbackUrl": "",
  "Steps": [
    {
      "OrderIndex": 1,
      "Recipients": [
        {
          "Email": "##EMAIL##",
          "FirstName": "##NAME##",
          "LastName": "##NAME##",
          "LanguageCode": "en",
          "EmailBodyExtra": "",
          "DisableEmail": false,
          "AddAndroidAppLink": false,
          "AddIosAppLink": false,
          "AddWindowsAppLink": false,
          "AllowDelegation": true,
          "AllowAccessFinishedWorkstep": false,
          "SkipExternalDataValidation": false,
          "AuthenticationMethods": [
          	
          ]
        }
      ],
      "EmailBodyExtra": "",
      "RecipientType": "Signer",
      "WorkstepConfiguration": {
        "WorkstepLabel": "test",
        "SmallTextZoomFactorPercent": 100,
        "FinishAction": {
          "ServerActions": [],
          "ClientActions": [
            {
              "RemoveDocumentFromRecentDocumentList": false,
              "CallClientActionOnlyAfterSuccessfulSync": true,
              "ClientName": "SIGNificant SignAnywhere",
              "CloseApp": false,
              "Action": "https://www.esignanywhere.net/"
            }
          ]
        },
        "ReceiverInformation": {
          "UserInformation": {
            "FirstName": "##NAME##",
            "LastName": "##NAME##",
            "EMail": "##EMAIL##"
          },
          "TransactionCodePushPluginData": []
        },
        "SenderInformation": {
          "UserInformation": {
            "FirstName": "##NAME##",
            "LastName": "##NAME##",
            "EMail": "##EMAIL##"
          }
        },
        "TransactionCodeConfigurations": [
          {
            "Id": "smsAuthTransactionCodeId",
            "HashAlgorithmIdentifier": "Sha256",
            "Texts": [
              
            ]
          }
        ],
        "SignatureConfigurations": [],
        "ViewerPreferences": {
          "FinishWorkstepOnOpen": false,
          "VisibleAreaOptions": {
            "AllowedDomain": "*",
            "Enabled": false
          }
        },
        "ResourceUris": {
          "DelegationUri": "https://demo.xyzmo.com/Resource/Delegate",
          "SignatureImagesUri": "https://demo.xyzmo.com/Resource/SignatureImages/?link=1hBeQ4I7uBrebVrh0aT50/2o1K65bmQqmVUtPrCrdjlOniICiNh9ISsPbKxTK6WYN"
        },
        "AuditingToolsConfiguration": {
          "WriteAuditTrail": false,
          "NotificationConfiguration": {}
        },
        "Policy": {
          "GeneralPolicies": {
            "AllowSaveDocument": true,
            "AllowSaveAuditTrail": true,
            "AllowRotatingPages": false,
            "AllowEmailDocument": true,
            "AllowPrintDocument": true,
            "AllowFinishWorkstep": true,
            "AllowRejectWorkstep": true,
            "AllowRejectWorkstepDelegation": true,
            "AllowUndoLastAction": true,
            "AllowAdhocPdfAttachments": false,
            "AllowAdhocSignatures": false,
            "AllowAdhocStampings": false,
            "AllowAdhocFreeHandAnnotations": false,
            "AllowAdhocTypewriterAnnotations": false,
            "AllowAdhocPictureAnnotations": false,
            "AllowAdhocPdfPageAppending": false
          },
          "WorkstepTasks": {
            "PictureAnnotationMinResolution": 0,
            "PictureAnnotationMaxResolution": 0,
            "PictureAnnotationColorDepth": "Color16M",
            "SequenceMode": "NoSequenceEnforced",
            "PositionUnits": "PdfUnits",
            "ReferenceCorner": "Lower_Left",
            "Tasks": [
              {
                "PositionPage": 1,
                "Position": {
                  "PositionX": 65.0,
                  "PositionY": 602.0
                },
                "Size": {
                  "Height": 80.0,
                  "Width": 190.0
                },
                "AdditionalParameters": [
                  {
                    "Key": "enabled",
                    "Value": "1"
                  },
                  {
                    "Key": "positioning",
                    "Value": "onPage"
                  },
                  {
                    "Key": "req",
                    "Value": "1"
                  },
                  {
                    "Key": "fd",
                    "Value": ""
                  },
                  {
                    "Key": "fd_dateformat",
                    "Value": "dd-MM-yyyy HH:mm:ss"
                  },
                  {
                    "Key": "fd_timezone",
                    "Value": "datetimeutc"
                  }
                ],
                "AllowedSignatureTypes": [
                  {
                    "AllowedCapturingMethod": "Click2Sign",
                    "Id": "5d8de01a-b924-4d87-98c9-cc45909c0b4b",
                    "DiscriminatorType": "SigTypeClick2Sign",
                    "Preferred": false,
                    "StampImprintConfiguration": {
                      "DisplayExtraInformation": true,
                      "DisplayEmail": true,
                      "DisplayIp": true,
                      "DisplayName": true,
                      "DisplaySignatureDate": true,
                      "FontFamily": "Times New Roman",
                      "FontSize": 11.0
                    }
                  }
                ],
                "UseTimestamp": false,
                "IsRequired": true,
                "Id": "1#XyzmoDuplicateIdSeperator#Signature_a9cd7f4f-6c7d-ff20-dc3f-dea0a4638bd4",
                "DisplayName": "",
                "DocRefNumber": 1,
                "DiscriminatorType": "Signature"
              },
              {
                "Forms": [
                  {
                    "IsRequired": false,
                    "Id": "TextBox_4e277dde-23c4-8a81-103a-f84abd798a8a",
                    "PositionPage": 1,
                    "DocRefNumber": 1,
                    "Position": {
                      "PositionX": 71.0,
                      "PositionY": 558.0
                    },
                    "Size": {
                      "Height": 20.0,
                      "Width": 126.0
                    },
                    "DiscriminatorType": "TextBox"
                  }
                ],
                "IsRequired": false,
                "Id": "73df5772-d204-40ca-908e-34d43891bc01",
                "DisplayName": "",
                "DocRefNumber": 1,
                "DiscriminatorType": "FormGroup"
              }
            ]
          }
        },
        "Navigation": {
          "HyperLinks": [],
          "Links": [],
          "LinkTargets": []
        }
      },
      "DocumentOptions": [
        {
          "DocumentReference": "1",
          "IsHidden": false
        }
      ],
      "UseDefaultAgreements": true
    },
    {
      "OrderIndex": 2,
      "Recipients": [
        {
          "Email": "##EMAIL##",
          "FirstName": "##NAME##",
          "LastName": "##NAME##",
          "LanguageCode": "en",
          "EmailBodyExtra": "",
          "DisableEmail": false,
          "AddAndroidAppLink": false,
          "AddIosAppLink": false,
          "AddWindowsAppLink": false,
          "AllowDelegation": false,
          "SkipExternalDataValidation": false,
          "AuthenticationMethods": []
        }
      ],
      "EmailBodyExtra": "",
      "RecipientType": "Cc",
      "DocumentOptions": [],
      "UseDefaultAgreements": false
    }
  ],
  "AddFormFields": {
    "Forms": {
      "1": [
        {
          "Value": "",
          "MaxLength": -1,
          "IsMultiline": false,
          "IsPassword": false,
          "IsComb": false,
          "TextColor": "0, 0, 0",
          "FontSize": 11.0,
          "FontName": "Times New Roman",
          "Bold": false,
          "Italic": false,
          "TextAlign": "Left",
          "Name": "TextBox_4e277dde-23c4-8a81-103a-f84abd798a8a",
          "ReadOnly": false,
          "Required": false,
          "X": 71.0,
          "Y": 558.0,
          "Width": 126.0,
          "Height": 20.0,
          "Page": 1,
          "DiscriminatorType": "AddTextBoxFormFieldDescriptor"
        }
      ]
    }
  },
  "OverrideFormFieldValues": {
    "Forms": {}
  },
  "AttachSignedDocumentsToEnvelopeLog": false
}
}

Sending Response JSON

Section
Code Block
languagejava
themeEclipse
{
“EnvelopeId”: “d4f71aec-e332-48c3-8ca9-b0be6adf9ea8”
}
Section

Get the envelope description

The last request of this tutorial will be the download of the document which has been signed.

But before we will check if the envelope with the ID which we got from the sending is correct. Furthermore, we need the request “get the envelope” because of the document ID`s which we only get because of this request.

The following Figure will help you with the request and give you an overview how it should be done.
Image Removed

Description Request JSON

Not required

Description Response JSON

Code Block
languagejava
themeEclipse


{
    "Status": "InProgress",
    "SendDate": "2020-04-24T12:37:46.72Z",
    "ExpirationDate": "2020-05-22T12:37:46.72",
    "Bulks": [
        {
            "Status": "InProgress",
            "Email": "",
            "LogDocumentId": "",
            "FinishedDocuments": [],
            "Steps": [
                {
                    "Id": "2bc4156b-8830-4321-9803-6d765a0e0a5b",
                    "FirstName": "##NAME##",
                    "LastName": "##NAME##",
                    "OrderIndex": 1,
                    "Email": "##EMAIL##",
                    "LanguageCode": "en",
                    "Status": "NotSigned",
                    "StatusReason": "",
                    "RecipientType": "Signer",
                    "OpenedDate": "2020-04-24T12:38:01.137Z",
                    "WorkstepRedirectionUrl": "https://demo.xyzmo.com/workstepredirector/sign?identifier=xxxxxxxxxxxx",
                    "AllowAccessFinishedWorkstep": false,
                    "IsParallel": false,
                    "WorkstepConfiguration": {
                        "WorkstepLabel": "test",
                        "SmallTextZoomFactorPercent": 100,
                        "FinishAction": {
                            "ServerActions": [
                                {
                                    "CallSynchronous": false,
                                    "Action": "https://demo.xyzmo.com/workstepredirector/setfinishaction?wid=##WorkstepId##"
                                }
                            ],
                            "ClientActions": [
                                {
                                    "RemoveDocumentFromRecentDocumentList": false,
                                    "CallClientActionOnlyAfterSuccessfulSync": true,
                                    "ClientName": "SIGNificant SignAnywhere",
                                    "CloseApp": false,
                                    "Action": "https://www.esignanywhere.net/"
                                }
                            ]
                        },
                        "ReceiverInformation": {
                            "UserInformation": {
                                "FirstName": "##NAME##",
                                "LastName": "##NAME##",
                                "EMail": "##EMAIL##"
                            },
                            "TransactionCodePushPluginData": []
                        },
                        "SenderInformation": {
                            "UserInformation": {
                                "FirstName": "##NAME##",
                                "LastName": "##NAME##",
                                "EMail": "##EMAIL##"
                            }
                        },
                        "TransactionCodeConfigurations": [
                            {
                                "Id": "otpSignatureSmsText",
                                "HashAlgorithmIdentifier": "Sha256",
                                "Texts": [
                                    
                                ]
                            }
                        ],
                        "SignatureConfigurations": [
                            {
                                "PdfSignatureProperties": {
                                    "PdfAConformant": false,
                                    "PAdESPart4Compliant": false,
                                    "IncludeSigningCertificateChain": false,
                                    "SigningCertificateRevocationInformationIncludeMode": "DoNotInclude"
                                },
                                "PdfSignatureCryptographicData": {
                                    "SignatureHashAlgorithm": "Sha256",
                                    "SigningCertificateDescriptor": {
                                        "Identifier": "14527a6bcfa8b4d7d0183fca6b735b1c246d14ae",
                                        "Type": "Sha1Thumbprint",
                                        "Csp": "Default"
                                    }
                                }
                            },
                            {
                                "SpcId": "timestampSigningId",
                                "PdfSignatureProperties": {
                                    "PdfAConformant": false,
                                    "PAdESPart4Compliant": false,
                                    "IncludeSigningCertificateChain": false,
                                    "SigningCertificateRevocationInformationIncludeMode": "DoNotInclude",
                                    "SignatureTimestampData": {
                                        "Uri": "https://timestamp.test.namirialtsp.com",
                                        "Username": "xyzmo",
                                        "Password": "xyzmo",
                                        "SignatureHashAlgorithm": "Sha256"
                                    }
                                },
                                "PdfSignatureCryptographicData": {
                                    "SignatureHashAlgorithm": "Sha256",
                                    "SigningCertificateDescriptor": {
                                        "Identifier": "14527a6bcfa8b4d7d0183fca6b735b1c246d14ae",
                                        "Type": "Sha1Thumbprint",
                                        "Csp": "Default"
                                    }
                                }
                            },
                            {
                                "SpcId": "padesSigningId",
                                "PdfSignatureProperties": {
                                    "PdfAConformant": false,
                                    "PAdESPart4Compliant": true,
                                    "IncludeSigningCertificateChain": false,
                                    "SigningCertificateRevocationInformationIncludeMode": "IncludeDss"
                                },
                                "PdfSignatureCryptographicData": {
                                    "SignatureHashAlgorithm": "Sha256",
                                    "SigningCertificateDescriptor": {
                                        "Identifier": "14527a6bcfa8b4d7d0183fca6b735b1c246d14ae",
                                        "Type": "Sha1Thumbprint",
                                        "Csp": "Default"
                                    }
                                }
                            },
                            {
                                "SpcId": "padesTimestampSigningId",
                                "PdfSignatureProperties": {
                                    "PdfAConformant": false,
                                    "PAdESPart4Compliant": true,
                                    "IncludeSigningCertificateChain": false,
                                    "SigningCertificateRevocationInformationIncludeMode": "IncludeDss",
                                    "SignatureTimestampData": {
                                        "Uri": "https://timestamp.test.namirialtsp.com",
                                        "Username": "xyzmo",
                                        "Password": "xyzmo",
                                        "SignatureHashAlgorithm": "Sha256"
                                    }
                                },
                                "PdfSignatureCryptographicData": {
                                    "SignatureHashAlgorithm": "Sha256",
                                    "SigningCertificateDescriptor": {
                                        "Identifier": "14527a6bcfa8b4d7d0183fca6b735b1c246d14ae",
                                        "Type": "Sha1Thumbprint",
                                        "Csp": "Default"
                                    }
                                }
                            },
                            {
                                "SpcId": "padesRemoteCertificateSigningId",
                                "PdfSignatureProperties": {
                                    "PdfAConformant": false,
                                    "PAdESPart4Compliant": true,
                                    "IncludeSigningCertificateChain": false,
                                    "SigningCertificateRevocationInformationIncludeMode": "IncludeDss"
                                },
                                "PdfSignatureCryptographicData": {
                                    "SignatureHashAlgorithm": "Sha256",
                                    "SigningCertificateDescriptor": {
                                        "Identifier": "14527a6bcfa8b4d7d0183fca6b735b1c246d14ae",
                                        "Type": "Sha1Thumbprint",
                                        "Csp": "Default"
                                    }
                                }
                            },
                            {
                                "SpcId": "padesRemoteCertificateTimestampSigningId",
                                "PdfSignatureProperties": {
                                    "PdfAConformant": false,
                                    "PAdESPart4Compliant": true,
                                    "IncludeSigningCertificateChain": false,
                                    "SigningCertificateRevocationInformationIncludeMode": "IncludeDss",
                                    "SignatureTimestampData": {
                                        "Uri": "https://timestamp.test.namirialtsp.com",
                                        "Username": "xyzmo",
                                        "Password": "xyzmo",
                                        "SignatureHashAlgorithm": "Sha256"
                                    }
                                },
                                "PdfSignatureCryptographicData": {
                                    "SignatureHashAlgorithm": "Sha256",
                                    "SigningCertificateDescriptor": {
                                        "Identifier": "14527a6bcfa8b4d7d0183fca6b735b1c246d14ae",
                                        "Type": "Sha1Thumbprint",
                                        "Csp": "Default"
                                    }
                                }
                            },
                            {
                                "SpcId": "automaticSigningId",
                                "PdfSignatureProperties": {
                                    "PdfAConformant": false,
                                    "PAdESPart4Compliant": false,
                                    "IncludeSigningCertificateChain": false,
                                    "SigningCertificateRevocationInformationIncludeMode": "DoNotInclude"
                                },
                                "PdfSignatureCryptographicData": {
                                    "SignatureHashAlgorithm": "Sha256",
                                    "SigningCertificateDescriptor": {
                                        "Identifier": "14527a6bcfa8b4d7d0183fca6b735b1c246d14ae",
                                        "Type": "Sha1Thumbprint",
                                        "Csp": "Default"
                                    }
                                }
                            },
                            {
                                "SpcId": "automaticTimestampSigningId",
                                "PdfSignatureProperties": {
                                    "PdfAConformant": false,
                                    "PAdESPart4Compliant": false,
                                    "IncludeSigningCertificateChain": false,
                                    "SigningCertificateRevocationInformationIncludeMode": "DoNotInclude",
                                    "SignatureTimestampData": {
                                        "Uri": "https://timestamp.test.namirialtsp.com",
                                        "Username": "xyzmo",
                                        "Password": "xyzmo",
                                        "SignatureHashAlgorithm": "Sha256"
                                    }
                                },
                                "PdfSignatureCryptographicData": {
                                    "SignatureHashAlgorithm": "Sha256",
                                    "SigningCertificateDescriptor": {
                                        "Identifier": "14527a6bcfa8b4d7d0183fca6b735b1c246d14ae",
                                        "Type": "Sha1Thumbprint",
                                        "Csp": "Default"
                                    }
                                }
                            },
                            {
                                "SpcId": "swissComSigningId",
                                "PdfSignatureProperties": {
                                    "PdfAConformant": false,
                                    "PAdESPart4Compliant": true,
                                    "IncludeSigningCertificateChain": false,
                                    "SigningCertificateRevocationInformationIncludeMode": "IncludeDss"
                                },
                                "PdfSignatureCryptographicData": {
                                    "SignatureHashAlgorithm": "Sha256",
                                    "SigningCertificateDescriptor": {
                                        "Identifier": "14527a6bcfa8b4d7d0183fca6b735b1c246d14ae",
                                        "Type": "Sha1Thumbprint",
                                        "Csp": "Default"
                                    }
                                }
                            }
                        ],
                        "ViewerPreferences": {
                            "FinishWorkstepOnOpen": false,
                            "VisibleAreaOptions": {
                                "AllowedDomain": "*",
                                "Enabled": false
                            }
                        },
                        "ResourceUris": {
                            "SignatureImagesUri": "https://demo.xyzmo.com/Resource/SignatureImages/?link=1EA9/~nMwkYhYLTlQatp6F9nqtcDBZqpMHksBc~GsnhPF89Sr4i3yZG5ZnNaYB2KH"
                        },
                        "Policy": {
                            "GeneralPolicies": {
                                "AllowSaveDocument": true,
                                "AllowSaveAuditTrail": true,
                                "AllowRotatingPages": false,
                                "AllowAppendFileToWorkstep": false,
                                "AllowAppendTaskToWorkstep": false,
                                "AllowEmailDocument": true,
                                "AllowPrintDocument": true,
                                "AllowFinishWorkstep": true,
                                "AllowRejectWorkstep": true,
                                "AllowRejectWorkstepDelegation": true,
                                "AllowUndoLastAction": true,
                                "AllowColorizePdfForms": false,
                                "AllowAdhocPdfAttachments": false,
                                "AllowAdhocSignatures": false,
                                "AllowAdhocStampings": false,
                                "AllowAdhocFreeHandAnnotations": false,
                                "AllowAdhocTypewriterAnnotations": false,
                                "AllowAdhocPictureAnnotations": false,
                                "AllowAdhocPdfPageAppending": false
                            },
                            "WorkstepTasks": {
                                "PictureAnnotationMinResolution": 0,
                                "PictureAnnotationMaxResolution": 0,
                                "PictureAnnotationColorDepth": "Color16M",
                                "SequenceMode": "NoSequenceEnforced",
                                "PositionUnits": "PdfUnits",
                                "ReferenceCorner": "Lower_Left",
                                "Tasks": [
                                    {
                                        "PositionPage": 1,
                                        "Position": {
                                            "PositionX": 65.0,
                                            "PositionY": 602.0
                                        },
                                        "Size": {
                                            "Height": 80.0,
                                            "Width": 190.0
                                        },
                                        "AdditionalParameters": [
                                            {
                                                "Key": "enabled",
                                                "Value": "1"
                                            },
                                            {
                                                "Key": "positioning",
                                                "Value": "onPage"
                                            },
                                            {
                                                "Key": "req",
                                                "Value": "1"
                                            },
                                            {
                                                "Key": "fd",
                                                "Value": ""
                                            },
                                            {
                                                "Key": "fd_dateformat",
                                                "Value": "dd-MM-yyyy HH:mm:ss"
                                            },
                                            {
                                                "Key": "fd_timezone",
                                                "Value": "datetimeutc"
                                            }
                                        ],
                                        "AllowedSignatureTypes": [
                                            {
                                                "AllowedCapturingMethod": "Click2Sign",
                                                "Id": "5d8de01a-b924-4d87-98c9-cc45909c0b4b",
                                                "DiscriminatorType": "SigTypeClick2Sign",
                                                "Preferred": false,
                                                "StampImprintConfiguration": {
                                                    "DisplayExtraInformation": true,
                                                    "DisplayEmail": true,
                                                    "DisplayIp": true,
                                                    "DisplayName": true,
                                                    "DisplaySignatureDate": true,
                                                    "FontFamily": "Times New Roman",
                                                    "FontSize": 11.0
                                                }
                                            }
                                        ],
                                        "UseTimestamp": false,
                                        "IsRequired": true,
                                        "Id": "1#XyzmoDuplicateIdSeperator#Signature_a9cd7f4f-6c7d-ff20-dc3f-dea0a4638bd4",
                                        "DisplayName": "",
                                        "DocRefNumber": 1,
                                        "DiscriminatorType": "Signature"
                                    },
                                    {
                                        "Forms": [
                                            {
                                                "IsScrollAllowed": false,
                                                "IsComb": false,
                                                "MaxLength": 0,
                                                "IsMultiLine": false,
                                                "IsPassword": false,
                                                "IsFileSelect": false,
                                                "IsRequired": false,
                                                "Id": "TextBox_4e277dde-23c4-8a81-103a-f84abd798a8a",
                                                "PositionPage": 1,
                                                "DocRefNumber": 1,
                                                "Position": {
                                                    "PositionX": 71.0,
                                                    "PositionY": 558.0
                                                },
                                                "Size": {
                                                    "Height": 20.0,
                                                    "Width": 126.0
                                                },
                                                "IsHidden": false,
                                                "ExportValue": "",
                                                "Description": "",
                                                "KeepExistingValue": true,
                                                "DiscriminatorType": "TextBox"
                                            }
                                        ],
                                        "IsRequired": false,
                                        "Id": "73df5772-d204-40ca-908e-34d43891bc01",
                                        "DisplayName": "",
                        "Action": {
                "DocRefNumberSign": 1,
                    {
                    "DiscriminatorTypeRecipientConfiguration": "FormGroup"{
                        "ContactInformation": {
           }
                 "Email": "jane.doe@sample.com",
              ]
                "GivenName": "Jane",
            }
                        }"Surname": "Doe",
                            "NavigationLanguageCode": {
"EN"
                        }
       "HyperLinks": [],
             },
                    "LinksElements": [],
    {
                        "LinkTargetsSignatures": []{
                        }
        "ElementId": "sample sig click2sign",
             }
                },
   "Required": true,
            {
                    "IdDocumentNumber": "f808bfd9-4b09-416a-b919-e2f1b2de2623",
         1,
           "FirstName": "##NAME##",
                    "LastNameDisplayName": "##NAME##Sign here",
                     "OrderIndex": 2,
          "AllowedSignatureTypes": {
         "Email": "##EMAIL##",
                    "LanguageCode": "en",
     "ClickToSign": {
              "Status": "NotSigned",
                    "StatusReason": "",
 }
                      "RecipientType": "Cc",
         },
           "WorkstepRedirectionUrl": "",
                    "AllowAccessFinishedWorkstepFieldDefinition": false,{
                    "IsParallel": false,
                    "WorkstepConfigurationPosition": {
                        "SmallTextZoomFactorPercent": 100,
                        "ViewerPreferencesPageNumber": {},
    1,
                    "Policy": {
                   "X": 100,
        "GeneralPolicies": {
                                "AllowRotatingPagesY": true,200
                                 "AllowFinishWorkstep": true   },
                                    "AllowUndoLastActionSize": true{
                            },
            "Width": 100,
               "WorkstepTasks": {
                        "Height": 70
       "PictureAnnotationMinResolution": 0,
                            }
    "PictureAnnotationMaxResolution": 0,
                           }
     "PictureAnnotationColorDepth": "Color16M",
                      }
          "SequenceMode": "NoSequenceEnforced",
             ]
                   "PositionUnits": "PdfUnits" },
                    "SigningGroup": "firstSigner"
                }
 "ReferenceCorner": "Lower_Left",
          }
        }, {
             "TasksAction": []{
                "SendCopy": {
             }
       "RecipientConfiguration": {
                  }
      "ContactInformation": {
             }
                }"Email": "john.doe@sample.com",
            ]
        }
    ],
    "DocumentsGivenName": ["John",
        {
            "PageSizesInPoints": [
       "Surname": "Doe",
        {
                    "HeightLanguageCode": 792.0,"EN"
                    "Width": 612.0
    } 
           }
         }
   ],
            "DocRefNumber": 1, }
            "FileName": "Test.pdf",
}
             "FormFields": [
                {
                    "Name": "TextBox_4e277dde-23c4-8a81-103a-f84abd798a8a",
                    "Values": [
    }
    ]
}

Open the envelope

 After you have sent the envelope and you have got the envelopeId you can call the method https://demo.esignanywhere.net/api/v6/envelope/{envelopeId}/viewerlinks.  With the result of this method you get information about the envelope and you can find the workstepRedirectionURL (Viewerlink).

Viewerlinks URIImage Added

FigureDescription

Viewerlinks ConfigurationImage Added

Steps:

  1. Set the request type to GET
  2. Set the URI: https://demo.esignanywhere.net/api/v6/envelope/{envelopeId}/viewerlinks
  3. Add the authentication (Api Token) in the header

Response

Code Block
languagejava
themeEclipse
{
    "ViewerLinks": [
        

...

{
            

...

"ActivityId": "5609d2ea-1234-1234-1234-1959e63fde64",

...

            "

...

Email": "john.doe@sample.com",
            

...

"ViewerLink": "https://demo.esignanywhere.net/workstepredirector/sign?identifier=mdIkzVC1234512IgiOLD3Iodfynd~12345RbJQXusyZuCNp7FR6PniOT12345B~fQ1234A=="
        

...

}
    ]

...

}

With this redirection link it is possible to open and sign the document in your web portal.

Download the signed document

Before downloading the documents we need the file Ids. Therefore the following api call is necessary:

Download URIImage Added

FigureDescription

Download ConfigurationImage Added

Steps:

  1. Set the request type to GET
  2. Set the URI: https://demo.esignanywhere.net/Api/v6/envelope/{envelopeId}/files
  3. Add the authentication (Api Token) in the header

Response

Code Block
languagejava
themeEclipse
{
    "Documents": [
        

...

{

...

       

...

    

...

 

...

"

...

FileId": "

...

78b271f2-

...

1234-

...

1234-

...

1234-3799951b1d54",
    

...

 

...

       

...

"

...

FileName": "

...

Test.pdf",
            "

...

Attachments": 

...

[],
            "

...

PageCount": 

...

1,
 

...

 

...

 

...

 

...

        "

...

DocumentNumber": 

...

1
        }
    ],
    "

...

AuditTrail": 

...

{
        "

...

FileId": 

...

"7a86456c-1234-1234-1234-032757afa88e",
        "

...

XmlFileId": 

...

"dc60dcd4-1234-1234-1234-8828c79a2c88"
    

...

}

...

In Figure 7 you can see that you just have to do the authorization as usual and you have to attach your envelope ID to the URL. In the result we can see that the status is in progress so the one who got the envelope has not signed yet.

If we do the same request after the recipient has signed the envelope, we will get the result which is shown in Figure 8.

Image Removed

In this case the status says completed so we have now the document ID`s which we need to download the signed document.

Download the signed document

The request to download the signed document is quite easy. You must attach the document ID which we got from the “get the envelope” request to the URL.

The next Figure will give you an overview.

...

,
    "Disclaimers": []
}

Here you can see all three Ids for the documents which can be downloaded.

After this call just add the Ids in the following api call URI and download the documents:

File URIImage Added

FigureDescription

File ConfigurationImage Added

Steps:

  1. Set the request type to GET
  2. Set the URI: https://demo.esignanywhere.net/Api/v6/file/{fileId}
  3. Add the authentication (Api Token) in the header

Response


Document to download


...

  1. Save the file

Download Request JSON

not required

Download Response JSON

Should response 200 OK

Attention: You can choose between three document ID`s which you got from the “get the envelope” request.

For the “LogDocumentId” you get an Audit, for the “LogXmlDocumentId” you get an XML and for the “FlowDocumentId” you get the original document with the sign of the recipient.

Please also see the following video which shows the process of downloading all different documents:

Multimedia
namepostman_(download).mp4
width1000
height500

After the tutorial you should have the same requests which are shown in the next Figure.

...

Please also see the following video which shows the process from the version call until the get envelope api call:

Multimedia
namepostman.mp4
width1000
height500

How to use variables in Postman

Let us start with the

...

authentication but this time we will use variables, so we do not have to remember the api token for all other requests.

Manage environments

Manage EnvironmentsImage Added

Image Removed

We now want to save the different document ID`s (LogDocumentId, LogXmlDocumentId, FlowMDocumentId).

Therefore, we must check if the array has a length higher than 0. After that, we must do the same “set” command as in the previous once but now we have to “go” into the array. So we write again response.”name_of_the_array[on which place].”name_of_the_variable”.

example of how you save a date from the response. In this case we will save the envelope ID.

Environments Sending An EnvelopeImage Added

Environments Sending An Envelope ConfigurationImage Added

Download the file

First we get the File Ids and save them in our environment:

Please note: The document must be finished! Otherwise it is not possible to retrieve the document Ids.

Environments DownloadImage Added

  • LogDocument
  • LogXmlDocument
  • FinishedDocument

    After we have saved all documentId document Ids we can use them for the download request. You can find the configuration for saving the documentId here: Configuration

    Download the file

    Therefore, we just have to attach the variable to the URL which is shown in the next Figure.
    Image Removed

    Environments Download VariableImage Added

    Overview of all variables

    Image RemovedOverview Of All VariablesImage Added

    Advantages of using variables in Postman

    First, we do not have to remember all dates which we get through all the requests. Furthermore, we can simply change the organization key and the username and wen can play all requests without other changes because the variables auto fill in the new dates in the requests. Moreover we have a better overview of all ID`s so that we can easily match them with the requirements of the requests.

    Section

    After selecting the configuration button which is shown in Figure 11 another following window should appear which is shown in Figure 12. :

    There you must give fill in a name for the environment a name and we have to create the two variables which are one variable which is necessary for the authorizationauthentication. Further details in the next Figure:

    Image RemovedManage Environments OverviewImage Added

    First give your variable  a name (it does not matter how you name them). Then fill in “initial value” and “current value” your api token. After filling up the environments for the variable, we now can use it in the header of the next request.

    Authorization

    Authentication

    The next figure Figure 13 shows you the same request we have already done in the tutorial above but this time we will use the variables we have just created.

    Image RemovedEnvironments AuthenticationImage Added

    In the first column we have our api token. In the second column we now do not have to fill in our api token, but we must write {{##name_of_the_variable##}}. From now on you can always use the variable instead of continual writing your api token because all the dates are saved in the environments. If you run this request, you should get the status “200 OK”.

    Upload a file

    Now we will upload a file and save the file ID which we will get from the request in another variable in the environments.

    Image Removed


    Environments Upload FileImage Added

    Just these three lines of code are necessary to save the file ID in another variable. First we will parse the response, then we set the file ID with the command (“pm.environment.set(“name_of_the_variable”, response.” name_of_the_response”).

    After running this request, the new variable “sspFileId” “FileId” should be in the environments. See next Figure:

    Image Removed

    Variables OverviewImage Added

    Send an envelope

    After saving the file id we can now send the envelope with an integration of the variable. Therefore we just fill in {{ name_of_the_variable_for_the_fileID}} instead of copy paste the file ID. This is shown in the next Figure. In the Figure 17 there is another example of how you save a date from the response. In this case we will save the envelope ID.

    Image Removed

    Image Removed

    Get envelope description

    FigureDescription

    Image Removed

    1. Use variable at the end of the URI

    Figure

    Description

    Image Removed

    ...