Downloading Documents

Any documents uploaded during the creation of a document package can be downloaded at any given time.

After completion of the transaction, ValidSign will keep the transaction available for 90 days. Make sure you archive your Signed Documents and Evidence Summary before the deletion date. Use our Archive Module to archive your transactions easily. 

Downloading Documents

Downloading Documents

The DownloadDocument() call can be called both before and after the package's completion. If called before, the documents will be flattened, removing all pending signatures and fields.

GET /api/packages/{packageId}/documents/{documentId}/pdf
FileOutputStream stream1 = new FileOutputStream("your_storage_path/signed_document.pdf");

// Retrieve the bytes of the document (with fields)
byte[] pdfDocumentBytes = eslClient.downloadDocument(packageId, documentId);
	    
try{
    stream1.write(pdfDocumentBytes);
} finally {
    stream1.close();
}
// Retrieve the bytes of the document (with fields)
byte[] pdfDocumentBytes = eslClient.DownloadDocument(packageId, documentId);
File.WriteAllBytes("your_storage_path/signed_document.pdf", pdfDocumentBytes);
Downloading the Original Documents

The DownloadOriginalDocument() call can be called both before and after the package's completion. It retrieves the original document that was uploaded by the sender, without any signatures and fields.

GET /api/packages/{packageId}/documents/{documentId}/original
FileOutputStream stream2 = new FileOutputStream("your_storage_path/original_document.pdf");

// Retrieve the bytes of the original document (without fields)
byte[] originalPdfDocumentBytes = eslClient.downloadOriginalDocument(packageId, documentId);
	    
try{
    stream2.write(originalPdfDocumentBytes);
} finally {
    stream2.close();
}
// Retrieve the bytes of the original document (without fields)
byte[] originalPdfDocumentBytes = eslClient.DownloadOriginalDocument(packageId, documentId);
File.WriteAllBytes("your_storage_path/original_document.pdf", originalPdfDocumentBytes);
Downloading Signed Documents

The DownloadZippedDocuments() call can only be called after all signing has been completed. Once called, the method will deliver an archive containing all signed documents.

GET /api/packages/{packageId}/documents/zip
FileOutputStream stream3 = new FileOutputStream("your_storage_path/signed_documents.zip");

// Retrieve the bytes of the zipped file containing all the documents in the package
byte[] zippedDocumentsBytes = eslClient.downloadZippedDocuments(packageId);
	    
try{
    stream3.write(zippedDocumentsBytes);
} finally {
    stream3.close();
}
// Retrieve the bytes of the zipped file containing all the documents in the package
byte[] zippedDocumentsBytes = eslClient.DownloadZippedDocuments(packageId);
File.WriteAllBytes("your_storage_path/signed_documents.zip", zippedDocumentsBytes);
Downloading the Evidence Summary

The DownloadEvidenceSummary() call can be called both before and after the package's completion. It retrieves the current audit trail activity for the package.

GET /api/packages/{packageId}/evidence/summary
FileOutputStream stream4 = new FileOutputStream("your_storage_path/evidence_summary.pdf");

//Retrieve the bytes of the evidence summary
byte[] evidenceBytes = eslClient.downloadEvidenceSummary(packageId);
	    
try{
    stream4.write(evidenceBytes);
} finally {
    stream4.close();
}
//Retrieve the bytes of the evidence summary
byte[] evidenceBytes = eslClient.PackageService.DownloadEvidenceSummary(packageId);
File.WriteAllBytes("your_storage_path/evidence_summary.pdf", evidenceBytes);