Skip to main content

Continuous polling of open envelope status via calls to CheckEnvelopeStatus is not scalable, and is considered poor design.  Appropriate handling for ensuring you have the most up to date status is to perform a DocumentTRAK  web hook operation on envelope life cycle events.

 

The CheckEnvelopeStatus operation is used to query the current status of an envelope (for example, whether or not the envelope is completed). The returned status information will include the current status of the envelope and the complete history of the envelope. In addition, the response will also include the status and history of each document contained within the envelope.

The CheckEnvelopeStatus operation requires knowledge of the following:

  • The EnvelopeId of the envelope to cancel (this is returned as an element in the returned XML from an envelope creation operation)
  • The AuthToken of the envelope to cancel (this is returned as an element in the returned XML from an envelope creation operation)
  • The AssureSign account ContextIdentifier (this is exposed in the AssureSign administrative application account settings and serves to provide some security to the transaction)

Sample XML

<?xml version="1.0" encoding="utf-8"?> 
<CheckEnvelopeStatus xmlns="https://www.assuresign.net/Services/DocumentNOW/Envelopes">
<Request ContextIdentifier="06C4A84A-693C-46CB-8DF2-40A8215AA056" EnvelopeId="2CE11EF1-8938-DD11-8735-00065B8CE99B" AuthToken="8CC9A84B-693C-46CC-4342-40A8215AD76A" />
</CheckEnvelopeStatus>

The SOAP Action header is

https://www.assuresign.net/Services/DocumentNOW/Envelopes/IEnvelopeService/CheckEnvelopeStatus

A response will return a single enumerated status of the envelope along with a complete envelope history and the status and history of all documents contained in the envelope:

<?xml version="1.0" encoding="utf-8"?> 
<CheckEnvelopeStatusResponse xmlns="https://www.assuresign.net/Services/DocumentNOW/CheckStatus">
<CheckEnvelopeStatusResult EnvelopeId="2CE11EF1-8938-DD11-8735-00065B8CE99B" StatusType="Completed">
<History>
<EnvelopeHistoryEvent Date="2011-12-01T09:00:00" Details="Envelope created by user ‘jdoe@example.com’ at IP address ‘127.0.0.1’" />
<EnvelopeHistoryEvent Date="2011-12-01T10:00:00" Details="Attachment ‘Envelope Attachment 1’ was added for envelope ‘2CE11EF1-8938-DD11-8735-00065B8CE99B’ by user ‘jdoe@example.com’ at IP address ‘127.0.0.1’" />
<EnvelopeHistoryEvent Date="2011-12-01T11:00:00" Details="Document ‘Document 1’ (19c1a800-42e8-df11-9b14-0022195a8cb4) added to envelope by user ‘jdoe@example.com’ at IP address ‘127.0.0.1’" />
<EnvelopeHistoryEventDate="2011-12-01T13:00:00" Details="Envelope closed by user ‘jdoe@example.com’ at IP address ‘127.0.0.1’" />
<EnvelopeHistoryEventDate="2011-12-01T15:00:00" Details="Envelope completed" />
</History>
<Documents>
<EnvelopeDocument DocumentId="19c1a800-42e8-df11-9b14-0022195a8cb4" AuthToken="f4aaf447-8cfa-4701-9951-b4a063653c04" Name="Document 1" OrderId="1234"> <Status StatusDate="2011-12-01T11:25:02" StatusType="Completed" />
<History>
<EnvelopeDocumentHistoryEvent Date="2011-12-01T11:00:00" Details="Document created by user 'jdoe@example.com' at IP address '127.0.0.1'" />
<EnvelopeDocumentHistoryEvent Date="2011-12-01T11:15:00" Details="Document started by user 'jdoe@example.com' at IP address '127.0.0.1'" />
<EnvelopeDocumentHistoryEvent Date="2011-12-01T11:15:00" Details="Signing Step '1' started" />
<EnvelopeDocumentHistoryEvent Date="2011-12-01T11:15:01" Details="Email 'Before signing step - Originator' sent to 'John Doe' (jdoe@example.com) for Signing Step '1'" />
<EnvelopeDocumentHistoryEvent Date="2011-12-01T11:15:01" Details="Email 'Document available to sign' sent to 'Bob Smith' (bsmith@example.com) for Signing Step '1'" />
<EnvelopeDocumentHistoryEvent Date="2011-12-01T11:20:00" Details="Document under review by 'Bob Smith' at IP address '127.0.0.1'" />
<EnvelopeDocumentHistoryEvent Date="2011-12-01T11:25:00" Details="Signing Step '1' completed" />
<EnvelopeDocumentHistoryEvent Date="2011-12-01T11:25:01" Details="Email 'Document completed' sent to 'John Doe' (jdoe@example.com)" />
<EnvelopeDocumentHistoryEvent Date="2011-12-01T11:25:01" Details="Email 'Document completed' sent to 'Bob Smith' (bsmith@example.com)" />
<EnvelopeDocumentHistoryEvent Date="2011-12-01T11:25:02" Details="Document completed" />
</History>
</EnvelopeDocument>
</Documents>
</CheckEnvelopeStatusResult>
</CheckEnvelopeStatusResponse>

Possible values for StatusType include:

  • Created
  • SigningStepInProgress
  • Completed
  • Expired
  • Cancelled
  • Declined
  • Staled
  • SignerAuthenticationFailed

The CheckEnvelopeStatusResult should be checked for the presence of an Exceptions element, which may contain multiple EnvelopeException items.

Be the first to reply!

Reply