Guides

Get Signature Request Files

Obtain a copy of the current documents specified by the signature_request_id parameter

Class: HelloSign.SignatureRequestService

Return type: Object

Method

Name
getFiles()

Acceptable Parameters

NameTypeRequiredNote
signature_request_idString
file_typeStringSet to "pdf" for a single merged document or "zip" for a collection of individual documents.
get_urlBooleanIf true, the response will contain a url link to the file instead. Links are only available for PDFs and have a TTL of 3 days.
get_data_uriBooleanIf true, the response will contain the file as base64 encoded string. Base64 encoding is only available for PDFs.
isLastCalloutBoolean
String sigReqId = [ SELECT HelloSign__Signature_Request_ID__c FROM HelloSign__HelloSign_Signature_Request__c WHERE Id = 'a063F00000GGTQ7QAP'].HelloSign__Signature_Request_ID__c; HelloSign.SignatureRequestService sigReq = new HelloSign.SignatureRequestService(sigReqId); // Get PDF or ZIP as Blob //sigReq.file_type = 'pdf'; //sigReq.file_type = 'zip'; Blob file = (Blob) sigReq.getFiles(); // Get URL link sigReq.get_url = true; HelloSign.ServiceObjects.FileUrl hsFileUrl = (HelloSign.ServiceObjects.FileUrl) sigReq.getFiles(); System.debug(hsFileUrl.file_url); System.debug(hsFileUrl.expires_at); // Get base64 encoded string sigReq.get_data_uri = true; String encodedFile = (String) sigReq.getFiles();