Add participant to accept the document instead of signing
Friday, July 20, 2018 at 04:19amHi,
I am looking for some code snippet to add a participant to just "Accept" the document instead of signing.
Can anyone please give me some help?
Thanks,
KK
Reply to: Add participant to accept the document instead of signing
Friday, July 20, 2018 at 05:46amDocumentPackage pack = PackageBuilder.newPackageNamed("Example Consent Package") .withSigner(SignerBuilder.newSignerWithEmail("your signer email") .withFirstName("John") .withLastName("Smith") .withCustomId("signer1")) .withDocument(DocumentBuilder.newDocumentWithName("Sample consent") .fromFile("your file path") .withSignature(SignatureBuilder.acceptanceFor("your signer email"))) .build();Among them, the most important line is:SignatureBuilder.acceptanceFor("your signer email"). This is to create an approval without any fields which is equal to the request payload below:{ "documents":[ { "approvals":[ { "id":"Signature1", "role":"Role1", "name":"" }, { "id":"Signature2", "role":"Role2", "name":"" } ], "id":"sample-contract", "name":"Test Document" } ], "status":"SENT", "type":"PACKAGE", "roles":[ { "id":"Role1", "type":"SIGNER", "signers":[ { "email":"[email protected]", "firstName":"1.firstname", "lastName":"1.lastname" } ], "name":"Role1" }, { "id":"Role2", "type":"SIGNER", "signers":[ { "email":"[email protected]", "firstName":"2.firstname", "lastName":"2.lastname" } ], "name":"Role2" } ], "name":"Example Package" }Hope this could help you!