Available starting in version 6.10.
Note: Your agreement with AssureSign may cap the number of documents that may be attached per envelope. Regardless of any explicitly designated cap, abuse of envelope operations may be cause for limiting your account activity. Documents submitted explicitly to a named EnvelopeId are not parsed or processed until the CloseEnvelope or AsyncCloseEnvelope operation is invoked. Consequently, submitting a large number of documents within an envelope will be self performance-limiting. For best performance, we do not recommend submitting more than 10 documents within an envelope.
The AsyncCloseEnvelope operation allows a document envelope to be closed and the signing process to be started in an asynchronous fashion where timing of the return response is critical. As with the CloseEnvelope operation, when this operation is called, the signing process will be started for one or more documents in the envelope (depending on whether the envelope is configured for parallel or sequential signing workflow). Unlike the CloseEnvelope operation, however, this operation does not wait for processing of the envelope closing to complete, and instead returns a SessionID immediately while continuing the processing of the envelope closing asynchronously. In cases where envelopes contain a large number of documents, the process of closing the envelope takes longer to complete. So, this operation allows the caller to receive an immediate response to the call without risk of timeouts. The SessionID returned by this operation may be used in calls to the LookupSession operation to obtain the result (or any error messages) that would have been returned synchronously in the CloseEnvelope operation.
Note that it is not possible to add any additional documents to an envelope after the envelope has been closed.
The AsyncCloseEnvelope 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)
<?xml version="1.0" encoding="utf-8"?> <AsyncCloseEnvelope xmlns="https://www.assuresign.net/Services/DocumentNOW/Envelopes"> <Request ContextIdentifier="06C4A84F-693C-46CB-8DF2-40A8215AA056" EnvelopeId="2CEB1EF1-8938-DD11-8735-00065B8CE99B" AuthToken="ACF9A84B-693C-46CC-4342-40A8215AD76A" /> </AsyncCloseEnvelope>
The SOAP Action Header is
A simple response is returned providing the SessionId which can be used with the LookupSession operation to obtain the result and any related exceptions.
<?xml version="1.0" encoding="utf-8"?> <AsyncCloseEnvelopeResponse xmlns="https://www.assuresign.net/Services/DocumentNOW/Envelopes"> <AsyncCloseEnvelopeResult SessionId="b31959af-b130-4d96-a9c6-dc0bb5d61de9" /> </AsyncCloseEnvelopeResponse>
The AsyncCloseEnvelopeResult should be checked for the presence of an Exceptions element, which may contain multiple EnvelopeException items.