We have a user that would like to download all signed documents for the past week under his account. Would anyone have a sample code on how to do that?
Thanks,
Reply to: Download signed documents with a date range
Thursday, April 28, 2016 at 04:50am
0
votes
Hey,
Here's an example code on how you would download signed documents within a date range:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using Silanis.ESL.SDK;
using Silanis.ESL.SDK.Builder;
using System.Diagnostics;
using System.IO;
namespace DownloadDocumentsDateRange
{
class DownloadDocuments
{
//replace apiKey placeholder with your own value
private static String apiUrl = "https://sandbox.e-signlive.com/api";
private static String apiKey = "your_api_key";
public static void Main(string[] args)
{
EslClient eslClient = new EslClient(apiKey, apiUrl);
//starting point to retrieve completed packages
int index = 1;
//Retrieve first 50 completed packages. Packages are returned as a page from eSignLive.
Page completed_packages = eslClient.PackageService.GetUpdatedPackagesWithinDateRange(DocumentPackageStatus.COMPLETED, new PageRequest(index, 50), DateTime.Today.AddDays(-7), DateTime.Now);
while (index
Let me know if anything is unclear :)
Reply to: Download signed documents with a date range
Thursday, April 28, 2016 at 04:50am