dlukic | Posts: 46

Adding documents to a package - custom application

0 votes
I couldn’t find a method to add documents to package in draft mode. It seems UpdatePackage updates everything but documents. Is there a method to add documents in the package once it been created? If there is such method in your SDK please point me and I will take a look there.

Approved Answer
mwilliams | Posts: 957

Reply to: Adding documents to a package - custom application

0 votes
Definitely. This is actually done from your eSignLive client like:
EslClient eslClient = new EslClient(apiKey, apiUrl);
PackageId packageId = new PackageId("String_PackageId");
DocumentPackage myPackage = eslClient.GetPackage(packageId);
Document mydoc = DocumentBuilder.NewDocumentNamed("mydoc").FromFile("C:/Path_To_File/sampleAgreement.pdf").Build();
eslClient.UploadDocument(mydoc, myPackage);
Hope this helps.

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