0

I have a list of envelopes that works fine with liststatuschanges, but I would like to exclude the envelopes that belong to batch (which are currently also appearing in the list of envelopes), to make a separate list for batch only. Is there any way to exclude those envelopes that were sent within a batch from my envelope list?

2 Answers2

0

Yes, but it requires to you mark them before you send them in the batch. For example, you can use custom text fields and when you set your bulk send (what you call batch) you can set this custom field. You can later search for envelopes based on custom fields values. You can also use other metadata. The envelopes sent from batch are indistinguishable once they were created from any other envelopes, just like envelopes created from templates are. You have to mark them yourself to be able to later find them.

Inbar Gazit
  • 12,566
  • 1
  • 16
  • 23
0
You can simply store batch id when u use bulk send api, once you store, you can fetch all envelopes using code below

// C# Code
  var bulkEnvelopesApi = CustomApi.Instance.BulkEnvelopes(accessToken, basePath);
            var batchStatus = await bulkEnvelopesApi.GetBulkSendBatchStatusAsync(accountId, batchId);

  if (batchStatus.Failed.Equals("0", StringComparison.OrdinalIgnoreCase)
                && batchStatus.Queued.Equals("0", StringComparison.OrdinalIgnoreCase)
                && !batchStatus.Sent.Equals("0", StringComparison.OrdinalIgnoreCase))
            {
                var bulkSendEnvelopes = await bulkEnvelopesApi.GetBulkSendBatchEnvelopesAsync(accountId, batchId);

                return bulkSendEnvelopes?.Envelopes;
            }
Shyam
  • 182
  • 1
  • 14