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:

//Set the context        
var context = new AdobeSignSdk.Context();        

//Initialize the Agreements API        
var agreementsApi = new AdobeSignSdk.AgreementsApi(context);        

var headerParams = {"accessToken": "3AANOTTHEREALTOKENpd"};        

//Invoke the API
agreementsApi.getAgreements(headerParams)                
             .then(function (userAgreements) {                    
                    var userAgreementList = userAgreements.getUserAgreementList();
                    
                    //Find the signing status of the agreement                  
                    for (var i = 0; i < userAgreementList.length; i++) {                        
                        var userAgreement = userAgreementList[i];                        
                        console.log(userAgreement.getName()); 
                        console.log(userAgreement.getAgreementId()); 
                        console.log(userAgreement.getStatus()); 
                    }                
             })                
             .catch(function (apiError) {                    
                    console.log(apiError);                
             });

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.