Best Approach to Retrieve DocuSign Envelopes for Multiple Account Numbers
We are using the ListStatusChangesAsync API to retrieve DocuSign envelopes for multiple account numbers by passing the account number as a custom field.
var tasks = accountNumbers.Select(async accountNumber =>
{
var options = new EnvelopesApi.ListStatusChangesOptions
{
customField = $"Account Number={accountNumber}",
fromDate = DateTime.UtcNow
.AddDays(-Convert.ToInt32(envelopeRequest.EnvelopeDay))
.ToString("MM/dd/yyyy"),
include = "documents,custom_fields"
};
return await envelopesApi.ListStatusChangesAsync(accountId, options);
});
For each account number, a separate API request is sent to retrieve the related envelope details, including documents and custom fields. All requests are executed in parallel, and the responses are combined into a single result set.
We have observed that the loading time increases as the number of account numbers increases. In the production environment, some users may have more than 10 account numbers, and we cannot predict how many envelopes are associated with each account number.
We would like to understand the following:
-
Does DocuSign apply any throttling or delays when multiple API requests are executed simultaneously?
-
Is there a recommended limit for concurrent API requests?
-
Does retrieving additional information, such as documents and custom fields, significantly affect performance?
-
What is the recommended approach for retrieving envelope details when a user has many account numbers and an unknown number of envelopes?
-
Are there any best practices or optimization techniques for handling this scenario efficiently?
Any suggestions or recommendations would be greatly appreciated.
Back to Docusign.com

