Reply to: How to add Signer and Document in Existing Package.
Thursday, December 27, 2018 at 01:42am
0
votes
Hi there,
Please refer to this code snippet:
//step 1: create a package and create it with status of "DRAFT"
DocumentPackage newPackage = newPackageNamed("Create package + Add Signers and Docs")
.describedAs("xxxxxxx")
.build();
PackageId createPackage = eslClient.createPackage(newPackage);
System.out.println(createPackage);
//step 2: add signers
Signer signer1 = SignerBuilder.newSignerWithEmail("[email protected]")
.withFirstName("John")
.withLastName("Smith")
.withCustomId("Signer1")
.build();
Signer signer2 = SignerBuilder.newSignerWithEmail("[email protected]")
.withFirstName("Mary")
.withLastName("Doe")
.withCustomId("Signer2")
.build();
eslClient.getPackageService().addSigner(createPackage, signer1);
eslClient.getPackageService().addSigner(createPackage, signer2);
//step 3: add documents and use .withSignature() function or extraction methods to place signatures/fields
Document document1 = DocumentBuilder.newDocumentWithName("document1")
.fromFile(FILE_PATH)
.withId("document1")
.withDescription("Sample Document Description")
.build();
Document document2 = DocumentBuilder.newDocumentWithName("document2")
.fromFile(FILE_PATH2)
.withId("document2")
.withDescription("Sample Document Description")
.build();
eslClient.getPackageService().uploadDocuments(createPackage.getId(), Arrays.asList(document1,document2));
//step4: send package when it's ready
//eslClient.sendPackage(createPackage);
Which contains four steps:
step 1: create a package and create it with status of "DRAFT"
step 2: add signers
step 3: add documents and use .withSignature() function or extraction methods to place signatures/fields
step4: send package when it's ready
Hope this could help!
Duo
Because you are sending on behalf of your sender,
1. the sender has to be already invited to your account owner
2. and the sender email in the code needs to match with your sender's
Hope this could help!
Duo
Reply to: How to add Signer and Document in Existing Package.
Thursday, December 27, 2018 at 01:42amReply to: How to add Signer and Document in Existing Package.
Friday, December 28, 2018 at 09:47amReply to: How to add Signer and Document in Existing Package.
Friday, December 28, 2018 at 01:02pm