The CloseEnvelope operation allows a document envelope to be closed and the signing process to be started. When this operation is called, the signing process will be immediately started for one or more documents in the envelope (depending on whether the envelope is configured for parallel or sequential signing workflow).
In addition, it is not possible to add any additional documents to an envelope after the envelope has been closed.
The CloseEnvelope 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"?> <CloseEnvelope xmlns="https://www.assuresign.net/Services/DocumentNOW/Envelopes"> <CloseEnvelopeRequest ContextIdentifier="06C4A84A-693C-46CB-8DF2-40A8215AA056" EnvelopeId="2CE11EF1-8938-DD11-8735-00065B8CE99B" AuthToken="8CC9A84B-693C-46CC-4342-40A8215AD76A" /> </CancelEnvelope>
The SOAP Action Header is
A simple response is returned echoing the envelope information which will only contain an Exceptions node if some issue has occurred:
<?xml version="1.0" encoding="utf-8"?> <CloseEnvelopeResponse xmlns="https://www.assuresign.net/Services/DocumentNOW/Envelopes"> <CloseEnvelopeResult EnvelopeId="2CE11EF1-8938-DD11-8735-00065B8CE99B" /> </CloseEnvelopeResponse>
The CloseEnvelopeResult should be checked for the presence of an Exceptions element, which may contain multiple EnvelopeException items.