Versions Compared

Key

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

This sample case guides you through the structure of a configuration of the workstep. Generally the following steps are necessary to test the workstep configuration.:

  1. Upload a file
  2. Create a workstep configuration
  3. Send an envelope

Please also see the next figure for an overview of the envelope structure:

Envelope Structure OverviewImage Added

For a basic guide of REST and the different API calls please also have a look at our Postman tutorial.

Table of Contents
maxLevel45
stylecircle

Upload a file

First, you will need a PDF document which you want to upload.

For REST you need You can upload a file with the following URL:

https://demo.esignanywhere.net/Api/

...

v6/

...

file/

...

upload

The result of the API call is the FileId which will be needed for the sending call.

Configuration

Info

Please note that with api v6 the general policies are set as default:

Code Block
languagejava
themeEclipse
   {
                    AllowAdhocFreeHandAnnotations = false,
                    AllowAdhocPdfAttachments = false,
                    AllowAdhocPdfPageAppending = false,
                    AllowAdhocPictureAnnotations = false,
                    AllowAdhocSignatures = false,
                    AllowAdhocStampings = false,
                    AllowAdhocTypewriterAnnotations = false,
                    AllowEmailDocument = true,
                    AllowPrintDocument = true,
                    AllowRejectWorkstep = true,
                    AllowSaveAuditTrail = true,
                    AllowSaveDocument = true,
                    AllowUndoLastAction = false,
                    AllowRotatingPages = false,
                    AllowAppendFileToWorkstep = false,
                    AllowAppendTasksToWorkstep = false,
                    AllowColorizePdfForms = false,
                    AllowReloadOfFinishedWorkstep = true,
                    AllowDownloadOfSignedP7MFiles = true
                };
            }

Via UI it is possible to change the following policies (settings can be found in organization settings → Policy for the document viewer for recipients):

Code Block
languagexml
themeEclipse
<GeneralPolicies>
  <AllowSaveDocument>1</AllowSaveDocument>
  <AllowSaveAuditTrail>1</AllowSaveAuditTrail>
  <AllowUndoLastAction>1</AllowUndoLastAction>
  <AllowAdhocPdfAttachments>0</AllowAdhocPdfAttachments>
</GeneralPolicies>



The

...

For SOAP you need the API call UploadTemporarySspFile_v1

For this call you need an authentication. For authentication, you’ll need an api token. You can find this information in Settings / Api Tokens and Apps. Note that all API methods require authentication. For more information about the authorization please have a look the  API Reference Guide for SOAP or the Postman Guide for REST

Tip

SOAP ONLY: After the authorization you need to BASE64 the PDF which you want to upload. If the call was successful you get a file Id which we will need for sending an envelope.

Workstep configuration

The workstep configuration is the core of the envelope. Within the workstep configuration you can define following settings:

  • AdditionalClientWorkstepInformation
  • Viewer preferences
  • Policy
  • Sender and receiver information
  • Workstep tasks
  • Signature template
  • Authentication
  • PdfForms

Empty workstep

  • Envelope configuration
    • Name
    • Meta data
    • Document time stamp etc.
  • Unassigned elements
    • Textboxes
    • Radio buttons
    • signatures etc.
  • Activities
    • Action
      • Sign
        • Recipient configuration
          • Authentication configuration
      • View
        • Recipient configuration
          • Authentication configuration
      • Sign automatic etc.
      • SignAsP7M
    • Visibility options
  • Email configuration
  • Reminder configuration
  • Expiration configuration
  • Callback configuration
  • Agreement configuration

Starting configuration

Lets start with a nearly empty configuration first. Then Lets start with an empty workstep first and then fill it step by step with the settings above. In the next collapse you can find an empty workstep (change ##EMAIL## to the email-address and ”NAME## to the name of the recipient you want to send the envelope):the sample configuration which includes one action (ClickToSign):

Code Block
languagejava
themeEclipse
{
    "Documents": [{
            "FileId": "c5a229ae-1234-1234-b6e8-d4eb9fd7bcf5",
            "DocumentNumber": 1
        }
    ],
    "Name": "Test",
    "Activities": [{
            "Action": {
                "Sign": {
                    "RecipientConfiguration": {
                        "ContactInformation": {
                            "Email": "janedoe@sample.com",
                            "GivenName": "Jane",
                            "Surname": "Doe",
                            "LanguageCode": "EN"
                        }
                    },
                    "Elements": {
                        "Signatures": [{
                                "TaskConfiguration": {
                                    "OrderDefinition": {
                                        "OrderIndex": 0
                                    }
                                },
                                "ElementId": "sample sig clicktosign",
                                "Required": true,
                                "DocumentNumber": 1,
                                "DisplayName": "Sign here",
                                "AllowedSignatureTypes": {
                                    "ClickToSign": {
                                    }
                                },
                                "FieldDefinition": {
                                    "Position": {
                                        "PageNumber": 1,
                                        "X": 100,
                                        "Y": 200
                                    },
                                    "Size": {
                                        "Width": 100,
                                        "Height": 70
                                    }
                                }
                            }
                        ]
                    },
                    "SigningGroup": "firstSigner"
                }
            }
        }
    ]
}


The next screenshot shows the document after sending the configuration:

Sent EnvelopeImage Added

With this configuration we can now add the settings which are mentioned above. First, lets start with the envelope configuration.

Envelope configuration

You can place the general policies directly below the following row:

Code Block
languagejava
themeEclipse
  "Name": "string",
  "MetaData": "string",
  "AddDocumentTimestamp": true,
  "ShareWithTeam": true,
  "LockFormFieldsOnFinish": true,

Unassigned elements

This section contains all elements which were not assigned to a specific recipient. This results for example from adding so called sig-string to the document. For example, the SIGNificant Server Platform, analyzes PDF documents and searches for so-called 'sig-strings'. When found, a signature field is inserted exactly on this position of the document.

Such elements could be:

  • PDF form fields
    • Textboxes, Checkboxes, Comoboxes, Radio buttons, Listboxes
  • Signatures
  • Predefined field elements

Attachments

Code Block
languagejava
themeEclipse
titleAttachments
"Attachments": [
      {
        "ElementId": "string",
        "DocumentNumber": 0,
        "Required": true,
        "FileName": "string",
        "DisplayIconType": "Paperclip",
        "FieldDefinition": {
          "Position": {
            "PageNumber": 0,
            "X": 0,
            "Y": 0
          },
          "Size": {
            "Width": 0,
            "Height": 0
          }
        },
        "TaskConfiguration": {
          "OrderDefinition": {
            "OrderIndex": 0
          }
        }
      }
    ],

Link configuration

Code Block
languagejava
themeEclipse
titleLink configuration
"LinkConfiguration": {
      "HyperLinks": [
        {
          "ElementId": "string",
          "Uri": "string",
          "DocumentNumber": 0,
          "FieldDefinition": {
            "Position": {
              "PageNumber": 0,
              "X": 0,
              "Y": 0
            },
            "Size": {
              "Width": 0,
              "Height": 0
            }
          }
        }
      ],
      "DocumentLinks": [
        {
          "ElementId": "string",
          "DocumentNumber": 0,
          "LinkAnchor": {
            "ElementId": "string",
            "DocumentNumber": 0,
            "LinkDefinition": {
              "Position": {
                "PageNumber": 0,
                "X": 0,
                "Y": 0
              },
              "Size": {
                "Width": 0,
                "Height": 0
              }
            }
          },
          "FieldDefinition": {
            "Position": {
              "PageNumber": 0,
              "X": 0,
              "Y": 0
            },
            "Size": {
              "Width": 0,
              "Height": 0
            }
          }
        }
      ]
    },

Reading confirmationImage Added

With the reading task a recipient must confirm reading the document to have the evidence that he/she was reading it.

Generally there are 3 basic ways concerning the range of the reading task:

  • Reading task for an area
  • Reading task for one page
  • Reading task for the document

Area read confirmation

Code Block
languagejava
themeEclipse
titleArea read confirmation
"AreaReadConfirmations": [
      {
        "ElementId": "string",
        "Required": true,
        "DocumentNumber": 0,
        "DisplayName": "string",
        "Definition": {
          "Position": {
            "PageNumber": 0,
            "X": 0,
            "Y": 0
          },
          "Size": {
            "Width": 0,
            "Height": 0
          }
        },
        "TaskConfiguration": {
          "OrderDefinition": {
            "OrderIndex": 0
          }
        }
      }
    ],

Page read confirmation

Code Block
languagejava
themeEclipse
titlePage read confirmation
"PageReadConfirmations": [
      {
        "ElementId": "string",
        "Required": true,
        "DocumentNumber": 0,
        "DisplayName": "string",
        "PageNumber": 0,
        "TaskConfiguration": {
          "OrderDefinition": {
            "OrderIndex": 0
          }
        }
      }
    ],

Document read confirmation

Code Block
languagejava
themeEclipse
titleDocument read confirmation
 "DocumentConfirmationReadConfirmation": {
      "ElementId": "string",
      "Required": true,
      "DisplayName": "string",
      "TaskConfiguration": {
        "OrderDefinition": {
          "OrderIndex": 0
        }
      }
    }

Activities

This is the main part of the envelope configuration. The section activities can include one to many actions.

Action

Please note that additionally to the elements below you can add a visibility option to either show all documents to the recipient or just selected once:

Code Block
languagejava
themeEclipse
titleVisibility option
 "VisibilityOptions": [
        {
          "DocumentNumber": 0,
          "IsHidden": true
        }
      ]

Those actions include the recipients of the envelope as well as the tasks for those recipients (signing, viewing etc.)

One action can either include one of the following tasks:

  • Automatic signing
  • Document viewing
  • P7M signing
  • Signing

Automatic signing

Please see the following sample for an automatic signing action:

Code Block
languagejava
themeEclipse
{
	"Documents": [
		{
			"FileId": "1234ddc4-1234-1234-1234-3af31c131234",
			"DocumentNumber": 1
		}
	],
	"Name": "Test.pdf",
	"AddDocumentTimestamp": false,
	"ShareWithTeam": true,
	"LockFormFieldsOnFinish": false,
	"Activities": [
		{
			"Action": {
				"SignAutomatic": {
					"ProfileId": "12347562-1234-1234-1234-5a43184d1234",
					"RenderingLanguageCode": "EN",
					"VisibleSignatures": [
						{
							"DocumentNumber": 1,
							"UseExternalTimestampServer": false,
							"FieldDefinition": {
								"Position": {
									"PageNumber": 1,
									"X": 68.0,
									"Y": 631.8
								},
								"Size": {
									"Width": 190.0,
									"Height": 80.0
								}
							}
						}
					]
				}
			},
			"VisibilityOptions": [
				{
					"DocumentNumber": 1,
					"IsHidden": false
				}
			]
		}
	],
	"EmailConfiguration": {
		"Subject": "Please sign the enclosed envelope",
		"Message": "Dear #RecipientFirstName# #RecipientLastName#

#PersonalMessage#

Please sign the envelope #EnvelopeName#

Envelope will expire at #ExpirationDate#"
	},
	"ReminderConfiguration": {
		"Enabled": true,
		"FirstReminderInDays": 5,
		"ReminderResendIntervalInDays": 3,
		"BeforeExpirationInDays": 3
	},
	"ExpirationConfiguration": {
		"ExpirationInSecondsAfterSending": 2419200
	}
}

Document viewing

Please see the following sample for a document viewing action:

Code Block
languagejava
themeEclipse
{
	"Documents": [
		{
			"FileId": "264addc4-1234-1234-1234-3af31c13b3c2",
			"DocumentNumber": 1
		}
	],
	"Name": "Test.pdf",
	"AddDocumentTimestamp": false,
	"ShareWithTeam": true,
	"LockFormFieldsOnFinish": false,
	"Activities": [
		{
			"Action": {
				"View": {
					"RecipientConfiguration": {
						"ContactInformation": {
							"Email": "john.doe@sample.com",
							"GivenName": "John",
							"Surname": "Doe",
							"LanguageCode": "EN"
						},
						"SendEmails": true,
						"AllowAccessAfterFinish": true
					},
					"ViewingGroup": "1"
				}
			},
			"VisibilityOptions": [
				{
					"DocumentNumber": 1,
					"IsHidden": false
				}
			]
		},
		{
			"Action": {
				"SendCopy": {
					"RecipientConfiguration": {
						"ContactInformation": {
							"Email": "jane.doe@sample.com",
							"GivenName": "Jane",
							"Surname": "Doe",
							"LanguageCode": "EN"
						}
					},
					"CopyingGroup": "2"
				}
			},
			"VisibilityOptions": [
				{
					"DocumentNumber": 1,
					"IsHidden": false
				}
			]
		}
	],
	"EmailConfiguration": {
		"Subject": "Please sign the enclosed envelope",
		"Message": "Dear #RecipientFirstName# #RecipientLastName#

#PersonalMessage#

Please sign the envelope #EnvelopeName#

Envelope will expire at #ExpirationDate#"
	},
	"ReminderConfiguration": {
		"Enabled": true,
		"FirstReminderInDays": 5,
		"ReminderResendIntervalInDays": 3,
		"BeforeExpirationInDays": 3
	},
	"ExpirationConfiguration": {
		"ExpirationInSecondsAfterSending": 2419200
	}
}


P7M signing

Please see the following sample for a P7M signing action (for more information please also see Using P7M (PKCS7) signature type):

Code Block
languagejava
themeEclipse
{
    "Documents": [
        {
            "FileId": "a33f6f7d-1234-1234-1234-42cfbc3cad08",
            "DocumentNumber": 1
        }
    ],
    "Name": "test",
    "Activities": [
        {
            "Action": {
                "SignAsP7M": {
                    "RecipientConfiguration": {
                        "ContactInformation": {
                            "Email": "john.doe@sample.com",
                            "GivenName": "John",
                            "Surname": "Doe",
                            "LanguageCode": "EN"
                        },
                        "SendEmails": true
                    },
                    "SignatureMethods": {
                        "LocalCertificate": false,
                        "DisposableCertificate": {
                            "DocumentIssuingCountry": "AT",
                            "IdentificationIssuingCountry": "AT",
                            "IdentificationType": "DrivingLicense",
                            "PhoneNumber": "+##PhoneNumber##",
                            "DocumentType": "DriverLicense",
                            "DocumentIssuedBy": "##Issuer##",
                            "DocumentIssuedOn": "2023-02-15",
                            "DocumentExpiryDate": "2023-02-28",
                            "SerialNumber": "##SerialNumber##",
                            "DocumentNumber": "123"
                        }
                    },
                    "SignAsP7MGroup": "1"
                }
            }
        }
    ]
}


Signing

Lets have a detailed look into the signing task.

The signing task includes the following information:

  • Recipient configuration
    • Contact information
  • Personal message (optional)
  • Authentication
    • Access code
    • SMS OTP
    • Swedish bankId
    • OAuth
    • SAML
  • Elements
    • same elements available as documented in the section "unassigned elements"
  • Signature data configuration
  • Batch configuration
Recipient configuration
Code Block
languagejava
themeEclipse
titleRecipient configuration
"RecipientConfiguration": {
            "ContactInformation": {
              "Email": "string",
              "GivenName": "string",
              "Surname": "string",
              "PhoneNumber": "string",
              "LanguageCode": "AF"
            },
Personal message
Code Block
languagejava
themeEclipse
titlePersonal message
 "PersonalMessage": "string",
Authentication
Code Block
languagejava
themeEclipse
titleAuthentication
 "AuthenticationConfiguration": {

Within this section you can place the different authentication methods:

Access code
Code Block
languagejava
themeEclipse
titleAccess code
 "AccessCode": {
                "Code": "string"
              },
SMS-OTP
Code Block
languagejava
themeEclipse
titleSMS-OTP
 "SmsOneTimePassword": {
                "PhoneNumber": "string"
              },
Swedish Bank Id
Code Block
languagejava
themeEclipse
titleSwedish Bank Id
 "SwedishBankId": {
                "PersonalNumber": "string",
                "AllowAnyPersonalNumber": true
              },
OAuth2
Code Block
languagejava
themeEclipse
titleOAuth2
  "OAuthAuthentications": [
                {
                  "ProviderName": "string",
                  "Validations": [
                    {
                      "FieldReferenceId": "string",
                      "ExpectedValue": "string"
                    }
                  ]
                }
              ],
SAML
Code Block
languagejava
themeEclipse
titleSAML
 "SamlAuthentications": [
                {
                  "ProviderName": "string",
                  "Validations": [
                    {
                      "FieldReferenceId": "string",
                      "ExpectedValue": "string"
                    }
                  ]
                }
              ]

Additionally to the those configuration referring the recipient also following settings are available. This setting include to disable the email and allowing the recipient to access the envelope again after it has been completed and closed. Furthermore, it is possible to include app links in the email and allowing delegation:

Code Block
languagejava
themeEclipse
titleAdditional recipient configuration
"DisableEmail": true,
            "AllowAccessAfterFinish": true,
            "IncludedEmailAppLinks": {
              "Android": true,
              "iOS": true,
              "Windows": true
            },
            "AllowDelegation": true

Elements

In this section you can add elements for the recipient which (if they are set required) must be finished in order to finish the envelope.

PDF Forms

Textbox


Code Block
languagejava
themeEclipse
titleTextbox
 "TextBoxes": [
              {
                "ElementId": "string",
                "Required": true,
                "Value": "string",
                "DocumentNumber": 0,
                "Validation": {
                  "Type": "None",
                  "DateValidationConfiguration": {
                    "Format": "string",
                    "Range": {
                      "From": "string",
                      "To": "string"
                    }
                  },
                  "NumberValidationConfiguration": {
                    "DecimalDigits": 0,
                    "Symbol": "string",
                    "SymbolLocation": "Start",
                    "GroupSeparator": "Comma",
                    "DecimalSeparator": "Comma",
                    "Range": {
                      "From": "string",
                      "To": "string"
                    }
                  },
                  "PhoneValidationConfiguration": {
                    "Type": "International"
                  },
                  "TimeValidationConfiguration": {
                    "Format": "string",
                    "Range": {
                      "From": "string",
                      "To": "string"
                    }
                  }
                },
                "FieldDefinition": {
                  "ReadOnly": true,
                  "MaxLength": 0,
                  "IsMultiline": true,
                  "IsPassword": true,
                  "IsFileSelect": true,
                  "IsScrollAllowed": true,
                  "IsCombined": true,
                  "TextFormat": {
                    "TextColor": "string",
                    "FontSizeInPt": 0,
                    "FontName": "string",
                    "Bold": true,
                    "Italic": true,
                    "TextAlign": "Left"
                  },
                  "Position": {
                    "PageNumber": 0,
                    "X": 0,
                    "Y": 0
                  },
                  "Size": {
                    "Width": 0,
                    "Height": 0
                  }
                },
                "TaskConfiguration": {
                  "GroupedOrderDefinition": {
                    "GroupId": "string",
                    "OrderIndex": 0
                  }
                }
              }
            ],
Checkbox
Code Block
languagejava
themeEclipse
titleCheckbox
"CheckBoxes": [
              {
                "ElementId": "string",
                "RequiredEvalPolicy": "None",
                "DocumentNumber": 0,
                "Required": true,
                "IsChecked": true,
                "FieldDefinition": {
                  "ExportValue": "string",
                  "Position": {
                    "PageNumber": 0,
                    "X": 0,
                    "Y": 0
                  },
                  "Size": {
                    "Width": 0,
                    "Height": 0
                  },
                  "ReadOnly": true
                },
                "TaskConfiguration": {
                  "GroupedOrderDefinition": {
                    "GroupId": "string",
                    "OrderIndex": 0
                  }
                }
              }
            ],
Combobox
Code Block
languagejava
themeEclipse
titleCombobox
 "ComboBoxes": [
              {
                "ElementId": "string",
                "DocumentNumber": 0,
                "Required": true,
                "Value": "string",
                "FieldDefinition": {
                  "TextFormat": {
                    "TextColor": "string",
                    "FontSizeInPt": 0,
                    "FontName": "string",
                    "Bold": true,
                    "Italic": true,
                    "TextAlign": "Left"
                  },
                  "Items": [
                    {
                      "ExportValue": "string",
                      "DisplayValue": "string"
                    }
                  ],
                  "IsEditable": true,
                  "ReadOnly": true,
                  "Position": {
                    "PageNumber": 0,
                    "X": 0,
                    "Y": 0
                  },
                  "Size": {
                    "Width": 0,
                    "Height": 0
                  }
                },
                "TaskConfiguration": {
                  "GroupedOrderDefinition": {
                    "GroupId": "string",
                    "OrderIndex": 0
                  }
                }
              }
            ],
Radio button
Code Block
languagejava
themeEclipse
titleRadio button
 "RadioButtons": [
              {
                "GroupName": "string",
                "DocumentNumber": 0,
                "IsSelectUnison": true,
                "Required": true,
                "SelectedItem": "string",
                "FieldDefinitions": [
                  {
                    "ExportValue": "string",
                    "IsChecked": true,
                    "CheckBoxAppearance": true,
                    "ReadOnly": true,
                    "Position": {
                      "PageNumber": 0,
                      "X": 0,
                      "Y": 0
                    },
                    "Size": {
                      "Width": 0,
                      "Height": 0
                    }
                  }
                ],
                "GroupTaskConfiguration": {
                  "GroupedOrderDefinition": {
                    "GroupId": "string",
                    "OrderIndex": 0
                  }
                }
              }
            ],
Listbox
Code Block
languagejava
themeEclipse
titleListbox
 "ListBoxes": [
              {
                "ElementId": "string",
                "DocumentNumber": 0,
                "Required": true,
                "PreSelectedItems": [
                  "string"
                ],
                "FieldDefinition": {
                  "TextFormat": {
                    "TextColor": "string",
                    "FontSizeInPt": 0,
                    "FontName": "string",
                    "Bold": true,
                    "Italic": true,
                    "TextAlign": "Left"
                  },
                  "Items": [
                    {
                      "ExportValue": "string",
                      "DisplayValue": "string"
                    }
                  ],
                  "IsMultiSelect": true,
                  "ReadOnly": true,
                  "Position": {
                    "PageNumber": 0,
                    "X": 0,
                    "Y": 0
                  },
                  "Size": {
                    "Width": 0,
                    "Height": 0
                  }
                },
                "TaskConfiguration": {
                  "GroupedOrderDefinition": {
                    "GroupId": "string",
                    "OrderIndex": 0
                  }
                }
              }
            ],

Signatures


Code Block
languagejava
themeEclipse
titleSignature information
"Signatures": [
              {
                "ElementId": "string",
                "Required": true,
                "DocumentNumber": 0,
                "DisplayName": "string",
                "FieldDescription": "string",
 				"AllowedSignatureTypes": {

Before you add the signatures please add the following in the section "Signatures" . [ in order to set the order of the recipients (required) and to set the timestamp (optional):

Code Block
languagejava
themeEclipse
titleTaskConfiguration
"TaskConfiguration": {
                  "StampImprintDateConfiguration": {
                    "UseLocalTimezone": true,
                    "DateTimeFormat": "string"
                  },
                  "UseExternalTimestampServer": true,
                  "BatchId": "string",
                  "OrderDefinition": {
                    "OrderIndex": 0
                  }
                }

In the "AllowedSignatureTypes" you can place the following available signature types:

Info

Please note: The following configurations for the signature types do not include the field definition. Please add the following code to the choosen signature type in order to place the signature field on the document.

Code Block
languagejava
titleField definition
"FieldDefinition": {
                  "Position": {
                    "PageNumber": 0,
                    "X": 0,
                    "Y": 0
                  },
                  "Size": {
                    "Width": 0,
                    "Height": 0
                  }
                },


ClickToSign
Code Block
languagejava
themeEclipse
titleClickToSign
"ClickToSign": {
                    "UseExternalSignatureImage": "Optional",
                    "Preferred": true,
                    "StampImprintConfiguration": {
                      "DisplayExtraInformation": true,
                      "DisplayEmail": true,
                      "DisplayTransactionId": true,
                      "DisplayTransactionToken": true,
                      "DisplayPhoneNumber": true,
                      "UseCustomStampImprint": true,
                      "DisplayIp": true,
                      "DisplayName": true,
                      "DisplaySignatureDate": true,
                      "FontName": "string",
                      "FontSizeInPt": 0
                    }
                  },
DrawToSign
Code Block
languagejava
themeEclipse
titleDrawToSign
 "DrawToSign": {
                    "UseExternalSignatureImage": "Optional",
                    "Preferred": true,
                    "StampImprintConfiguration": {
                      "DisplayExtraInformation": true,
                      "DisplayEmail": true,
                      "DisplayTransactionId": true,
                      "DisplayTransactionToken": true,
                      "DisplayPhoneNumber": true,
                      "UseCustomStampImprint": true,
                      "DisplayIp": true,
                      "DisplayName": true,
                      "DisplaySignatureDate": true,
                      "FontName": "string",
                      "FontSizeInPt": 0
                    }
                  },
TypeToSign
Code Block
languagejava
themeEclipse
titleTypeToSign
 "TypeToSign": {
                    "UseExternalSignatureImage": "Optional",
                    "Preferred": true,
                    "StampImprintConfiguration": {
                      "DisplayExtraInformation": true,
                      "DisplayEmail": true,
                      "DisplayTransactionId": true,
                      "DisplayTransactionToken": true,
                      "DisplayPhoneNumber": true,
                      "UseCustomStampImprint": true,
                      "DisplayIp": true,
                      "DisplayName": true,
                      "DisplaySignatureDate": true,
                      "FontName": "string",
                      "FontSizeInPt": 0
                    }
                  },
LocalCertificate
Code Block
languagejava
themeEclipse
titleLocalCertificate
 "LocalCertificate": {
                    "EnforcePreferredHashAlgorithm": true,
                    "PreferredHashAlgorithm": "Sha256",
                    "UseExternalSignatureImage": "Optional",
                    "Preferred": true,
                    "StampImprintConfiguration": {
                      "DisplayExtraInformation": true,
                      "DisplayEmail": true,
                      "DisplayTransactionId": true,
                      "DisplayTransactionToken": true,
                      "DisplayPhoneNumber": true,
                      "UseCustomStampImprint": true,
                      "DisplayIp": true,
                      "DisplayName": true,
                      "DisplaySignatureDate": true,
                      "FontName": "string",
                      "FontSizeInPt": 0
                    }
                  },
DisposableCertificate
Code Block
languagejava
themeEclipse
titleDisposableCertificate
"DisposableCertificate": {
                    "IsLongLived": false,
                    "ValidityInSeconds": 0,
                    "UseExternalSignatureImage": "Optional",
                    "Preferred": true,
                    "StampImprintConfiguration": {
                      "DisplayExtraInformation": true,
                      "DisplayEmail": true,
                      "DisplayTransactionId": true,
                      "DisplayTransactionToken": true,
                      "DisplayPhoneNumber": true,
                      "UseCustomStampImprint": true,
                      "DisplayIp": true,
                      "DisplayName": true,
                      "DisplaySignatureDate": true,
                      "FontName": "string",
                      "FontSizeInPt": 0
                    }
                  },
DisposableCertificate (Long-Lived)

Beside the disposable certificate, the solution can use a specific procedure called "Long-Lived Disposable" for scenarios where the signature becomes a valid qualified signature after signing. This can be useful where the identification is confirmed/approved after signing of the document. 

Info

Please note the following: It is not allowed to download the document or the audit trail for a long-lived disposable. Therefore, the policies must be set correctly (<AllowSaveDocument>0</AllowSaveDocument> and <AllowSaveAuditTrail>0</AllowSaveAuditTrail>)


General description

The Long-Lived Disposable Certificate (LLD) is a special variant of a Disposable certificate.

The main difference to the disposable certificate is, that it is not being activated immediately, but after the signatures have been applied. LLD are always active, no need to activate them.

Please see the following sample configuration for LLD:

Code Block
languagejava
themeEclipse
titleDisposableCertificate (Long-Lived)
"DisposableCertificate": {
                    "IsLongLived": true,
                    "ValidityInSeconds": 0,
                    "UseExternalSignatureImage": "Optional",
                    "Preferred": true,
                    "StampImprintConfiguration": {
                      "DisplayExtraInformation": true,
                      "DisplayEmail": true,
                      "DisplayTransactionId": true,
                      "DisplayTransactionToken": true,
                      "DisplayPhoneNumber": true,
                      "UseCustomStampImprint": true,
                      "DisplayIp": true,
                      "DisplayName": true,
                      "DisplaySignatureDate": true,
                      "FontName": "string",
                      "FontSizeInPt": 0
                    }
                  },
SwissComOnDemand
Code Block
languagejava
themeEclipse
titleSwissComOnDemand
"SwissComOnDemand": {
                    "ValidityInSeconds": 0,
                    "Preferred": true,
                    "StampImprintConfiguration": {
                      "DisplayExtraInformation": true,
                      "DisplayEmail": true,
                      "DisplayTransactionId": true,
                      "DisplayTransactionToken": true,
                      "DisplayPhoneNumber": true,
                      "UseCustomStampImprint": true,
                      "DisplayIp": true,
                      "DisplayName": true,
                      "DisplaySignatureDate": true,
                      "FontName": "string",
                      "FontSizeInPt": 0
                    }
                  },
ATrustCertificate
Code Block
languagejava
themeEclipse
titleATrustCertificate
 "ATrustCertificate": {
                    "TemplateId": "string",
                    "Preferred": true,
                    "StampImprintConfiguration": {
                      "DisplayExtraInformation": true,
                      "DisplayEmail": true,
                      "DisplayTransactionId": true,
                      "DisplayTransactionToken": true,
                      "DisplayPhoneNumber": true,
                      "UseCustomStampImprint": true,
                      "DisplayIp": true,
                      "DisplayName": true,
                      "DisplaySignatureDate": true,
                      "FontName": "string",
                      "FontSizeInPt": 0
                    }
                  },
Biometric

Please note the following available values for the "SignaturePositioning":

ValueDescription
intersects with fieldThe signing must intersect with the field but the signer is allowed to leave the boundaries of the signature field
within fieldThe signature must be completely within the boundaries of the signature field
on pageThe signature can start anywhere on the page, even without intersecting with the signature field


Code Block
languagejava
themeEclipse
titleBiometric
"Biometric": {
                    "BiometricVerification": true,
                    "AllowBiometricStoringOnly": true,
                    "StoreSignedResponseWithoutBioData": true,
                    "AllowSkipBiometricVerification": true,
                    "BiometricServerUserId": "string",
                    "SignaturePositioning": "WithinField",
                    "Preferred": true,
                    "StampImprintConfiguration": {
                      "DisplayExtraInformation": true,
                      "DisplayEmail": true,
                      "DisplayTransactionId": true,
                      "DisplayTransactionToken": true,
                      "DisplayPhoneNumber": true,
                      "UseCustomStampImprint": true,
                      "DisplayIp": true,
                      "DisplayName": true,
                      "DisplaySignatureDate": true,
                      "FontName": "string",
                      "FontSizeInPt": 0
                    }
                  },
RemoteCertificate
Code Block
languagejava
themeEclipse
titleRemoteCertificate
"RemoteCertificate": {
                    "ValidityInSeconds": 0,
                    "UseExternalSignatureImage": "Optional",
                    "Preferred": true,
                    "StampImprintConfiguration": {
                      "DisplayExtraInformation": true,
                      "DisplayEmail": true,
                      "DisplayTransactionId": true,
                      "DisplayTransactionToken": true,
                      "DisplayPhoneNumber": true,
                      "UseCustomStampImprint": true,
                      "DisplayIp": true,
                      "DisplayName": true,
                      "DisplaySignatureDate": true,
                      "FontName": "string",
                      "FontSizeInPt": 0
                    }
                  },
OneTimePassword
Code Block
languagejava
themeEclipse
titleOneTimePassword
"OneTimePassword": {
                    "ValidityInSeconds": 0,
                    "UseExternalSignatureImage": "Optional",
                    "Preferred": true,
                    "StampImprintConfiguration": {
                      "DisplayExtraInformation": true,
                      "DisplayEmail": true,
                      "DisplayTransactionId": true,
                      "DisplayTransactionToken": true,
                      "DisplayPhoneNumber": true,
                      "UseCustomStampImprint": true,
                      "DisplayIp": true,
                      "DisplayName": true,
                      "DisplaySignatureDate": true,
                      "FontName": "string",
                      "FontSizeInPt": 0
                    }
                  },
SwedishBankId
Code Block
languagejava
themeEclipse
titleSwedishBankId
 "SwedishBankId": {
                    "Preferred": true,
                    "StampImprintConfiguration": {
                      "DisplayExtraInformation": true,
                      "DisplayEmail": true,
                      "DisplayTransactionId": true,
                      "DisplayTransactionToken": true,
                      "DisplayPhoneNumber": true,
                      "UseCustomStampImprint": true,
                      "DisplayIp": true,
                      "DisplayName": true,
                      "DisplaySignatureDate": true,
                      "FontName": "string",
                      "FontSizeInPt": 0
                    }
                  },
SignaturePlugins
Code Block
languagejava
themeEclipse
titleSignaturePlugins
"SignaturePlugins": [
                    {
                      "PluginId": "string",
                      "Preferred": true,
                      "StampImprintConfiguration": {
                        "DisplayExtraInformation": true,
                        "DisplayEmail": true,
                        "DisplayTransactionId": true,
                        "DisplayTransactionToken": true,
                        "DisplayPhoneNumber": true,
                        "UseCustomStampImprint": true,
                        "DisplayIp": true,
                        "DisplayName": true,
                        "DisplaySignatureDate": true,
                        "FontName": "string",
                        "FontSizeInPt": 0
                      }
                    }
                  ]

Predefined Field Elements

You can also add predefined elements to the document. Please see the following configurations:

Textfields
Code Block
languagejava
themeEclipse
titleTextfields
"TextFields": [
                {
                  "ElementId": "string",
                  "DocumentNumber": 0,
                  "Value": "string",
                  "FieldDefinition": {
                    "TextFormat": {
                      "TextColor": "string",
                      "FontSizeInPt": 0,
                      "FontName": "string",
                      "Bold": true,
                      "Italic": true,
                      "TextAlign": "Left"
                    },
                    "Position": {
                      "PageNumber": 0,
                      "X": 0,
                      "Y": 0
                    },
                    "Size": {
                      "Width": 0,
                      "Height": 0
                    }
                  }
                }
              ],
EmailFields
Code Block
languagejava
themeEclipse
titleEmailFields
 "EmailFields": [
                {
                  "ElementId": "string",
                  "DocumentNumber": 0,
                  "FieldDefinition": {
                    "TextFormat": {
                      "TextColor": "string",
                      "FontSizeInPt": 0,
                      "FontName": "string",
                      "Bold": true,
                      "Italic": true,
                      "TextAlign": "Left"
                    },
                    "Position": {
                      "PageNumber": 0,
                      "X": 0,
                      "Y": 0
                    },
                    "Size": {
                      "Width": 0,
                      "Height": 0
                    }
                  }
                }
              ],
InitialsFields
Code Block
languagejava
themeEclipse
titleInitialsFields
"InitialsFields": [
                {
                  "ElementId": "string",
                  "DocumentNumber": 0,
                  "IncludeMiddleNameInitials": true,
                  "FieldDefinition": {
                    "TextFormat": {
                      "TextColor": "string",
                      "FontSizeInPt": 0,
                      "FontName": "string",
                      "Bold": true,
                      "Italic": true,
                      "TextAlign": "Left"
                    },
                    "Position": {
                      "PageNumber": 0,
                      "X": 0,
                      "Y": 0
                    },
                    "Size": {
                      "Width": 0,
                      "Height": 0
                    }
                  }
                }
              ],
GivenNameFields
Code Block
languagejava
themeEclipse
titleGivenNameFields
 "GivenNameFields": [
                {
                  "ElementId": "string",
                  "DocumentNumber": 0,
                  "FieldDefinition": {
                    "TextFormat": {
                      "TextColor": "string",
                      "FontSizeInPt": 0,
                      "FontName": "string",
                      "Bold": true,
                      "Italic": true,
                      "TextAlign": "Left"
                    },
                    "Position": {
                      "PageNumber": 0,
                      "X": 0,
                      "Y": 0
                    },
                    "Size": {
                      "Width": 0,
                      "Height": 0
                    }
                  }
                }
              ],
SurnameFields
Code Block
languagejava
themeEclipse
titleSurnameFields
"SurnameFields": [
                {
                  "ElementId": "string",
                  "DocumentNumber": 0,
                  "FieldDefinition": {
                    "TextFormat": {
                      "TextColor": "string",
                      "FontSizeInPt": 0,
                      "FontName": "string",
                      "Bold": true,
                      "Italic": true,
                      "TextAlign": "Left"
                    },
                    "Position": {
                      "PageNumber": 0,
                      "X": 0,
                      "Y": 0
                    },
                    "Size": {
                      "Width": 0,
                      "Height": 0
                    }
                  }
                }
              ],
FullNameFields
Code Block
languagejava
themeEclipse
titleFullNameFields
"FullNameFields": [
                {
                  "ElementId": "string",
                  "DocumentNumber": 0,
                  "FieldDefinition": {
                    "TextFormat": {
                      "TextColor": "string",
                      "FontSizeInPt": 0,
                      "FontName": "string",
                      "Bold": true,
                      "Italic": true,
                      "TextAlign": "Left"
                    },
                    "Position": {
                      "PageNumber": 0,
                      "X": 0,
                      "Y": 0
                    },
                    "Size": {
                      "Width": 0,
                      "Height": 0
                    }
                  }
                }
              ],
DataFields
Code Block
languagejava
themeEclipse
titleDataFields
 "DateFields": [
                {
                  "ElementId": "string",
                  "DocumentNumber": 0,
                  "DateFormat": "string",
                  "FieldDefinition": {
                    "TextFormat": {
                      "TextColor": "string",
                      "FontSizeInPt": 0,
                      "FontName": "string",
                      "Bold": true,
                      "Italic": true,
                      "TextAlign": "Left"
                    },
                    "Position": {
                      "PageNumber": 0,
                      "X": 0,
                      "Y": 0
                    },
                    "Size": {
                      "Width": 0,
                      "Height": 0
                    }
                  }
                }
              ]
            },

FinishActionConfiguration

Code Block
languagejava
themeEclipse
titleFinish action configuration
"FinishActionConfiguration": {
            "SignAnyWhereViewer": {
              "RedirectUri": "string"
            },
            "SignificantClientSignatureCaptureForIos": {
              "RemoveDocumentFromRecentDocumentList": true,
              "CallClientActionOnlyAfterSuccessfulSync": true,
              "CloseApp": true,
              "RedirectUri": "string"
            },
            "SignificantClientSignatureCaptureForAndroid": {
              "RemoveDocumentFromRecentDocumentList": true,
              "CallClientActionOnlyAfterSuccessfulSync": true,
              "CloseApp": true,
              "RedirectUri": "string"
            },
            "SignificantClientSignatureCaptureForWindows": {
              "RemoveDocumentFromRecentDocumentList": true,
              "CallClientActionOnlyAfterSuccessfulSync": true,
              "CloseApp": true,
              "RedirectUri": "string"
            },
            "KioskSdk": {
              "RedirectUri": "string"
            }
          },


Additional envelope information

Additionally to the envelope information you can find above in the section "envelope configuration" you can configure the following:

  • Email configuration
  • Reminder configuration
  • Expiration configuration
  • Callback configuration
  • Agreement configuration

Email configuration

Code Block
languagejava
themeEclipse
titleEmail configuration
 "EmailConfiguration": {
    "Subject": "string",
    "Body": "string",
    "SenderDisplayName": "string"
  },

Reminder configuration

Code Block
languagejava
themeEclipse
titleReminder configuration
 "ReminderConfiguration": {
    "Enabled": true,
    "FirstReminderInDays": 0,
    "ReminderResendIntervalInDays": 0,
    "BeforeExpirationInDays": 0
  },

Expiration configuration Image Added

Note: The following information is valid for envelopes as well as for drafts: Settings for the relative time:

  • Envelope expiry as relative time, provided in seconds (or milliseconds) after sending the envelope
  • Envelope expiry as relative time, in days after sending the envelope

Settings for the absolute time:

  • Envelope expiry as absolute time, as timestamp in GMT (with Z in the timestamp text) or optional with defined timezone

Please note the following: Defining no option will lead to usage of the default value of 28 days. Moreover, if you configure an absolute expiry time which is already in the past at time of sending the envelope, an error message will be returned. For the draft, it is required to have both options - store absolute or relative time. For the envelopes, only an absolute timestamp is required to be set and considered while being in progress.

Code Block
languagejava
themeEclipse
titleExpiration configuration
"ExpirationConfiguration": {
    "ExpirationInSeconds": 0,
    "ExpirationDate": "string"
  }

Callback configuration

Code Block
languagejava
themeEclipse
titleCallback configuration
 "CallbackConfiguration": {
    "CallbackUrl": "string",
    "StatusUpdateCallbackUrl": "string",
    "ActivityActionCallbackConfiguration": {
      "Url": "string",
      "ActionCallbackSelection": {
        "ConfirmTransactionCode": true,
        "DefaultEventType": true,
        "AgreementAccepted": true,
        "AgreementRejected": true,
        "RequestPrepareAuthenticationInformationSuccess": true,
        "PrepareAuthenticationSuccess": true,
        "AuthenticationFailed": true,
        "AuthenticationRejected": true,
        "AuthenticationSuccess": true,
        "ReAuthenticationFailed": true,
        "AuditTrailRequested": true,
        "AuditTrailXmlRequested": true,
        "CalledPage": true,
        "WhoIsInformation": true,
        "DocumentDownloaded": true,
        "FlattenedDocumentDownloaded": true,
        "AddedAnnotation": true,
        "AddedAttachment": true,
        "AppendedDocument": true,
        "FormsFilled": true,
        "ConfirmReading": true,
        "PageViewChanged": true,
        "SendTransactionCode": true,
        "PrepareSignWorkstepDocument": true,
        "SignWorkstepDocument": true,
        "UndoAction": true,
        "WorkstepCreated": true,
        "WorkstepFinished": true,
        "WorkstepRejected": true,
        "DisablePolicyAndValidityChecks": true,
        "EnablePolicyAndValidityChecks": true,
        "AppendFileToWorkstep": true,
        "AppendTasksToWorkstep": true,
        "SetOptionalDocumentState": true,
        "PreparePayloadForBatch": true
      }
    }
  },

Agreement configuration

Code Block
languagejava
themeEclipse
titleAgreement configuration
 "AgreementConfiguration": {
    "UseOrganizationAgreementSettings": true,
    "Translations": [
      {
        "LanguageCode": "AF",
        "Text": "string",
        "Header": "string",
        "IsDefault": true
      }
    ]
  }

Sending envelope

After you have added all form fields and signatures you can send the envelope to the recipients. Therefor, add the file Id you received from the file/upload call and add the configuration. Then you can send the envelope with the envelope/send call.