The ListEnvelopeDocuments operation may be used to retrieve a list of all the documents contained in a document envelope. This operation can be useful for retrieving the DocumentId and AuthToken for all documents in an envelope for use in subsequent DocumentNOW calls.
The ListEnvelopeDocuments 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 enveloper creation operation)
- The AuthToken of the envelope to cancel (this is returned as an element in the returned XML from an enveloper 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"?> <ListEnvelopeDocuments xmlns="https://www.assuresign.net/Services/DocumentNOW/Envelopes"> <ListEnvelopeDocumentsRequest ContextIdentifier="06C4A84A-693C-46CB-8DF2-40A8215AA056" EnvelopeId="2CE11EF1-8938-DD11-8735-00065B8CE99B" AuthToken="8CC9A84B-693C-46CC-4342-40A8215AD76A" /> </ListEnvelopeDocuments>
The SOAP Action header is
The returned result will include the EnvelopeId along with a Documents element that contains an array of all the documents in the envelope.
Sample response XML is presented here:
<?xml version="1.0" encoding="utf-8"?> <ListEnvelopeDocumentsResponse xmlns="https://www.assuresign.net/Services/DocumentNOW/Envelopes"> <ListEnvelopeDocumentsResult EnvelopeId="1099f007-e207-43ca-805a-841ae8fa972c"> <Documents> <EnvelopeDocument DocumentId="19c1a800-42e8-df11-9b14-0022195a8cb4" AuthToken="f4aaf447-8cfa-4701-9951-b4a063653c04" Name="Document 1" OrderId="1234" /> <EnvelopeDocument DocumentId="28b1a800-42e8-df11-9b14-0022195a8cb4" AuthToken="cd33f44a-4cff-3301-aa5c-cdf0636ddc0b" Name="Document 2" OrderId="5678" /> <EnvelopeDocument DocumentId="37a1a800-42e8-df11-9b14-0022195a8cb4" AuthToken="98ef34cb-b8f3-df01-ca5c-56f073649c0b" Name="Document 3" OrderId="5283" /> </Documents> </ListEnvelopeDocumentsResult> </ListEnvelopeDocumentsResponse>
The ListEnvelopeDocumentsResult should be checked for the presence of an Exceptions element, which may contain multiple EnvelopeException items.