Account


Earned badges

Achievement: Latest Unlocked

Topic Started

This user has not created any forum posts.

Replies Created

Reply to: How to update package status to expired

0 votes
Hi Alan, Yes it definitely possible to set the package status to EXPIRED. The first thing you need to do is retrieve your document package. Once you have it, you can manually set the status to EXPIRED and update the package using the eSignLive client. The sample code below shows you how its done:
class setToExpire
    {
        private static String apiUrl = "https://sandbox.esignlive.com/api";
        // USE https://apps.e-signlive.com/api FOR PRODUCTION
        private static String apiKey = "your_api_key";

        public static void Main(string[] args)
        {
            EslClient eslClient = new EslClient(apiKey, apiUrl);
            PackageId packageId = new PackageId("03be60f0-276d-4911-9273-291d36eca4f0");
            DocumentPackage myPackage = eslClient.GetPackage(packageId);
            myPackage.Status = DocumentPackageStatus.EXPIRED;
            eslClient.UpdatePackage(packageId, myPackage);
        }
    }
Let me know if you run into any issues.

0 votes
Hi Maddy, Below you will find a sample code on how to create and send a package with multiple documents with REST in Java. From the link you provided, only a few extra lines of code are needed.
package com.esignlive.example;
 
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.nio.file.Files;
 
public class createWithMultipleDocumentsREST {
      
     
    public static void main(String[] args) throws MalformedURLException, IOException {
         
        String requestURL = "https://sandbox.esignlive.com/api";
        String apiKey = "your_api_key";
        String charset = "UTF-8";
        File uploadFile1 = new File("DOCUMENT_FILE_PATH"); //first pdf
        File uploadFile2 = new File("DOCUMENT_FILE_PATH"); //second pdf
        String boundary = Long.toHexString(System.currentTimeMillis()); // Generate a random value for the form boundary
        String CRLF = "\r\n"; // Line separator used in multipart/form-data.
        String jsonContent = "{ \"roles\":[ { \"locked\":false, \"emailMessage\": { \"content\":\"\" }, \"attachmentRequirements\":[], \"reassign\":false, \"specialTypes\":[], \"id\":\"Sender\", \"data\":null, \"type\":\"SIGNER\", \"index\":0, \"signers\":[ { \"auth\": { \"challenges\":[], \"scheme\":\"NONE\" }, \"company\":\"Silanis\", \"firstName\":\"YOUR_FIRST_NAME\", \"lastName\":\"YOUR_LAST_NAME\", \"phone\":\"\", \"email\":\"[email protected]\", \"knowledgeBasedAuthentication\":null, \"language\":\"en\", \"title\":\"\", \"external\":null, \"professionalIdentityFields\":[], \"userCustomFields\":[], \"delivery\": { \"email\":true, \"provider\":false, \"download\":true }, \"group\":null, \"signature\":null, \"address\":null, \"data\":null, \"name\":\"\", \"specialTypes\":[] }], \"name\":\"Sender\" }, { \"locked\":false, \"emailMessage\": { \"content\":\"\" }, \"attachmentRequirements\":[], \"reassign\":false, \"specialTypes\":[], \"id\":\"Signer\", \"data\":null, \"type\":\"SIGNER\", \"index\":0, \"signers\":[ { \"auth\": { \"challenges\":[], \"scheme\":\"NONE\" }, \"company\":\"\", \"firstName\":\"SIGNER_FIRST_NAME\", \"lastName\":\"SIGNER_LAST_NAME\", \"phone\":\"\", \"email\":\"[email protected]\", \"knowledgeBasedAuthentication\":null, \"language\":\"en\", \"title\":\"\", \"external\":null, \"professionalIdentityFields\":[], \"userCustomFields\":[], \"delivery\": { \"email\":false, \"provider\":false, \"download\":false }, \"group\":null, \"id\":\"Signer\", \"signature\":null, \"address\":null, \"data\":null, \"name\":\"\", \"specialTypes\":[] }], \"name\":\"Signer\" }], \"documents\":[ { \"approvals\":[ { \"role\":\"Signer\", \"signed\":null, \"accepted\":null, \"data\":null, \"fields\":[ { \"page\":0, \"subtype\":\"FULLNAME\", \"width\":200, \"binding\":null, \"extract\":false, \"extractAnchor\":null, \"left\":175, \"top\":165, \"validation\":null, \"height\":50, \"data\":null, \"type\":\"SIGNATURE\", \"value\":\"\" }], \"name\":\"\" }, { \"role\":\"Sender\", \"signed\":null, \"accepted\":null, \"data\":null, \"fields\":[ { \"page\":0, \"subtype\":\"FULLNAME\", \"width\":200, \"binding\":null, \"extract\":false, \"extractAnchor\":null, \"left\":550, \"top\":165, \"validation\":null, \"height\":50, \"data\":null, \"type\":\"SIGNATURE\", \"value\":\"\" }], \"name\":\"\" }], \"name\": \"sampleAgreement\" }, { \"approvals\":[ { \"role\":\"Signer\", \"signed\":null, \"accepted\":null, \"data\":null, \"fields\":[ { \"page\":0, \"subtype\":\"FULLNAME\", \"width\":200, \"binding\":null, \"extract\":false, \"extractAnchor\":null, \"left\":175, \"top\":165, \"validation\":null, \"height\":50, \"data\":null, \"type\":\"SIGNATURE\", \"value\":\"\" }], \"name\":\"\" }, { \"role\":\"Sender\", \"signed\":null, \"accepted\":null, \"data\":null, \"fields\":[ { \"page\":0, \"subtype\":\"FULLNAME\", \"width\":200, \"binding\":null, \"extract\":false, \"extractAnchor\":null, \"left\":550, \"top\":165, \"validation\":null, \"height\":50, \"data\":null, \"type\":\"SIGNATURE\", \"value\":\"\" }], \"name\":\"\" }], \"name\": \"myDocument\" }], \"name\": \"Test Package REST\", \"type\":\"PACKAGE\", \"language\":\"en\", \"emailMessage\":\"\", \"description\":\"New Package\", \"autoComplete\":true, \"status\":\"SENT\" }";
        
        URLConnection connection = new URL(requestURL + "/packages/").openConnection();
        connection.setDoOutput(true);
        connection.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
        connection.setRequestProperty("Authorization", "Basic " + apiKey);
        connection.setRequestProperty("Accept", "application/json");
        OutputStream output = connection.getOutputStream();
        PrintWriter writer = new PrintWriter(new OutputStreamWriter(output, charset), true);
        
        try  {
 
             // Add first pdf file.
             writer.append("--" + boundary).append(CRLF);
             writer.append("Content-Disposition: form-data; name=\"file\"; filename=\"" + uploadFile1.getName() + "\"").append(CRLF);
             writer.append("Content-Type: " + URLConnection.guessContentTypeFromName(uploadFile1.getName())).append(CRLF);
             writer.append("Content-Transfer-Encoding: application/pdf").append(CRLF);
             writer.append(CRLF).flush();
             Files.copy(uploadFile1.toPath(), output);
             output.flush();
             writer.append(CRLF).flush();
             
             // Add second file.
             writer.append("--" + boundary).append(CRLF);
             writer.append("Content-Disposition: form-data; name=\"file\"; filename=\"" + uploadFile2.getName() + "\"").append(CRLF);
             writer.append("Content-Type: " + URLConnection.guessContentTypeFromName(uploadFile2.getName())).append(CRLF);
             writer.append("Content-Transfer-Encoding: application/pdf").append(CRLF);
             writer.append(CRLF).flush();
             Files.copy(uploadFile2.toPath(), output);
             output.flush();
             writer.append(CRLF).flush();
            
             
             // add json payload
             writer.append("--" + boundary).append(CRLF);
             writer.append("Content-Disposition: form-data; name=\"payload\"").append(CRLF);
             writer.append("Content-Type: application/json; charset=" + charset).append(CRLF);
             writer.append(CRLF).append(jsonContent).append(CRLF).flush();
             
             // End of multipart/form-data.
             writer.append("--" + boundary + "--").append(CRLF).flush();
             
        }
        catch (IOException ex) {
            System.err.println(ex);
        }
 
        //get and write out response code
        int responseCode = ((HttpURLConnection) connection).getResponseCode();
        System.out.println(responseCode);
        
        //get and write out response
        BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
	    String inputLine;
	    StringBuffer response = new StringBuffer();
	     
	    while ((inputLine = in.readLine()) != null) {
	         response.append(inputLine);
	    }
	        in.close();
	      
	    //print result
	    System.out.println(response.toString());
    }
}
As for JSON payload, you only need to modify the "documents" property:
\"documents\":[
        		{
        			\"approvals\":[
        			{
        				\"role\":\"Signer\",
        				\"signed\":null,
        				\"accepted\":null,
        				\"data\":null,
        				\"fields\":[
        				{
        					\"page\":0,
        					\"subtype\":\"FULLNAME\",
        					\"width\":200,
        					\"binding\":null,
        					\"extract\":false,
        					\"extractAnchor\":null,
        					\"left\":175,
        					\"top\":165,
        					\"validation\":null,
        					\"height\":50,
        					\"data\":null,
        					\"type\":\"SIGNATURE\",
        					\"value\":\"\"
        				}],
        				\"name\":\"\"
        			},
        			{
        				\"role\":\"Sender\",
        				\"signed\":null,
        				\"accepted\":null,
        				\"data\":null,
        				\"fields\":[
        				{
        					\"page\":0,
        					\"subtype\":\"FULLNAME\",
        					\"width\":200,
        					\"binding\":null,
        					\"extract\":false,
        					\"extractAnchor\":null,
        					\"left\":550,
        					\"top\":165,
        					\"validation\":null,
        					\"height\":50,
        					\"data\":null,
        					\"type\":\"SIGNATURE\",
        					\"value\":\"\"
        				}],
        				\"name\":\"\"
        			}],
        			\"name\": \"sampleAgreement\"
        		},
        		{
        			\"approvals\":[
        			{
        				\"role\":\"Signer\",
        				\"signed\":null,
        				\"accepted\":null,
        				\"data\":null,
        				\"fields\":[
        				{
        					\"page\":0,
        					\"subtype\":\"FULLNAME\",
        					\"width\":200,
        					\"binding\":null,
        					\"extract\":false,
        					\"extractAnchor\":null,
        					\"left\":175,
        					\"top\":165,
        					\"validation\":null,
        					\"height\":50,
        					\"data\":null,
        					\"type\":\"SIGNATURE\",
        					\"value\":\"\"
        				}],
        				\"name\":\"\"
        			},
        			{
        				\"role\":\"Sender\",
        				\"signed\":null,
        				\"accepted\":null,
        				\"data\":null,
        				\"fields\":[
        				{
        					\"page\":0,
        					\"subtype\":\"FULLNAME\",
        					\"width\":200,
        					\"binding\":null,
        					\"extract\":false,
        					\"extractAnchor\":null,
        					\"left\":550,
        					\"top\":165,
        					\"validation\":null,
        					\"height\":50,
        					\"data\":null,
        					\"type\":\"SIGNATURE\",
        					\"value\":\"\"
        				}],
        				\"name\":\"\"
        			}],
        			\"name\": \"myDocument\"
        		}]

0 votes
Hey Madhavi, Unfortunately, in-person signing is on an account level. Therefore, you can't set in-person signing to a specific signer. With regards to "mapping" signers to different documents, the JSON would look something like this:
"{
        		\"roles\":[
        		{
        			\"locked\":false,
        			\"emailMessage\":
        			{
        				\"content\":\"\"
        			},
        			\"attachmentRequirements\":[],
        			\"reassign\":false,
        			\"specialTypes\":[],
        			\"id\":\"Signer1\",
        			\"data\":null,
        			\"type\":\"SIGNER\",
        			\"index\":0,
        			\"signers\":[
        			{
        				\"auth\":
        				{
        					\"challenges\":[],
        					\"scheme\":\"NONE\"
        				},
        				\"company\":\"\",
        				\"firstName\":\"John\",
        				\"lastName\":\"Doe\",
        				\"phone\":\"\",
        				\"email\":\"[email protected]\",
        				\"knowledgeBasedAuthentication\":null,
        				\"language\":\"en\",
        				\"title\":\"\",
        				\"external\":null,
        				\"professionalIdentityFields\":[],
        				\"userCustomFields\":[],
        				\"delivery\":
        				{
        					\"email\":true,
        					\"provider\":false,
        					\"download\":true
        				},
        				\"group\":null,
        				\"signature\":null,
        				\"address\":null,
        				\"data\":null,
        				\"name\":\"\",
        				\"specialTypes\":[]
        			}],
        			\"name\":\"\"
        		},
        		{
        			\"locked\":false,
        			\"emailMessage\":
        			{
        				\"content\":\"\"
        			},
        			\"attachmentRequirements\":[],
        			\"reassign\":false,
        			\"specialTypes\":[],
        			\"id\":\"Signer2\",
        			\"data\":null,
        			\"type\":\"SIGNER\",
        			\"index\":0,
        			\"signers\":[
        			{
        				\"auth\":
        				{
        					\"challenges\":[],
        					\"scheme\":\"NONE\"
        				},
        				\"company\":\"\",
        				\"firstName\":\"Mary\",
        				\"lastName\":\"Doe\",
        				\"phone\":\"\",
        				\"email\":\"[email protected]\",
        				\"knowledgeBasedAuthentication\":null,
        				\"language\":\"en\",
        				\"title\":\"\",
        				\"external\":null,
        				\"professionalIdentityFields\":[],
        				\"userCustomFields\":[],
        				\"delivery\":
        				{
        					\"email\":false,
        					\"provider\":false,
        					\"download\":false
        				},
        				\"group\":null,
        				\"id\":\"Signer\",
        				\"signature\":null,
        				\"address\":null,
        				\"data\":null,
        				\"name\":\"\",
        				\"specialTypes\":[]
        			}],
        			\"name\":\"\"
        		}],
        		\"documents\":[
        		{
        			\"approvals\":[
        			{
        				\"role\":\"Signer1\",
        				\"signed\":null,
        				\"accepted\":null,
        				\"data\":null,
        				\"fields\":[
        				{
        					\"page\":0,
        					\"subtype\":\"FULLNAME\",
        					\"width\":200,
        					\"binding\":null,
        					\"extract\":false,
        					\"extractAnchor\":null,
        					\"left\":175,
        					\"top\":165,
        					\"validation\":null,
        					\"height\":50,
        					\"data\":null,
        					\"type\":\"SIGNATURE\",
        					\"value\":\"\"
        				}],
        				\"name\":\"\"
        			}],
        			\"name\": \"sampleAgreement\"
        		},
        		{
        			\"approvals\":[
        			{
        				\"role\":\"Signer2\",
        				\"signed\":null,
        				\"accepted\":null,
        				\"data\":null,
        				\"fields\":[
        				{
        					\"page\":0,
        					\"subtype\":\"FULLNAME\",
        					\"width\":200,
        					\"binding\":null,
        					\"extract\":false,
        					\"extractAnchor\":null,
        					\"left\":175,
        					\"top\":165,
        					\"validation\":null,
        					\"height\":50,
        					\"data\":null,
        					\"type\":\"SIGNATURE\",
        					\"value\":\"\"
        				}],
        				\"name\":\"\"
        			}],
        			\"name\": \"myDocument\"
        		}],
        		\"name\": \"Test Package REST\",
        		\"type\":\"PACKAGE\",
        		\"language\":\"en\",
        		\"emailMessage\":\"\",
        		\"description\":\"New Package\",
        		\"autoComplete\":true,
        		\"status\":\"SENT\"
        	}"
In this case, John Doe's signature is required for the "sampleAgreement" document and Mary Doe's signature is required for the "myDocument" document. Hope this helps. Let me know if you run into any issues.

Subscriptions

Topics Replies Freshness Views Users
I'm referencing the custom signing ceremony settings, in an attempt to customize the Thank You dialog content.
1 5 years 11 months ago 15
Profile picture for user harishaidary
Hi, One of our testers performed below use case: a) Signed the document using eSignLive b) The digital signatures were captured in the signature block c) Downloaded the signed copy from eSignLive &am
3 5 years 11 months ago 479
Profile picture for user harishaidary
When we have a package that has two signers and one signer has completed signing and the other is still pending, when we perform a check status, we are getting the following error. Could not get sign
3 5 years 11 months ago 121
Profile picture for user harishaidary
I am also finding it difficult to set the correct href. When I use the example 'www.google.com' when the button is clicked it has a query string attached.
9 5 years 11 months ago 119
Profile picture for user harishaidary
Profile picture for user mwilliams
I hear from Account Reps at my Company that DocuSign has a feature that sends them an Email if the Signer has opened the Email sent to them by DocuSign.
1 6 years ago 104
Profile picture for user harishaidary

Code Share

Example code to request a SMS authentication challenge to a signer.
  • Java
  • SMS
  • authentication
  • Java SDK
23 views
12 downloads
Example code to request Q&A and SMS authentication. 
  • REST
  • SMS
  • authentication
  • q&a
183 views
56 downloads

Create a Template (REST API)

Submitted on
Example JSON payload to create a template.
  • REST
  • signer
  • template
  • placeholder
  • create
147 views
56 downloads
Example code to get the application version of the SDK.
  • Java
  • application
  • version
  • Java SDK
9 views
2 downloads

Contacts Example (Java SDK)

Submitted on
Example code to retrieve your contacts.
  • Java
  • eSignLive
  • Java SDK
  • contacts
12 views
1 downloads

Subscriptions Release Notes

This user is not subscribed to any release notes.