Skip to navigation

RequestStatuses and RequestStatusesEx

View as Markdown

This method is used to request the status of multiple envelopes in a single call. Up to 1,000 envelopes can be retrieved within a single call. If more results are available, subsequent calls can be used to retrieve the next 1,000, etc.

Request Envelope Statuses Notes

The SOAP calls for RequestStatuses(Ex) and RequestStatusCodes use certain filters to find results. In some cases requests are check for “any status change” instead of the just the single status requested. In these cases, more envelopes might be returned by the request than otherwise would be. For example, for a request with the begin date is set to Jan 1st, an end date set to Jan 7th and the StatusQualifier set to “Delivered” – the response set might contain envelopes that were created during that time period, but not delivered during the time period.

To avoid unnecessary database queries, the Docusign system checks requests to ensure that the added filters will not result in a zero-size response before acting on the request. The following table shows the valid envelope statuses (in the Valid Current Statuses column) for the status qualifiers in the request. If the status and status qualifiers in the API request do not contain any of the values shown in the valid current statuses column, then an empty list is returned.

For example, a request with a StatusQualifier of “Delivered” and a status of “Created,Sent”, Docusign will always return an empty list. This is because the request essentially translates to: find the envelopes that were Delivered between the begin and end dates that have a current status of Created or Sent, and since an envelope that has been delivered can never have a status of Created or Sent, a zero-size response would be generated. In this case, Docusign does not run the request, but just returns the empty list.

// Create a filter using account ID and today as a start time
DocuSignWeb.EnvelopeStatusFilter filter = new DocuSignWeb.EnvelopeStatusFilter();
filter.AccountId = _accountId;
filter.BeginDateTime = new DocuSignWeb.EnvelopeStatusFilterBeginDateTime();
filter.BeginDateTime.Value = DateTime.Today;
// Request all envelopes that match the filter
DocuSignWeb.FilteredEnvelopeStatuses statuses = _apiClient.RequestStatuses(filter);
Console.WriteLine("We have {0} statuses that match account ID {1}",
statuses.EnvelopeStatuses.Length, _accountId);
foreach (DocuSignWeb.EnvelopeStatus eStatus in statuses.EnvelopeStatuses)
{
Console.WriteLine("\tEnvelope with ID {0} has status {1}", eStatus.EnvelopeID,
eStatus.Status.ToString());
}

Client applications should check that the statuses they are requesting make sense for a given status qualifier.

BeginDateTime - StatusQualifierEffective Status QualifierValid Current Statuses
Any (changed)StatusChangedAny, Created, Sent, Delivered, Signed, Completed, Declined, Voided, Deleted
CreatedCreatedAny, Created, Sent, Delivered, Signed, Completed, Declined, Voided, Deleted
SentSentAny, Sent, Delivered, Signed, Completed, Declined, Voided, Deleted
SignedStatusChangedAny, Signed, Completed, Declined, Voided, Deleted
CompletedCompletedAny, Completed, Declined, Voided, Deleted
DeclinedDeclinedAny, Declined, Deleted
TimedOut - Always returns zero results.StatusChangedAny, Voided, Deleted
VoidedVoidedAny, Voided, Deleted
DeletedStatusChangedAny, Deleted

Schema

RequestStatuses

RequestStatusesEx (EnvelopeStatusFilter is the same as above)

NameSchema TypeDescription
UserInfoUserInfoThis would be the username Email pair of the person whose envelope details are requested.
AccountIdDSXIdAccount Id for which envelope status is requested.
BeginDateTimedateTimeSpecifies the start date of the date range for which envelopes are requested. Has a status qualifier attribute which specifies envelope with what status needs to be requested. The StatusQualifier options are: Completed, Created (the default and what is used if Template or Processing is passed in), Sent, and Voided; any other value becomes StatusChanged.
EndDateTimedateTimeSpecifies the end date of the date range for which envelopes are requested.
StatusesEnvelopeStatusCodeSpecifies the status of the envelope at the time of request. This is enumerator controlled.
EnvelopeIdsDSXIdSpecifies the envelope Ids of envelopes for which status request. There is a maximum of 200 different EnvelopeIds for each request.
StartAtIndexnonNegativeIntegerIf envelope status result sets exceed 1000 envelopes, this element can be used to specify that the method should return envelopes at the specified index. The first index is 0, and should be used in the first call to RequestStatuses. Typically this number is a multiple of 1000.
ACStatusEnvelopeACStatusCodeSpecifies the Authoritative Copy Status for the envelopes. The possible values are: Unknown, Original, Transferred, AuthoritativeCopy, AuthoritativeCopyExportPending, AuthoritativeCopyExported, DepositPending, Deposited, DepositedEO, or DepositFailed.