Print

TrustCenterSendToSignEx()

The TrustCenterSendToSignEx() function sends a document with a list of signers to AMODIT Trust Center. This function accepts PDF document or a list of PDF documents in a ZIP archive.

Syntax

TrustCenterSendToSignEx(actionObject);

Function arguments

  • actionObject – (Object) an action object argument contains the following fields/properties:
    • Document,
    • DocumentName,
    • DocumentDescription,
    • Language,
    • Creator,
    • SignerList,
    • RequireEmailCodeToOpenDocument,
    • RequireSMSCodeToOpenDocument,
    • AllowSimpleSignature,
    • AllowSMSSignature,
    • SequentialSigning,
    • AllowToAddNewSigners;

Description of each property:

  • actionObject.Creator – (Object) an object containing informations about a creator of sign request, these are: FirstName, LastName, Email, CreatorId;
  • actionObject.SignerList – (ObjectList) a list of signers required to sign the document, each signer should have the following properties:
    • FirstName,
    • LastName,
    • Email,
    • Phone.
    • Not required properties are:
      • Role – accepted values are: „SIGNER” (default), „INITIALER”, „OBSERVER”, „REPRESENTATIVE”),
      • Company,
      • CompanyRole,
      • SignOrder (number),
      • SignerExternalId (external ID of the person),
      • Password – a password to decrypt the signed document that is sent to the signer via email. If the password is not set, the document is sent unencrypted;
  • actionObject.Document – (File) a document to be signed. May be: name of the document, id of the document, field name from which document will be taken;
  • actionObject.Language – (String) [optional] a language culture for: emails, a signature card and UI language. If not provided, English is used by default. Correct language format is as follows: 'en-US’;
  • actionObject.RequireEmailCodeToOpenDocument – (Boolean) [optional] requires email code to open document;
  • actionObject.RequireSMSCodeToOpenDocument – (Boolean) [optional] requires SMS code to open document;
  • actionObject.AllowSimpleSignature – (Boolean) [optional] allows to make simple signature, no SMS code required;
  • actionObject.AllowSMSSignature – (Boolean) [optional] allows to make SMS signature;
  • actionObject.AllowHandwrittenSignature – (Boolean) [optional] allows to make handwritten signature;
  • actionObject.AllowHandwrittenSignatureWithSMS – (Boolean) [optional] allows to make handwritten signature with additional SMS code;
  • actionObject.AllowQualifiedSignature – (Boolean) [optional] allows to make qualified signature (deprecated);
  • actionObject.AllowIdCardSignature – (Boolean) [optional] allows to make signature using eDowód;
  • actionObject.AllowSimplySignSignature – (Boolean) [optional] allows to make signature using SimplySign;
  • actionObject.AllowToAddNewSigners – (Boolean) [optional] allows to add new users in Trust Center;
  • actionObject.AllowToReplaceSigners – (Boolean) [optional] allows to replace signers in Trust Center;
  • actionObject.AllowToEditSigners – (Boolean) [optional] allows to edit signers in Trust Center;
  • actionObject.ShowPhoneNumberInSignature – (Boolean) [optional] shows phone number on the signature card;
  • actionObject.PartialSigning – (Boolean) [optional] a partial signing allows to control signature process on Amodit side. Check desciptions of „TrustCenterAddNewSigners()” and „TrustCenterFinishSigning()” rule functions;
  • actionObject.SequentialSigning – (Boolean) [optional] turns on sequential signing which allows to set signatures in specified order; next signaure can be added if previous signer signed document. This option is not allowed when sending multiple documents in ZIP archive;
  • actionObject.SendingNotifications – (Decimal) [optional] if greater than zero then reminders are enabled and a reminder will be sent after specified number of days;
  • actionObject.SigningPeriod – (DateWithTime) [optional] if greater than current date then the document must be signed before that date. Otherwise signature process will be blocked;
  • actionObject.DocumentSigningLinkDelivery – (String) [optional] the option determines whether the document-signing-link should be sent directly to the signer (if the option is not set, by default) or not sent (any non-empty value is set) and then, for example, an external system can fetch links via TrustCenter API depending on the value of the option;
  • actionObject.AdditionalJsonData – (String) [optional] the option allows to store additional data in JSON format;
  • actionObject.RetentionDate – (DateNoTime) [optional] specifies a date after which PDF documents will be deleted from Trust Center;
  • actionObject.DisableCreatorEmails – (Boolean) [optional] disables all emails sent to document creator (sender);
  • actionObject.DisableFinishedSignatureEmails – (Boolean) [optional] disables emails sent after the signature process is finished;
  • actionObject.RejectedDocumentDescription – (String) [optional] sets description for rejected documents;
  • actionObject.CallbackRule – (String) [optional] a manual rule or function-type rule to be fired after certain actions like successfull signature.

Return value

This function returns NULL.
In case something went wrong, an exception would be  thrown. Please take a look at try and catch block instruction to handle exceptions.

Examples

Example 1

//main data, a document to be signed is stored in "Pdf file" document-type field
request.Document=[Pdf file];
request.DocumentName="Umowa nr 1234";
request.DocumentDescription="Umowa do podpisania";
request.Language="pl-PL";
// sending person
creator.FirstName="Jan"
creator.LastName="Kowalski"
creator.Email="jan.kowalski@gmail.com"
creator.CreatorId = 2
request.Creator = creator;
// a list of signers
signer1.FirstName="John";
signer1.LastName="Smith";
signer1.Email="john@smith.com";
signer1.Phone = 12343232;
signer1.Role="SIGNER";
signer2.FirstName="Anna";
signer2.LastName="Malinowska";
signer2.Email="a.malinowska@amodit.com";
signer2.Phone = 875019238;
signer2.Role="REPRESENTATIVE";
signerList = ""
AddObjectToList(signerList, signer1);
AddObjectToList(signerList, signer2);
request.SignerList = signerList;
// security options
request.RequireEmailCodeToOpenDocument=true;
request.RequireSMSCodeToOpenDocument=true;
// other options
request.AllowSimpleSignature=false;
request.AllowSMSSignature=true;
request.SequentialSigning=true;
request.AllowToAddNewSigners=false;
request.AllowHandWrittenSignature=false;
request.AllowHandWrittenSignatureWithSMS=true;
request.AllowQualifiedSignature=true;
request.AllowToReplaceSigners=true;
request.AllowIdCardSignature=false;
request.ShowPhoneNumberInSignature=false;
request.SendingNotyfications=5;
request.RetentionDate=DateAdd("day", CurrentDateTime(), 60);
request.DisableCreatorEmails=true;
request.SigningPeriod=DateAdd("day", CurrentDateTime(), 30);
// the function call
try
{
  result=TrustCenterSendToSignEx(request);
}
catch
{
  ShowMessage(1,exception)
}

 

Czy artykuł był pomocny?
0 na 5 gwiazdek
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
How Can We Improve This Article?