将 DocuSign ListStatusChanges 限制为由应用程序 ID 创建的信封

Limit DocuSign ListStatusChanges to envelopes created by the application id

我正在 ping 一个 docusign 帐户,该帐户在 30 天内由 ListStatusChanges 返回了超过 10k 个信封。注意:这只是一次初始扫描,之后,时间范围会缩短到最后一次扫描 + 3 分钟,如 DocuSign 所建议的。

我知道在那个时间范围内应用程序 ID 只创建了 1 个信封。如何将结果限制为仅当前应用程序?我不要帐户的所有信封。

public EnvelopesInformation GetEnvelopesInformation(DateTime fromDate)
{
    CheckToken();

    EnvelopesInformation envelopeInfo = null;
    string fromDateStr = fromDate.ToString("o");

    EnvelopesApi.ListStatusChangesOptions options = new EnvelopesApi.ListStatusChangesOptions()
    {
        fromDate = fromDateStr,
        fromToStatus = DocusignUtilities.StatusStrings.SIGNED, // excludes delivered, created, and sent envelopes
    };

    // |EnvelopesApi| contains methods related to envelopes and envelope recipients
    EnvelopesApi envelopesApi = new EnvelopesApi(ApiClient.Configuration);
    envelopeInfo = envelopesApi.ListStatusChanges(AccountID, options);

    return envelopeInfo;
}

一个选项是您的应用程序可以使用自定义字段来标识自己 ("myAppMarker")。 上面的代码可以这样修改:

public EnvelopesInformation GetEnvelopesInformation(DateTime fromDate)
{
    CheckToken();

    EnvelopesInformation envelopeInfo = null;
    string fromDateStr = fromDate.ToString("o");

    EnvelopesApi.ListStatusChangesOptions options = new EnvelopesApi.ListStatusChangesOptions()
    {
        customFiled = "myAppMarker",
        fromDate = fromDateStr,
        fromToStatus = DocusignUtilities.StatusStrings.SIGNED, // excludes delivered, created, and sent envelopes
    };

    // |EnvelopesApi| contains methods related to envelopes and envelope recipients
    EnvelopesApi envelopesApi = new EnvelopesApi(ApiClient.Configuration);
    envelopeInfo = envelopesApi.ListStatusChanges(AccountID, options);

    return envelopeInfo;
}