...
One action can either include one of the following tasks:
- Automatic signing
- Signing
- Document viewing
- P7M signing Document viewing
- P7M signing
- Signing
Automatic signing
Please see the following sample for an automatic signing action:
Code Block |
---|
|
{
"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#\n\n#PersonalMessage#\n\nPlease sign the envelope #EnvelopeName#\n\nEnvelope 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 |
---|
|
{
"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#\n\n#PersonalMessage#\n\nPlease sign the envelope #EnvelopeName#\n\nEnvelope 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 |
---|
|
{
"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.
...
- Recipient configuration
- 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 |
---|
language | java |
---|
theme | Eclipse |
---|
title | Recipient configuration |
---|
|
"RecipientConfiguration": {
"ContactInformation": {
"Email": "string",
"GivenName": "string",
"Surname": "string",
"PhoneNumber": "string",
"LanguageCode": "AF"
}, |
Personal message
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
title | Personal message |
---|
|
"PersonalMessage": "string",
|
Authentication
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
title | Authentication |
---|
|
"AuthenticationConfiguration": { |
Within this section you can place the different authentication methods:
Access code
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
title | Access code |
---|
|
"AccessCode": {
"Code": "string"
}, |
SMS-OTP
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
title | SMS-OTP |
---|
|
"SmsOneTimePassword": {
"PhoneNumber": "string"
}, |
Swedish Bank Id
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
title | Swedish Bank Id |
---|
|
"SwedishBankId": {
"PersonalNumber": "string",
"AllowAnyPersonalNumber": true
}, |
OAuth2
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
title | OAuth2 |
---|
|
"OAuthAuthentications": [
{
"ProviderName": "string",
"Validations": [
{
"FieldReferenceId": "string",
"ExpectedValue": "string"
}
]
}
], |
SAML
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
title | SAML |
---|
|
"SamlAuthentications": [
{
"ProviderName": "string",
"Validations": [
{
"FieldReferenceId": "string",
"ExpectedValue": "string"
}
]
}
] |
...