check-the-status

Adobe Sign can return the current status of the agreement and a complete history of events that have happened on that particular agreement. Adobe Sign supports two mechanisms for your application to reflect the most current or up-to-date status for an agreement sent for signature. The simplest mechanism is for your application to provide a callback URL when sending the document for signature. Adobe Sign service will then ping your service whenever the status of the agreement changes. Upon receiving a callback, your application can then call Adobe Sign to get the latest status on the agreement.

To get the current status of an agreement, call getStatus() method of UserAgreement class:

//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");

//Make API call to get all the agreements of a user.    
UserAgreements userAgreements = agreementsApi.getAgreements(headers, null, null, null, null);

//Display details of each agreement.    
List userAgreementList = userAgreements.getUserAgreementList();    

for(UserAgreement userAgreement : userAgreementList) {      
    System.out.println("Agreement Name = " + userAgreement.getName());      
    System.out.println("Agreement Id = " + userAgreement.getAgreementId());      
    System.out.println("Agreement Status = " + userAgreement.getStatus());    
}

The mechanism to reflect the most current or up-to-date status of an agreement sent for signature is for your application to periodically poll Adobe Sign regarding the agreement’s status. The upside of polling is that it can be used in cases where your calling application is behind your firewall and not accessible from the Internet thus enabling Adobe Sign to complete a callback. The down side of polling is that you have to create a scheduling mechanism within your application to periodically query the status of all documents that were not yet signed, check whether the document’s status has changed, and update your system accordingly. If you choose to use polling, we recommend you have different policies based on document “age”. In other words, you would reduce the frequency of polling for documents not signed after X days.