OliverH | Posts: 28

Retrieve Completion List Limitation

0 votes
Hi team, I just found out that CompletionReport sdkCompletionReport = eslClient.getReportService().downloadCompletionReport(PackageStatus.DRAFT, from, to); only returns 100 results, so it's less meaningful in our process. Is there any way to get the complete list of packages of all senders within time range? Thanks,

ahoytodd | Posts: 23

Reply to: Retrieve Completion List Limitation

0 votes
Let me know if you find a way. We need this too.

Duo_Liang | Posts: 3776

Reply to: Retrieve Completion List Limitation

0 votes
Hi guys, "The limitation of return 100 results" exists on all GET requests querying list from OneSpan Sign, it's due to the internal workings of OSS. In future, there'll be a new report API returning summary data of more than 100 results, which will be the best solution to this post. While for the time being, you could use the following two solutions to work it around: #1. You can ask for a Transaction Report from our support team ([email protected]) monthly or weekly. We will email a csv file to you and you'd manually put the file in a specific path. Then a watcher program monitoring the file change or simply a batch script will work on this case, you can fetch data and deal with it as you see fit. #2. You can retrieve the entire package list instead of completion list, which carries more information but works on this case, see the sample code in Java SDK below:
	private List getPackagesByPackageStatus(PackageStatus packageStatus, Date startDate,
			Date endDate) {
		List allResult = new ArrayList>();
		
		int pageNum = 1;
		int pageSize = 100;
		Page pageResult;
		do {
			pageResult = eslClient.getPackageService().getUpdatedPackagesWithinDateRange(packageStatus,
					new PageRequest(pageNum, pageSize), startDate, endDate);
			allResult.addAll(pageResult.getResults());
			pageNum += pageSize;
		} while (pageResult.hasNextPage());
		return allResult;
	}
Hope this could help! Duo

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