mailtodanish

how to know if document has tag

0 votes
Hi , We are sending a bunch of files to signer but only one or two doc is to be signed and rest documents are for information purposes. how to know id of documents those are signed. We have to keep only those files in our system those are signed and has signed tag. Thansk

Approved Answer

Reply to: how to know if document has tag

0 votes
Hi there, Try this code snippet below, where only requires one HTTP request and distinguishes whether a document is required to sign by retrieving the sigantrue collection size:
		DocumentPackage pkg = eslClient.getPackage(new PackageId("AGGDarePc_gIDVY6Zc5A70Jk8eM="));
		
		List documentIds = new ArrayList();
		
		if(pkg.getStatus() == PackageStatus.COMPLETED) {
			for (Document document : pkg.getDocuments()) {
				if(document.getSignatures().size() > 0) {
					documentIds.add(document.getId().getId());
				}
			}
		}
		
		for (String docId : documentIds) {
			System.out.println(docId);
		}
Hope this could help! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


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