echoi | Posts: 2

Create Package with options

0 votes
Hi, I am translating SDK call to REST API. Attached is the code we use SDK call. I have difficult to find all options or parameter from the website documentation. Could you please provide some sample, how to construct the required payload? Regards, Eugene

echoi | Posts: 2

Reply to: Create Package with options

0 votes
I uploaded a txt file, but it said the file type is not permitted. So I paste the code here DocumentPackage documentPackage = newPackageNamed(dealId).withLanguage(getLanguage()) .withSigner(newSignerWithEmail(email).withCustomId(getSignerId()) .withFirstName(firstName) .withLastName(lastName)) .withDocument(newDocumentWithName(dealId).fromStream(new ByteArrayInputStream(documentPDF), DocumentType.PDF)// .fromFile("c:\\document.pdf") .withId(dealId) // use Deal Id as Document Id .withSignature(SignatureBuilder.captureFor(email) .withSize(180, 40) // // Convert from inches to pixels // = inch * 72 * 1.3 // .atPosition(210, 920) .onPage(0) .withField(FieldBuilder.signatureDate() .onPage(0) .withSize(176.69, 26.312) .atPosition(530, 934)))) .withSettings(DocumentPackageSettingsBuilder.newDocumentPackageSettings() .withoutLanguageDropDown() .withoutWatermark() .withoutDialogOnComplete() .withoutDocumentToolbarDownloadButton() .withoutCaptureText() .withCeremonyLayoutSettings(CeremonyLayoutSettingsBuilder.newCeremonyLayoutSettings() .withIFrame() .withoutTitle() .withoutProgressBar() .withoutSessionBar() .withoutBreadCrumbs() .withoutGlobalConfirmButton() .withoutGlobalDownloadButton() .withoutGlobalNavigation())) .build(); // // Issue the request to the e-SignLive server to create the DocumentPackage // PackageId pkgId = null; try { pkgId = eslClient.createPackage(documentPackage); } catch (EslException e) { } packageId = pkgId.toString(); // // Send the package to be signed by the participants // try { eslClient.sendPackage(pkgId); } catch (EslException e) { }

harishaidary | Posts: 1812

Reply to: Create Package with options

0 votes
Hey Eugene, You can definitely have a look at this blog for a step-by-step tutorial on how to create and send a package in the REST API. It includes the JSON payload format in order to create and send a package. Also, the setting part of the payload would look something like this:
"settings":{"ceremony":
{"inPerson":false,"declineButton":true,"disableInPersonAffidavit":false,"documentToolbarOptions":null,"handOver":null,
"hideCaptureText":false,"layout":{"brandingBar":null,"footer":null,"header":{"globalActions":{"confirm":true,"download":true,"saveAsLayout":true},"globalNavigation":true,"sessionBar":true,
"breadcrumbs":true,"feedback":true,"titleBar":{"progressBar":true,"title":true}},"navigator":true,
"iframe":false},"events":{"complete":{"redirect":null,"dialog":true}},"style":null,"hideWatermark":false,"maxAuthFailsAllowed":3,
"optOutButton":true,"optOutReasons":["Reason 1","Reason 2","No Reason"]}}

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off