send-reminders

A signing reminder can be sent to all the pending signers if they have not signed the agreement. When you send a reminder, the signers will get the same notification email that was originally sent.

You can send reminders to all the active participants of an agreement, if any of them is taking too long to sign:

//Populate the headers
//Note that MultivaluedMap is part of javax.ws.rs.core package
//Note that MultivaluedMapImpl is part of com.sun.jersey.core.util package
MultivaluedMap headers = new MultivaluedMapImpl(); 
String ACCESS_TOKEN_KEY= "Access-Token";  
String X_API_USER_KEY = "x-api-user";    
headers.put(ACCESS_TOKEN_KEY, "hajUhhsNottheRealTokenjKh");    
headers.put(X_API_USER_KEY, "me@mycomp.com");

//Get the list of participants    
AgreementInfo agreementInfo = agreementsApi.getAgreementInfo(headers, agreementId);        

//Information about who needs to act next for this document.
//For example, if the agreement is in     
//status OUT_FOR_SIGNATURE or OUT_FOR_APPROVAL, this will be the next signer or approver.     
//If the AgreementStatus is a terminal state, this array is empty.    
List nextParticipantSetInfoList = agreementInfo.getNextParticipantSetInfos();        

//For each next/active participant, check if her waiting time 
//exceeds the limit and if so send a reminder.    
//Get the current system date.    
Date now = new Date();    
for (NextParticipantSetInfo nextParticipantSetInfo : nextParticipantSetInfoList) {    
    //Get the first participant from the next participant set.    
    NextParticipantInfo nextParticipant = nextParticipantSetInfo.getNextParticipantSetMemberInfos().get(0);    
    
    //Check how long this participant has been next in line but idle.    
    Date waitingSince = nextParticipant.getWaitingSince();    
    
    //Check if waiting time exceeds 7 days   
    boolean timeExceeded = ((now.getTime() - waitingSince.getTime()) >= (7*24*60*60*10000));     
    if (timeExceeded) {
       // Time limit exceeded. Send a reminder to all active participants of the agreement. 
       ReminderCreationInfo reminderCreationInfo = new ReminderCreationInfo();      
       reminderCreationInfo.setAgreementId(agreementId);      

       ReminderCreationResult reminderCreationResult = remindersApi.createReminder(headers, reminderCreationInfo);       
        
       //Display agreement name and result of the operation.       
       System.out.println("Sent a reminder to the next participant to sign the agreement '" + agreementInfo.getName()+ "'. Result: " + reminderCreationResult.getResult() + ".");            
     }    
}