michailtouloupis | Posts: 40

Get Evidence Summary

0 votes

Hello,

 

I would like to get the Evidence Summary of a completed transaction in Java.

I have checked this https://community.onespan.com/documentation/secure-agreement-automation/guides/web-service-guide/developer/get-evidence but it was not very clear to me.

Could you please provide me an example of the correct syntax in Java, in order to get the Evidence Summary?

 

Thank you in advance,

Michail


Duo_Liang | Posts: 3776

Reply to: Get Evidence Summary

1 votes

Hi Michail,

 

Kindly consultant the "Checking Transaction Status & Downloading Documents" quick start guide or simply use below code:

    byte[] evidenceSummary = eslClient.downloadEvidenceSummary(packageId);

 

Duo
 


michailtouloupis | Posts: 40

Reply to:

0 votes

Hello Duo,

 

Thanks for your answer. I have tried this.

What I did is:
At the time I received the COMPLETE status of the transaction, I executed below piece of code to download the Evidence Summary.

byte[] byteArray = eslClient.getPackageService().downloadEvidenceSummary(documentPackage.getId());
        File dir = new File (tempFolder);
        if (!dir.exists()) {
            dir.mkdir();
        }
        String zipFilePath = tempFolder + File.separator + prospect.getProspectId() + ".zip";
        Files.saveTo(byteArray, zipFilePath);
        
        List<String> documentNames = unzipFile(zipFilePath, tempFolder);


        if (CollectionUtils.isNotEmpty(documentNames)) {
            for (String documentName : documentNames) {
                saveAndTransferDocumnetToServer(prospectESignTransaction, prospect, documentName + "_Evidence", tempFolder, null); //my method do save in the database and transfer to another server
            }
        }
        FileUtils.deleteQuietly(dir);

 

Unfortunately, the method "saveAndTransferDocumnetToServer" was not executed, probably because the Collection was empty.

Could it be that I tried to download the Evidence Summary too fast, after the COMPLETE status of the transaction was received? Do I need to wait some time?

What do you think?

 

Thanks and Regards,

Michail


Duo_Liang | Posts: 3776

Reply to: Get Evidence Summary

1 votes

Hi Michail,

 

You can download Evidence Summary at any time, even if the package hasn't been in COMPLETED status.

One thing I noticed that you were trying to unzip the downloaded byte array, while the response body is already in PDF.

There's another function "byte[] documentZip = eslClient.downloadZippedDocuments(packageId);" which downloads the zipped and signed documents, and works in tendam with the .downloadEvidenceSummary() function.

 

Duo


michailtouloupis | Posts: 40

Reply to: Get Evidence Summary

0 votes

Hello Duo,

 

Thanks for your answer. I succeeded to download the Evidence summary.

 

Best Regards,

Michail


michailtouloupis | Posts: 40

Reply to: Get Evidence Summary

0 votes

Hello Duo,

 

I would like to ask you one more thing.

As far as we know, the format pf the package id has changed in OneSpan since November 2018 (the new format of package id is ending with the equal sign "=").

If we try to retrieve an evidence file before November 2018 (with old format of package id), will it be possible? Or our request will be rejected?

 

Thanks and Regards,

Michail


Duo_Liang | Posts: 3776

Reply to: Get Evidence Summary

1 votes

Hello Michail,

 

As you may have experienced, the V10 transactions (which package ID is in format of UUID) has been moved to an offline DB and be hidden from API access. So it's expected the download API will reject and return an error. You can submit a support ticket ([email protected]) and the requests to download packages from V10 database will be handled on a case by case basis.

 

Duo


naresh_kota | Posts: 22

Reply to: Get Evidence Summary

0 votes

Duo_Liang

Hi

How do we ignore evidence summary from receiving it when status is moved completed?


Duo_Liang | Posts: 3776

Reply to:

0 votes

Hi Naresh,

 

The evidence summary won't be automatically downloaded upon package completed, so are you working on an existing integration that downloads both the evidence summary and signed documents? Or can you elaborate the question a little bit?

 

Duo

 


naresh_kota | Posts: 22

Reply to:

0 votes

we are sending a request to OSS (type: package and REST API). when the signing request is complete and download the documents from OSS, we see additional pdf "
Electronic Disclosures and Signatures Consent' along with the document (in pdf format) that we have passed to OSS when request initiated

 


Duo_Liang | Posts: 3776

Reply to:

0 votes

I see, this "Electronic Disclosures and Signatures Consent" is the default consent form your signer has signed. If you don't need the default consent at all, you can submit a request to support team ([email protected]) and turned it off at your account level. 

From downloading's perspective, OneSpan Sign doesn't really provide an API to exclude the default consent, so you may have to programmatically unzip the signed documents, remove it from memory, then compress the folder. However, if the default consent is not a part of your business process, to remove it is an easier solution.

 

Duo


Rakesh_Saini | Posts: 2

Reply to: Get Evidence Summary

0 votes

Hello Duo,

I want to know how to get document Id for Evidence Summary doc just like we get it for signed docs ?


Duo_Liang | Posts: 3776

Reply to: Get Evidence Summary

1 votes

Hi Rakesh_Saini,

 

Evidence summary actually doesn't have a document ID and instead, you'd use this API to download it:

GET /api/packages/{packageId}/evidence/summary

 

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