The ViewHistory operation is used to query a complete history of the document after submission via a document submission operation.
The ViewHistory operation requires knowledge of the following:
- the Document ID of the document history being requested (this is returned as an element in the returned XML from a document submission operation)
- the AssureSign account ContextIdentifier (this is exposed in the AssureSign administrative application account settings and serves to provide some security to the transaction)
- the AuthToken of the document (this is returned as an element in the returned XML from a document submission operation)
Sample XML
<?xml version="1.0" encoding="utf-8"?>
<ViewHistory xmlns="https://www.assuresign.net/Services/DocumentNOW/ViewHistory">
<DocumentHistoryViews>
<DocumentHistoryView ContextIdentifier="06C4A84A-693C-46CB-8DF2-40A8215AA056" Id="2CE11EF1-8938-DD11-8735-00065B8CE99B" AuthToken="8CC9A84B-693C-46CC-4342-40A8215AD76A" />
</DocumentHistoryViews>
</ViewHistory>
The SOAP Action header is
https://www.assuresign.net/Services/DocumentNOW/ViewHistory/IViewHistoryService/ViewHistory
Data will be returned that facilitates an extended display of history of the document, for example:
<?xml version="1.0" encoding="utf-8"?>
<ViewHistoryResponse xmlns="https://www.assuresign.net/Services/DocumentNOW/ViewHistory">
<DocumentHistoryViewResults>
<DocumentHistoryViewResult Id="2CE11EF1-8938-DD11-8735-00065B8CE99B">
<Events>
<DocumentEvent Date="2008-03-01T11:00:00.0000000-05:00" Details="Document created by user 'georgeuser@company.com' at IP address '127.0.0.1'" />
<DocumentEvent Date="2008-03-01T11:15:00.0000000-05:00" Details="Document started by user 'georgeuser@company.com' at IP address '127.0.0.1'" />
<DocumentEvent Date="2008-03-01T11:15:00.0000000-05:00" Details="Signing Step '1' started" /> <DocumentEvent Date="2008-03-01T11:15:01.0000000-05:00" Details="Email 'Before signing step - Originator' sent to 'George User' (georgeuser@company.com) for Signing Step '1'" />
<DocumentEvent Date="2008-03-01T11:15:01.0000000-05:00" Details="Email 'Document available to sign' sent to 'Bob Smith' (bsmith@3pv.com) for Signing Step '1'" />
<DocumentEvent Date="2008-03-01T11:20:00.0000000-05:00" Details="Document under review by 'Bob Smith' at IP address '127.0.0.1'" />
<DocumentEvent Date="2008-03-01T11:25:00.0000000-05:00" Details="Signing Step '1' completed" />
<DocumentEvent Date="2008-03-01T11:25:01.0000000-05:00" Details="Email 'Document completed' sent to 'John Doe' (georgeuser@company.com)" />
<DocumentEvent Date="2008-03-01T11:25:01.0000000-05:00" Details="Email 'Document completed' sent to 'Bob Smith' (bsmith@example.com)" />
<DocumentEvent Date="2008-03-01T11:25:02.0000000-05:00" Details="Document completed" />
</Events>
</DocumentHistoryViewResult>
</DocumentHistoryViewResults>
</ViewHistoryResponse>
The DocumentHistoryViewResult should be checked for the presence of an Exceptions element, which may contain multiple HistoryViewException items.