Skip to navigation

RequestStatusChanges

View as Markdown

The RequestStatusChanges method requests the envelope status changes for the envelopes for account on or after the specified date/time.

Note: The SOAP API calls RequestStatusChanges and RequestStatusCodes were created to provide a high-efficiency way to determine envelope status changes. These calls are the preferred methods for determining status. Generally, customers should poll as infrequently as possible. But for customers that generate a large number of envelopes, frequent polling using these calls is an acceptable option. However, when polling at frequent intervals, the call should include an appropriately short time range for StatusChangedSince. For example, if you are checking for status changes every 15 minutes, do not use a StatusChangedSince of 7 days ago.

If no UserInfo is specified and if the StatusChangedSince is more than 24 hours ago, this call will return information for all users, but only for the previous 24 hours. If no UserInfo is specified and StatusChangedSince is less than 24 hours ago, this call will return information for all users for the specified time.

// Create the status change filter to specify the scope of your search
// Here, we are limiting the search to envelopes changed today
// You can also limit by user and status
DocuSignWeb.EnvelopeStatusChangeFilter filter =
new DocuSignWeb.EnvelopeStatusChangeFilter();
filter.AccountId = _accountId;
DocuSignWeb.EnvelopeStatusFilterBeginDateTime begin =
new DocuSignWeb.EnvelopeStatusFilterBeginDateTime();
begin.Value = DateTime.Today;
filter.StatusChangedSince = begin.Value;
// Now, make the call with the filter we created
DocuSignWeb.FilteredEnvelopeStatusChanges changes =
_apiClient.RequestStatusChanges(filter);
if (changes.ResultSetSize > 0)
{
// Loop through and print out some information about the results
Console.WriteLine("Changes since today are:");
foreach (DocuSignWeb.EnvelopeStatusChange change
in changes.EnvelopeStatusChanges)
{
Console.WriteLine("\tEnvelope {0} has status: {1}\n",
change.EnvelopeID, change.Status);
}
}

Schema

NameSchema TypeDescription
AccountIDDSXIdThe account ID for the envelope status changes being requested.
StatusChangedSincedateTimeSpecifies the date/time when the request begins checking for status changes for envelopes in the account.
StatusesEnvelopeStatusChangeOptional array of envelope status codes. If provided, this indicates the envelope status code changes being requested. Possible values are: Voided, Created, Deleted, Sent, Delivered, Signed, Completed, Declined, TimedOut and Processing.
UserInfoUserInfoOptional UserInfo object. If provided, this indicates the user whose envelopes are being requested.

UserInfo contains:

- UserName – The user’s name as listed in the account. - Email – The email associated with the user name.

FilteredEnvelopeStatusChanges

This is the response for RequestStatusChanges. It returns the current state of the requested envelopes in an array.

NameSchema TypeDescription
EnvelopeStatusChangesEnvelopeStatusChangesAn array of EnvelopeStatusChange objects.

Each EnvelopeStatusChange contains:

- EnvelopeID – The envelope ID. - Status – The EnvelopeStatusCode for the envelope. - StatusChanged – The date and time the status change occurred.
ResultSetSizeIntegerThis is the total number of items returned in EnvelopeStatusChanges.