Difference between createPackage & createPackageOneStep
Thursday, October 11, 2018 at 06:34amHi,
We are new to esignlive, and developing with JAVA. After going through few guidances, I found when creating a package, some code using
PackageId packageId = eslClient.createPackageOneStep(documentPackage);
and some code using
PackageId packageId = eslClient.createPackage(documentPackage);
My question here is, what's the difference between them? Why you have two methods with same function?
Thanks in advance
Reply to: Difference between createPackage & createPackageOneStep
Thursday, October 11, 2018 at 08:45amcreatePackage
function, SDK will use separate REST calls to create package first and then upload documents and their metadata. While increatePackageOneStep
function, SDK will create package with all documents in one shoot. You can consider using createPackage() in the following scenarios: (1) when want to add signatures for your sender/owner while you didn't manually assign your sender/owner as a signer with the function.withSigner()
(2)when you want to first create a package without documents and then gradually upload documents to your package. The rest situations when you have your DocumentPackage object fully baked with Document Info, it's suggested to use createPackageOneStep() function in order to reduce the number of API calls. Hope this could help you! Duo