-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathBulkEnvelopesApi.cs
2118 lines (1905 loc) · 281 KB
/
BulkEnvelopesApi.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* DocuSign REST API
*
* The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
*
* OpenAPI spec version: v2.1
* Contact: [email protected]
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using DocuSign.eSign.Client;
using DocuSign.eSign.Model;
namespace DocuSign.eSign.Api
{
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public interface IBulkEnvelopesApi : IApiAccessor
{
#region Synchronous Operations
/// <summary>
/// Creates a new bulk send list
/// </summary>
/// <remarks>
/// This method creates a bulk send list that you can use to send an envelope to up to 1,000 recipients at once. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/) ### Errors | Error code | Description | | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | | BULK_SEND_MAX_COPIES_EXCEEDED | A bulk sending list cannot specify more than XXX copies in the mailing list. Call the settings API endpoint to find the maximum number of copies in a batch allowed for your account. In almost all cases, the default limit is 1000. | | BULK_SEND_RECIPIENT_IDS_MUST_BE_UNIQUE | No two recipientIds can be same within a bulkCopy. Same restriction as a regular envelope applies. Specify unique recipient IDs for each recipient within a bulkCopy (model for envelope in mailing list). | | BULK_SEND_RECIPIENT_ID_REQUIRED | If no RoleName is present, recipientID is required in mailing list's bulkCopy. Add a roleName (that coalesces with template/envelope) or a recipientID. | | BULK_SEND_RECIPIENT_NAME_REQUIRED | Recipient {0} has no name. Specify a name for the recipient. | | BULK_SEND_EMAIL_ADDRESS_REQUIRED_FOR_EMAIL_RECIPIENT | Recipient {0} is an email recipient with no email address. Specify an email for the email recipient. | | BULK_SEND_FAX_NUMBER_REQUIRED_FOR_FAX_RECIPIENT | Recipient {0} is a fax recipient with no fax number. Specify a fax number for the fax recipient. | | BULK_SEND_FAX_NUMBER_NOT_VALID | Recipient {0} specifies fax number {1}, which is not valid. Specify a valid fax number for the fax recipient. | | BULK_SEND_EMAIL_ADDRESS_NOT_VALID | Recipient {0} specifies email address {1}, which is not a valid email address. Specify a valid email address for the recipient. | | BULK_SEND_PHONE_NUMBER_REQURED_FOR_SMS_AUTH | Recipient {0} specifies SMS auth, but no number was provided. Specify a phone number for the SMS auth recipient. | | BULK_SEND_PHONE_NUMBER_INVALID_FOR_SMS_AUTH | Recipient {0} specifies phone number {1} for SMS auth, which is not valid. Specify a valid phone number for the SMS auth recipient. | | BULK_SEND_ROLE_NAMES_MUST_BE_UNIQUE | Recipient role names cannot be duplicated; role {duplicateRecipientRole} appears multiple times. Use unique roleNames for recipients. | | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_ON_SAME_RECIPIENT | Recipients cannot have both ID and Role; {0} has both. Specify a roleName or recipientId, but not both for the same recipient. | | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_IN_SAME_LIST | Cannot use both recipient role and ID in the same list. Specify a roleName or recipientId, but not both in the same list. | | BULK_SEND_INVALID_ID_CHECK_CONFIGURATION | Recipient {0} specified SMS authentication, but no SMS auth settings were provided. Provide an SMS auth setting (proper ID configuration) if SMS auth is specified. | | BULK_SEND_INVALID_SBS_INPUT_CONFIGURATION | Recipient {0} has more than one signature provider specified. Or signingProviderName is not specified. Or Signature provider : {0} is either unknown or not an available pen for this account. One or more SBS configuration is missing or invalid. The error details provide specifics. | | BULK_SEND_TAB_LABELS_MUST_BE_UNIQUE | Tab label {0} is duplicated. Needs to be unique. Use a unique tab label. | | BULK_SEND_TAB_LABEL_REQUIRED | Tab label is required. Specify a tab label. | | BULK_SEND_TAB_VALUE_REQUIRED | Tab Label value is required. Specify a value for the tab label. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_MUST_BE_UNIQUE | Custom fields must have distinct names. The field {0} appears more than once in a copy. Use unique names for custom fields. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_REQUIRED | All custom fields must have names. Specify a name for the custom field. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_VALUE_REQUIRED | Custom field {0} has no value. A custom field can have an empty value, but it cannot have a null value. Specify a value for the custom field. |
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendingList"> (optional)</param>
/// <returns></returns>
BulkSendingList CreateBulkSendList(string accountId, BulkSendingList bulkSendingList = null);
/// <summary>
/// Creates a new bulk send list
/// </summary>
/// <remarks>
/// This method creates a bulk send list that you can use to send an envelope to up to 1,000 recipients at once. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/) ### Errors | Error code | Description | | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | | BULK_SEND_MAX_COPIES_EXCEEDED | A bulk sending list cannot specify more than XXX copies in the mailing list. Call the settings API endpoint to find the maximum number of copies in a batch allowed for your account. In almost all cases, the default limit is 1000. | | BULK_SEND_RECIPIENT_IDS_MUST_BE_UNIQUE | No two recipientIds can be same within a bulkCopy. Same restriction as a regular envelope applies. Specify unique recipient IDs for each recipient within a bulkCopy (model for envelope in mailing list). | | BULK_SEND_RECIPIENT_ID_REQUIRED | If no RoleName is present, recipientID is required in mailing list's bulkCopy. Add a roleName (that coalesces with template/envelope) or a recipientID. | | BULK_SEND_RECIPIENT_NAME_REQUIRED | Recipient {0} has no name. Specify a name for the recipient. | | BULK_SEND_EMAIL_ADDRESS_REQUIRED_FOR_EMAIL_RECIPIENT | Recipient {0} is an email recipient with no email address. Specify an email for the email recipient. | | BULK_SEND_FAX_NUMBER_REQUIRED_FOR_FAX_RECIPIENT | Recipient {0} is a fax recipient with no fax number. Specify a fax number for the fax recipient. | | BULK_SEND_FAX_NUMBER_NOT_VALID | Recipient {0} specifies fax number {1}, which is not valid. Specify a valid fax number for the fax recipient. | | BULK_SEND_EMAIL_ADDRESS_NOT_VALID | Recipient {0} specifies email address {1}, which is not a valid email address. Specify a valid email address for the recipient. | | BULK_SEND_PHONE_NUMBER_REQURED_FOR_SMS_AUTH | Recipient {0} specifies SMS auth, but no number was provided. Specify a phone number for the SMS auth recipient. | | BULK_SEND_PHONE_NUMBER_INVALID_FOR_SMS_AUTH | Recipient {0} specifies phone number {1} for SMS auth, which is not valid. Specify a valid phone number for the SMS auth recipient. | | BULK_SEND_ROLE_NAMES_MUST_BE_UNIQUE | Recipient role names cannot be duplicated; role {duplicateRecipientRole} appears multiple times. Use unique roleNames for recipients. | | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_ON_SAME_RECIPIENT | Recipients cannot have both ID and Role; {0} has both. Specify a roleName or recipientId, but not both for the same recipient. | | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_IN_SAME_LIST | Cannot use both recipient role and ID in the same list. Specify a roleName or recipientId, but not both in the same list. | | BULK_SEND_INVALID_ID_CHECK_CONFIGURATION | Recipient {0} specified SMS authentication, but no SMS auth settings were provided. Provide an SMS auth setting (proper ID configuration) if SMS auth is specified. | | BULK_SEND_INVALID_SBS_INPUT_CONFIGURATION | Recipient {0} has more than one signature provider specified. Or signingProviderName is not specified. Or Signature provider : {0} is either unknown or not an available pen for this account. One or more SBS configuration is missing or invalid. The error details provide specifics. | | BULK_SEND_TAB_LABELS_MUST_BE_UNIQUE | Tab label {0} is duplicated. Needs to be unique. Use a unique tab label. | | BULK_SEND_TAB_LABEL_REQUIRED | Tab label is required. Specify a tab label. | | BULK_SEND_TAB_VALUE_REQUIRED | Tab Label value is required. Specify a value for the tab label. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_MUST_BE_UNIQUE | Custom fields must have distinct names. The field {0} appears more than once in a copy. Use unique names for custom fields. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_REQUIRED | All custom fields must have names. Specify a name for the custom field. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_VALUE_REQUIRED | Custom field {0} has no value. A custom field can have an empty value, but it cannot have a null value. Specify a value for the custom field. |
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendingList"> (optional)</param>
/// <returns>ApiResponse of </returns>
ApiResponse<BulkSendingList> CreateBulkSendListWithHttpInfo(string accountId, BulkSendingList bulkSendingList = null);
/// <summary>
/// Uses the specified bulk send list to send the envelope specified in the payload
/// </summary>
/// <remarks>
/// This method initiates the bulk send process. It generates a bulk send request based on an [existing bulk send list][create_list] and an envelope or template. Consider using the [BulkSend::createBulkSendTestRequest][create_test] method to test your bulk send list for compatibility with the envelope or template that you want to send first. To learn about the complete bulk send flow, see the [Bulk Send overview][BulkSendOverview]. If the envelopes were successfully queued for asynchronous processing, the response contains a `batchId` that you can use to get the status of the batch. If a failure occurs, the API returns an error message. **Note:** Partial success or failure generally does not occur. Only the entire batch is queued for asynchronous processing. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/) ### Errors This method returns the following errors: | Error code | Description | | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | | BULK_SEND_ENVELOPE_NOT_IN_SENDABLE_STATE | Envelope {0} is not in a sendable state. The envelope is not complete. Make sure it has a sendable status, such as `created`. | | BULK_SEND_ENVELOPE_LIST_CONTAINS_NO_COPIES | Cannot send an envelope with a bulk sending list which contains no copies. The list you're trying to bulk send is empty. Make sure the bulk sending list you're using contains recipients. | | BULK_SEND_ENVELOPE_LIST_CONTAINS_TOO_MANY_COPIES | Bulk sending list contains more than {0} copies. The list you're trying to bulk send will cause your account to exceed the 1,000-copy limit imposed for all accounts. Try sending two or more separate lists. | | BULK_SEND_ENVELOPE_CANNOT_BE_NULL | Cannot send a bulk list without an envelope. Specify the envelope ID or template ID for the envelope you want to bulk send. | | BULK_SEND_BLOB_STORE_ERROR | Could not save copy of bulk sending list. An error writing to the database occurred. Try again. If the error persists, contact DocuSign Support. | | BULK_SEND_ACCOUNT_HAS_TOO_MANY_QUEUED_ENVELOPES | Cannot send this bulk sending list because doing so would exceed the maximum of {maxCopies} in-flight envelopes. This account currently has {unprocessedEnvelopes} envelopes waiting to be processed. Please try again later.\" .Try again later, or contact DocuSign Support to request a higher tier. | | BULK_SEND_ENVELOPE_NOT_FOUND | Envelope {envelopeOrTemplateId} does not exist or you do not have permission to access it. The envelopeId or templateId specified could not be found. Specify a valid value. | | BULK_SEND_LIST_NOT_FOUND | Bulk Sending list {listId} does not exist or you do not have permission to access it. The mailingListId specified could not be found. Specify a valid value. | | BULK_SEND_ENVELOPE_HAS_NO_RECIPIENTS | Bulk sending copy contains recipients, but the specified envelope does not. The recipients on the envelope and the bulk send list do not match. Make sure the envelope and list are compatible for sending. | | BULK_SEND_RECIPIENT_ID_DOES_NOT_EXIST_IN_ENVELOPE | Recipient {0} does not exist in the envelope. Add the missing recipient to the envelope. | | BULK_SEND_RECIPIENT_ID_DOES_NOT_MATCH | Recipient ID {envelopeMember.ID} does not match. Make sure the recipient information in the list and the envelope match up. | | BULK_SEND_ENVELOPE_HAS_BULK_RECIPIENT | Recipient {0} is a bulk recipient. This is not supported. No legacy 'bulk recipient' allowed. In v2.1 of the eSignature API, you must use a bulk send list instead of a bulk recipient. See the API documentation for details. | | BULK_SEND_RECIPIENT_ROLE_DOES_NOT_MATCH | Recipient Role {envelopeMember.RoleName} does not match. Make sure the recipient information in the list and the envelope is compatible. | | BULK_SEND_DUPLICATE_RECIPIENT_DETECTED | Duplicate recipients ({0}) not allowed, unless recipients have unique routing order specified on envelope. | | BULK_SEND_ENVELOPE_HAS_NO_TABS | Bulk sending copy contains tabs, but the specified envelope does not. List and envelope tabs cannot be coalesced. Make sure they are compatible for sending. | | BULK_SEND_TAB_LABEL_DOES_NOT_EXIST_IN_ENVELOPE | Tab with label {0} does not exist in envelope. Add the tab label to the envelope, remove the label from the list, or make sure you're specifying the correct list and envelope. | | BULK_SEND_TAB_DOES_NOT_MATCH | Tab {0} does not match {0} in envelope. A tab exists on the list that does not match or is missing on the envelope. Make sure the tabs on the list and the envelope match. | | BULK_SEND_ENVELOPE_HAS_NO_ENVELOPE_CUSTOM_FIELDS | Bulk sending copy contains custom fields, but the specified envelope does not. There are custom fields on the list that the envelope does not have. Make sure that any custom fields on the list and the envelope match. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_DOES_NOT_EXIST_IN_ENVELOPE | Custom field {0} does not exist in the envelope. Either add the custom field on the list to the envelope, remove the custom field from the list, or make sure you're specifying the correct list and envelope. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_DOES_NOT_MATCH | Custom field names must match. {0} and {1} do not match. The custom field names on the list and the envelope do not match. Use identical names for both. | [create_list]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendlist/ [create_test]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendtestrequest/ [BulkSendOverview]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendRequest"> (optional)</param>
/// <returns></returns>
BulkSendResponse CreateBulkSendRequest(string accountId, string bulkSendListId, BulkSendRequest bulkSendRequest = null);
/// <summary>
/// Uses the specified bulk send list to send the envelope specified in the payload
/// </summary>
/// <remarks>
/// This method initiates the bulk send process. It generates a bulk send request based on an [existing bulk send list][create_list] and an envelope or template. Consider using the [BulkSend::createBulkSendTestRequest][create_test] method to test your bulk send list for compatibility with the envelope or template that you want to send first. To learn about the complete bulk send flow, see the [Bulk Send overview][BulkSendOverview]. If the envelopes were successfully queued for asynchronous processing, the response contains a `batchId` that you can use to get the status of the batch. If a failure occurs, the API returns an error message. **Note:** Partial success or failure generally does not occur. Only the entire batch is queued for asynchronous processing. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/) ### Errors This method returns the following errors: | Error code | Description | | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | | BULK_SEND_ENVELOPE_NOT_IN_SENDABLE_STATE | Envelope {0} is not in a sendable state. The envelope is not complete. Make sure it has a sendable status, such as `created`. | | BULK_SEND_ENVELOPE_LIST_CONTAINS_NO_COPIES | Cannot send an envelope with a bulk sending list which contains no copies. The list you're trying to bulk send is empty. Make sure the bulk sending list you're using contains recipients. | | BULK_SEND_ENVELOPE_LIST_CONTAINS_TOO_MANY_COPIES | Bulk sending list contains more than {0} copies. The list you're trying to bulk send will cause your account to exceed the 1,000-copy limit imposed for all accounts. Try sending two or more separate lists. | | BULK_SEND_ENVELOPE_CANNOT_BE_NULL | Cannot send a bulk list without an envelope. Specify the envelope ID or template ID for the envelope you want to bulk send. | | BULK_SEND_BLOB_STORE_ERROR | Could not save copy of bulk sending list. An error writing to the database occurred. Try again. If the error persists, contact DocuSign Support. | | BULK_SEND_ACCOUNT_HAS_TOO_MANY_QUEUED_ENVELOPES | Cannot send this bulk sending list because doing so would exceed the maximum of {maxCopies} in-flight envelopes. This account currently has {unprocessedEnvelopes} envelopes waiting to be processed. Please try again later.\" .Try again later, or contact DocuSign Support to request a higher tier. | | BULK_SEND_ENVELOPE_NOT_FOUND | Envelope {envelopeOrTemplateId} does not exist or you do not have permission to access it. The envelopeId or templateId specified could not be found. Specify a valid value. | | BULK_SEND_LIST_NOT_FOUND | Bulk Sending list {listId} does not exist or you do not have permission to access it. The mailingListId specified could not be found. Specify a valid value. | | BULK_SEND_ENVELOPE_HAS_NO_RECIPIENTS | Bulk sending copy contains recipients, but the specified envelope does not. The recipients on the envelope and the bulk send list do not match. Make sure the envelope and list are compatible for sending. | | BULK_SEND_RECIPIENT_ID_DOES_NOT_EXIST_IN_ENVELOPE | Recipient {0} does not exist in the envelope. Add the missing recipient to the envelope. | | BULK_SEND_RECIPIENT_ID_DOES_NOT_MATCH | Recipient ID {envelopeMember.ID} does not match. Make sure the recipient information in the list and the envelope match up. | | BULK_SEND_ENVELOPE_HAS_BULK_RECIPIENT | Recipient {0} is a bulk recipient. This is not supported. No legacy 'bulk recipient' allowed. In v2.1 of the eSignature API, you must use a bulk send list instead of a bulk recipient. See the API documentation for details. | | BULK_SEND_RECIPIENT_ROLE_DOES_NOT_MATCH | Recipient Role {envelopeMember.RoleName} does not match. Make sure the recipient information in the list and the envelope is compatible. | | BULK_SEND_DUPLICATE_RECIPIENT_DETECTED | Duplicate recipients ({0}) not allowed, unless recipients have unique routing order specified on envelope. | | BULK_SEND_ENVELOPE_HAS_NO_TABS | Bulk sending copy contains tabs, but the specified envelope does not. List and envelope tabs cannot be coalesced. Make sure they are compatible for sending. | | BULK_SEND_TAB_LABEL_DOES_NOT_EXIST_IN_ENVELOPE | Tab with label {0} does not exist in envelope. Add the tab label to the envelope, remove the label from the list, or make sure you're specifying the correct list and envelope. | | BULK_SEND_TAB_DOES_NOT_MATCH | Tab {0} does not match {0} in envelope. A tab exists on the list that does not match or is missing on the envelope. Make sure the tabs on the list and the envelope match. | | BULK_SEND_ENVELOPE_HAS_NO_ENVELOPE_CUSTOM_FIELDS | Bulk sending copy contains custom fields, but the specified envelope does not. There are custom fields on the list that the envelope does not have. Make sure that any custom fields on the list and the envelope match. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_DOES_NOT_EXIST_IN_ENVELOPE | Custom field {0} does not exist in the envelope. Either add the custom field on the list to the envelope, remove the custom field from the list, or make sure you're specifying the correct list and envelope. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_DOES_NOT_MATCH | Custom field names must match. {0} and {1} do not match. The custom field names on the list and the envelope do not match. Use identical names for both. | [create_list]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendlist/ [create_test]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendtestrequest/ [BulkSendOverview]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendRequest"> (optional)</param>
/// <returns>ApiResponse of </returns>
ApiResponse<BulkSendResponse> CreateBulkSendRequestWithHttpInfo(string accountId, string bulkSendListId, BulkSendRequest bulkSendRequest = null);
/// <summary>
/// Tests whether the specified bulk sending list can be used to send an envelope
/// </summary>
/// <remarks>
/// This method tests a bulk send list for compatibility with the envelope or template that you want to send. For example, a template that has three roles is not compatible with a bulk send list that has only two recipients. For this reason, you might want to test compatibility first. A successful test result returns `true` for the `canBeSent` property. An unsuccessful test returns a JSON response that contains information about the errors that occurred. If the test is successful, you can then send the envelope or template by using the [BulkSend::createBulkSendRequest][BulkSendRequest] method. ## Envelope Compatibility Checks This section describes the envelope compatibility checks that the system performs. **Top-Level Issues** - Envelopes must be in a sendable state. - The bulk send list must contain at least one copy (instance of an envelope), and no more than the maximum number of copies allowed for the account. - The envelope must not be null and must be visible to the current user. - The account cannot have more queued envelopes than the maximum number configured for the account. - The bulk send list must exist. **Recipients** - The envelope must have recipients. - If you are using an envelope, all of the recipients defined in the bulk send list must have corresponding recipient IDs in the envelope definition. If you are using a template, you must either match the recipient IDs or role IDs. - The envelope cannot contain a bulk recipient (an artifact of the legacy version of DocuSign's bulk send functionality). **Recipient Tabs** - Every `recipient ID, tab label` pair in the bulk send list must correspond to a tab in the envelope. **Custom Fields** - Each envelope-level custom field in the bulk send list must correspond to the name of a `customField` in the envelope definition. You do not have to match the recipient-level custom fields. [BulkSendRequest]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendrequest/
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendRequest"> (optional)</param>
/// <returns></returns>
BulkSendTestResponse CreateBulkSendTestRequest(string accountId, string bulkSendListId, BulkSendRequest bulkSendRequest = null);
/// <summary>
/// Tests whether the specified bulk sending list can be used to send an envelope
/// </summary>
/// <remarks>
/// This method tests a bulk send list for compatibility with the envelope or template that you want to send. For example, a template that has three roles is not compatible with a bulk send list that has only two recipients. For this reason, you might want to test compatibility first. A successful test result returns `true` for the `canBeSent` property. An unsuccessful test returns a JSON response that contains information about the errors that occurred. If the test is successful, you can then send the envelope or template by using the [BulkSend::createBulkSendRequest][BulkSendRequest] method. ## Envelope Compatibility Checks This section describes the envelope compatibility checks that the system performs. **Top-Level Issues** - Envelopes must be in a sendable state. - The bulk send list must contain at least one copy (instance of an envelope), and no more than the maximum number of copies allowed for the account. - The envelope must not be null and must be visible to the current user. - The account cannot have more queued envelopes than the maximum number configured for the account. - The bulk send list must exist. **Recipients** - The envelope must have recipients. - If you are using an envelope, all of the recipients defined in the bulk send list must have corresponding recipient IDs in the envelope definition. If you are using a template, you must either match the recipient IDs or role IDs. - The envelope cannot contain a bulk recipient (an artifact of the legacy version of DocuSign's bulk send functionality). **Recipient Tabs** - Every `recipient ID, tab label` pair in the bulk send list must correspond to a tab in the envelope. **Custom Fields** - Each envelope-level custom field in the bulk send list must correspond to the name of a `customField` in the envelope definition. You do not have to match the recipient-level custom fields. [BulkSendRequest]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendrequest/
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendRequest"> (optional)</param>
/// <returns>ApiResponse of </returns>
ApiResponse<BulkSendTestResponse> CreateBulkSendTestRequestWithHttpInfo(string accountId, string bulkSendListId, BulkSendRequest bulkSendRequest = null);
/// <summary>
/// Deletes an existing bulk send list
/// </summary>
/// <remarks>
/// This method deletes a bulk send list.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <returns></returns>
BulkSendingListSummaries DeleteBulkSendList(string accountId, string bulkSendListId);
/// <summary>
/// Deletes an existing bulk send list
/// </summary>
/// <remarks>
/// This method deletes a bulk send list.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <returns>ApiResponse of </returns>
ApiResponse<BulkSendingListSummaries> DeleteBulkSendListWithHttpInfo(string accountId, string bulkSendListId);
/// <summary>
/// Gets envelopes from a specific bulk send batch
/// </summary>
/// <remarks>
/// This method returns a list of envelopes in a specified bulk batch. Use the query parameters to filter and sort the envelopes by different attributes.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendBatchId"></param>
/// <param name="options">Options for modifying the behavior of the function.</param>
/// <returns></returns>
EnvelopesInformation GetBulkSendBatchEnvelopes(string accountId, string bulkSendBatchId, BulkEnvelopesApi.GetBulkSendBatchEnvelopesOptions options = null);
/// <summary>
/// Gets envelopes from a specific bulk send batch
/// </summary>
/// <remarks>
/// This method returns a list of envelopes in a specified bulk batch. Use the query parameters to filter and sort the envelopes by different attributes.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendBatchId"></param>
/// <param name="options">Options for modifying the behavior of the function.</param>
/// <returns>ApiResponse of </returns>
ApiResponse<EnvelopesInformation> GetBulkSendBatchEnvelopesWithHttpInfo(string accountId, string bulkSendBatchId, BulkEnvelopesApi.GetBulkSendBatchEnvelopesOptions options = null);
/// <summary>
/// Gets a specific bulk send batch status
/// </summary>
/// <remarks>
/// Gets the general status of a specific bulk send batch such as: - number of successes - number pending - number of errors The `bulkErrors` property of the response object contains more information about the errors. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/)
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendBatchId"></param>
/// <returns></returns>
BulkSendBatchStatus GetBulkSendBatchStatus(string accountId, string bulkSendBatchId);
/// <summary>
/// Gets a specific bulk send batch status
/// </summary>
/// <remarks>
/// Gets the general status of a specific bulk send batch such as: - number of successes - number pending - number of errors The `bulkErrors` property of the response object contains more information about the errors. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/)
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendBatchId"></param>
/// <returns>ApiResponse of </returns>
ApiResponse<BulkSendBatchStatus> GetBulkSendBatchStatusWithHttpInfo(string accountId, string bulkSendBatchId);
/// <summary>
/// Returns a list of bulk send batch satuses initiated by account.
/// </summary>
/// <remarks>
/// Returns a summary of bulk send batches. Use the `batch_ids` query parameter to narrow the list of batches.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="options">Options for modifying the behavior of the function.</param>
/// <returns></returns>
BulkSendBatchSummaries GetBulkSendBatches(string accountId, BulkEnvelopesApi.GetBulkSendBatchesOptions options = null);
/// <summary>
/// Returns a list of bulk send batch satuses initiated by account.
/// </summary>
/// <remarks>
/// Returns a summary of bulk send batches. Use the `batch_ids` query parameter to narrow the list of batches.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="options">Options for modifying the behavior of the function.</param>
/// <returns>ApiResponse of </returns>
ApiResponse<BulkSendBatchSummaries> GetBulkSendBatchesWithHttpInfo(string accountId, BulkEnvelopesApi.GetBulkSendBatchesOptions options = null);
/// <summary>
/// Gets a specific bulk send list
/// </summary>
/// <remarks>
/// This method returns all of the details associated with a specific bulk send list that belongs to the current user.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <returns></returns>
BulkSendingList GetBulkSendList(string accountId, string bulkSendListId);
/// <summary>
/// Gets a specific bulk send list
/// </summary>
/// <remarks>
/// This method returns all of the details associated with a specific bulk send list that belongs to the current user.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <returns>ApiResponse of </returns>
ApiResponse<BulkSendingList> GetBulkSendListWithHttpInfo(string accountId, string bulkSendListId);
/// <summary>
/// Lists top-level details for all bulk send lists visible to the current user
/// </summary>
/// <remarks>
/// This method returns a list of bulk send lists belonging to the current user, as well as basic information about each list.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <returns></returns>
BulkSendingListSummaries GetBulkSendLists(string accountId);
/// <summary>
/// Lists top-level details for all bulk send lists visible to the current user
/// </summary>
/// <remarks>
/// This method returns a list of bulk send lists belonging to the current user, as well as basic information about each list.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <returns>ApiResponse of </returns>
ApiResponse<BulkSendingListSummaries> GetBulkSendListsWithHttpInfo(string accountId);
/// <summary>
/// Initiate a specific bulk send batch action
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendBatchId"></param>
/// <param name="bulkAction"></param>
/// <param name="bulkSendBatchActionRequest"> (optional)</param>
/// <returns></returns>
BulkSendBatchStatus UpdateBulkSendBatchAction(string accountId, string bulkSendBatchId, string bulkAction, BulkSendBatchActionRequest bulkSendBatchActionRequest = null);
/// <summary>
/// Initiate a specific bulk send batch action
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendBatchId"></param>
/// <param name="bulkAction"></param>
/// <param name="bulkSendBatchActionRequest"> (optional)</param>
/// <returns>ApiResponse of </returns>
ApiResponse<BulkSendBatchStatus> UpdateBulkSendBatchActionWithHttpInfo(string accountId, string bulkSendBatchId, string bulkAction, BulkSendBatchActionRequest bulkSendBatchActionRequest = null);
/// <summary>
/// Put/Update a specific bulk send batch status
/// </summary>
/// <remarks>
/// Updates a specific bulk send batch status.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendBatchId"></param>
/// <param name="bulkSendBatchRequest"> (optional)</param>
/// <returns></returns>
BulkSendBatchStatus UpdateBulkSendBatchStatus(string accountId, string bulkSendBatchId, BulkSendBatchRequest bulkSendBatchRequest = null);
/// <summary>
/// Put/Update a specific bulk send batch status
/// </summary>
/// <remarks>
/// Updates a specific bulk send batch status.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendBatchId"></param>
/// <param name="bulkSendBatchRequest"> (optional)</param>
/// <returns>ApiResponse of </returns>
ApiResponse<BulkSendBatchStatus> UpdateBulkSendBatchStatusWithHttpInfo(string accountId, string bulkSendBatchId, BulkSendBatchRequest bulkSendBatchRequest = null);
/// <summary>
/// Updates an existing bulk send list. If send_envelope query string value is provided, will accept an empty payload and try to send the specified envelope
/// </summary>
/// <remarks>
/// This method replaces the definition of an existing bulk send list.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendingList"> (optional)</param>
/// <returns></returns>
BulkSendingList UpdateBulkSendList(string accountId, string bulkSendListId, BulkSendingList bulkSendingList = null);
/// <summary>
/// Updates an existing bulk send list. If send_envelope query string value is provided, will accept an empty payload and try to send the specified envelope
/// </summary>
/// <remarks>
/// This method replaces the definition of an existing bulk send list.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendingList"> (optional)</param>
/// <returns>ApiResponse of </returns>
ApiResponse<BulkSendingList> UpdateBulkSendListWithHttpInfo(string accountId, string bulkSendListId, BulkSendingList bulkSendingList = null);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
/// Creates a new bulk send list
/// </summary>
/// <remarks>
/// This method creates a bulk send list that you can use to send an envelope to up to 1,000 recipients at once. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/) ### Errors | Error code | Description | | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | | BULK_SEND_MAX_COPIES_EXCEEDED | A bulk sending list cannot specify more than XXX copies in the mailing list. Call the settings API endpoint to find the maximum number of copies in a batch allowed for your account. In almost all cases, the default limit is 1000. | | BULK_SEND_RECIPIENT_IDS_MUST_BE_UNIQUE | No two recipientIds can be same within a bulkCopy. Same restriction as a regular envelope applies. Specify unique recipient IDs for each recipient within a bulkCopy (model for envelope in mailing list). | | BULK_SEND_RECIPIENT_ID_REQUIRED | If no RoleName is present, recipientID is required in mailing list's bulkCopy. Add a roleName (that coalesces with template/envelope) or a recipientID. | | BULK_SEND_RECIPIENT_NAME_REQUIRED | Recipient {0} has no name. Specify a name for the recipient. | | BULK_SEND_EMAIL_ADDRESS_REQUIRED_FOR_EMAIL_RECIPIENT | Recipient {0} is an email recipient with no email address. Specify an email for the email recipient. | | BULK_SEND_FAX_NUMBER_REQUIRED_FOR_FAX_RECIPIENT | Recipient {0} is a fax recipient with no fax number. Specify a fax number for the fax recipient. | | BULK_SEND_FAX_NUMBER_NOT_VALID | Recipient {0} specifies fax number {1}, which is not valid. Specify a valid fax number for the fax recipient. | | BULK_SEND_EMAIL_ADDRESS_NOT_VALID | Recipient {0} specifies email address {1}, which is not a valid email address. Specify a valid email address for the recipient. | | BULK_SEND_PHONE_NUMBER_REQURED_FOR_SMS_AUTH | Recipient {0} specifies SMS auth, but no number was provided. Specify a phone number for the SMS auth recipient. | | BULK_SEND_PHONE_NUMBER_INVALID_FOR_SMS_AUTH | Recipient {0} specifies phone number {1} for SMS auth, which is not valid. Specify a valid phone number for the SMS auth recipient. | | BULK_SEND_ROLE_NAMES_MUST_BE_UNIQUE | Recipient role names cannot be duplicated; role {duplicateRecipientRole} appears multiple times. Use unique roleNames for recipients. | | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_ON_SAME_RECIPIENT | Recipients cannot have both ID and Role; {0} has both. Specify a roleName or recipientId, but not both for the same recipient. | | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_IN_SAME_LIST | Cannot use both recipient role and ID in the same list. Specify a roleName or recipientId, but not both in the same list. | | BULK_SEND_INVALID_ID_CHECK_CONFIGURATION | Recipient {0} specified SMS authentication, but no SMS auth settings were provided. Provide an SMS auth setting (proper ID configuration) if SMS auth is specified. | | BULK_SEND_INVALID_SBS_INPUT_CONFIGURATION | Recipient {0} has more than one signature provider specified. Or signingProviderName is not specified. Or Signature provider : {0} is either unknown or not an available pen for this account. One or more SBS configuration is missing or invalid. The error details provide specifics. | | BULK_SEND_TAB_LABELS_MUST_BE_UNIQUE | Tab label {0} is duplicated. Needs to be unique. Use a unique tab label. | | BULK_SEND_TAB_LABEL_REQUIRED | Tab label is required. Specify a tab label. | | BULK_SEND_TAB_VALUE_REQUIRED | Tab Label value is required. Specify a value for the tab label. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_MUST_BE_UNIQUE | Custom fields must have distinct names. The field {0} appears more than once in a copy. Use unique names for custom fields. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_REQUIRED | All custom fields must have names. Specify a name for the custom field. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_VALUE_REQUIRED | Custom field {0} has no value. A custom field can have an empty value, but it cannot have a null value. Specify a value for the custom field. |
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendingList"> (optional)</param>
/// <returns>Task of BulkSendingList</returns>
System.Threading.Tasks.Task<BulkSendingList> CreateBulkSendListAsync(string accountId, BulkSendingList bulkSendingList = null);
/// <summary>
/// Creates a new bulk send list
/// </summary>
/// <remarks>
/// This method creates a bulk send list that you can use to send an envelope to up to 1,000 recipients at once. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/) ### Errors | Error code | Description | | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | | BULK_SEND_MAX_COPIES_EXCEEDED | A bulk sending list cannot specify more than XXX copies in the mailing list. Call the settings API endpoint to find the maximum number of copies in a batch allowed for your account. In almost all cases, the default limit is 1000. | | BULK_SEND_RECIPIENT_IDS_MUST_BE_UNIQUE | No two recipientIds can be same within a bulkCopy. Same restriction as a regular envelope applies. Specify unique recipient IDs for each recipient within a bulkCopy (model for envelope in mailing list). | | BULK_SEND_RECIPIENT_ID_REQUIRED | If no RoleName is present, recipientID is required in mailing list's bulkCopy. Add a roleName (that coalesces with template/envelope) or a recipientID. | | BULK_SEND_RECIPIENT_NAME_REQUIRED | Recipient {0} has no name. Specify a name for the recipient. | | BULK_SEND_EMAIL_ADDRESS_REQUIRED_FOR_EMAIL_RECIPIENT | Recipient {0} is an email recipient with no email address. Specify an email for the email recipient. | | BULK_SEND_FAX_NUMBER_REQUIRED_FOR_FAX_RECIPIENT | Recipient {0} is a fax recipient with no fax number. Specify a fax number for the fax recipient. | | BULK_SEND_FAX_NUMBER_NOT_VALID | Recipient {0} specifies fax number {1}, which is not valid. Specify a valid fax number for the fax recipient. | | BULK_SEND_EMAIL_ADDRESS_NOT_VALID | Recipient {0} specifies email address {1}, which is not a valid email address. Specify a valid email address for the recipient. | | BULK_SEND_PHONE_NUMBER_REQURED_FOR_SMS_AUTH | Recipient {0} specifies SMS auth, but no number was provided. Specify a phone number for the SMS auth recipient. | | BULK_SEND_PHONE_NUMBER_INVALID_FOR_SMS_AUTH | Recipient {0} specifies phone number {1} for SMS auth, which is not valid. Specify a valid phone number for the SMS auth recipient. | | BULK_SEND_ROLE_NAMES_MUST_BE_UNIQUE | Recipient role names cannot be duplicated; role {duplicateRecipientRole} appears multiple times. Use unique roleNames for recipients. | | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_ON_SAME_RECIPIENT | Recipients cannot have both ID and Role; {0} has both. Specify a roleName or recipientId, but not both for the same recipient. | | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_IN_SAME_LIST | Cannot use both recipient role and ID in the same list. Specify a roleName or recipientId, but not both in the same list. | | BULK_SEND_INVALID_ID_CHECK_CONFIGURATION | Recipient {0} specified SMS authentication, but no SMS auth settings were provided. Provide an SMS auth setting (proper ID configuration) if SMS auth is specified. | | BULK_SEND_INVALID_SBS_INPUT_CONFIGURATION | Recipient {0} has more than one signature provider specified. Or signingProviderName is not specified. Or Signature provider : {0} is either unknown or not an available pen for this account. One or more SBS configuration is missing or invalid. The error details provide specifics. | | BULK_SEND_TAB_LABELS_MUST_BE_UNIQUE | Tab label {0} is duplicated. Needs to be unique. Use a unique tab label. | | BULK_SEND_TAB_LABEL_REQUIRED | Tab label is required. Specify a tab label. | | BULK_SEND_TAB_VALUE_REQUIRED | Tab Label value is required. Specify a value for the tab label. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_MUST_BE_UNIQUE | Custom fields must have distinct names. The field {0} appears more than once in a copy. Use unique names for custom fields. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_REQUIRED | All custom fields must have names. Specify a name for the custom field. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_VALUE_REQUIRED | Custom field {0} has no value. A custom field can have an empty value, but it cannot have a null value. Specify a value for the custom field. |
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendingList"> (optional)</param>
/// <returns>Task of ApiResponse (BulkSendingList)</returns>
System.Threading.Tasks.Task<ApiResponse<BulkSendingList>> CreateBulkSendListAsyncWithHttpInfo(string accountId, BulkSendingList bulkSendingList = null);
/// <summary>
/// Uses the specified bulk send list to send the envelope specified in the payload
/// </summary>
/// <remarks>
/// This method initiates the bulk send process. It generates a bulk send request based on an [existing bulk send list][create_list] and an envelope or template. Consider using the [BulkSend::createBulkSendTestRequest][create_test] method to test your bulk send list for compatibility with the envelope or template that you want to send first. To learn about the complete bulk send flow, see the [Bulk Send overview][BulkSendOverview]. If the envelopes were successfully queued for asynchronous processing, the response contains a `batchId` that you can use to get the status of the batch. If a failure occurs, the API returns an error message. **Note:** Partial success or failure generally does not occur. Only the entire batch is queued for asynchronous processing. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/) ### Errors This method returns the following errors: | Error code | Description | | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | | BULK_SEND_ENVELOPE_NOT_IN_SENDABLE_STATE | Envelope {0} is not in a sendable state. The envelope is not complete. Make sure it has a sendable status, such as `created`. | | BULK_SEND_ENVELOPE_LIST_CONTAINS_NO_COPIES | Cannot send an envelope with a bulk sending list which contains no copies. The list you're trying to bulk send is empty. Make sure the bulk sending list you're using contains recipients. | | BULK_SEND_ENVELOPE_LIST_CONTAINS_TOO_MANY_COPIES | Bulk sending list contains more than {0} copies. The list you're trying to bulk send will cause your account to exceed the 1,000-copy limit imposed for all accounts. Try sending two or more separate lists. | | BULK_SEND_ENVELOPE_CANNOT_BE_NULL | Cannot send a bulk list without an envelope. Specify the envelope ID or template ID for the envelope you want to bulk send. | | BULK_SEND_BLOB_STORE_ERROR | Could not save copy of bulk sending list. An error writing to the database occurred. Try again. If the error persists, contact DocuSign Support. | | BULK_SEND_ACCOUNT_HAS_TOO_MANY_QUEUED_ENVELOPES | Cannot send this bulk sending list because doing so would exceed the maximum of {maxCopies} in-flight envelopes. This account currently has {unprocessedEnvelopes} envelopes waiting to be processed. Please try again later.\" .Try again later, or contact DocuSign Support to request a higher tier. | | BULK_SEND_ENVELOPE_NOT_FOUND | Envelope {envelopeOrTemplateId} does not exist or you do not have permission to access it. The envelopeId or templateId specified could not be found. Specify a valid value. | | BULK_SEND_LIST_NOT_FOUND | Bulk Sending list {listId} does not exist or you do not have permission to access it. The mailingListId specified could not be found. Specify a valid value. | | BULK_SEND_ENVELOPE_HAS_NO_RECIPIENTS | Bulk sending copy contains recipients, but the specified envelope does not. The recipients on the envelope and the bulk send list do not match. Make sure the envelope and list are compatible for sending. | | BULK_SEND_RECIPIENT_ID_DOES_NOT_EXIST_IN_ENVELOPE | Recipient {0} does not exist in the envelope. Add the missing recipient to the envelope. | | BULK_SEND_RECIPIENT_ID_DOES_NOT_MATCH | Recipient ID {envelopeMember.ID} does not match. Make sure the recipient information in the list and the envelope match up. | | BULK_SEND_ENVELOPE_HAS_BULK_RECIPIENT | Recipient {0} is a bulk recipient. This is not supported. No legacy 'bulk recipient' allowed. In v2.1 of the eSignature API, you must use a bulk send list instead of a bulk recipient. See the API documentation for details. | | BULK_SEND_RECIPIENT_ROLE_DOES_NOT_MATCH | Recipient Role {envelopeMember.RoleName} does not match. Make sure the recipient information in the list and the envelope is compatible. | | BULK_SEND_DUPLICATE_RECIPIENT_DETECTED | Duplicate recipients ({0}) not allowed, unless recipients have unique routing order specified on envelope. | | BULK_SEND_ENVELOPE_HAS_NO_TABS | Bulk sending copy contains tabs, but the specified envelope does not. List and envelope tabs cannot be coalesced. Make sure they are compatible for sending. | | BULK_SEND_TAB_LABEL_DOES_NOT_EXIST_IN_ENVELOPE | Tab with label {0} does not exist in envelope. Add the tab label to the envelope, remove the label from the list, or make sure you're specifying the correct list and envelope. | | BULK_SEND_TAB_DOES_NOT_MATCH | Tab {0} does not match {0} in envelope. A tab exists on the list that does not match or is missing on the envelope. Make sure the tabs on the list and the envelope match. | | BULK_SEND_ENVELOPE_HAS_NO_ENVELOPE_CUSTOM_FIELDS | Bulk sending copy contains custom fields, but the specified envelope does not. There are custom fields on the list that the envelope does not have. Make sure that any custom fields on the list and the envelope match. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_DOES_NOT_EXIST_IN_ENVELOPE | Custom field {0} does not exist in the envelope. Either add the custom field on the list to the envelope, remove the custom field from the list, or make sure you're specifying the correct list and envelope. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_DOES_NOT_MATCH | Custom field names must match. {0} and {1} do not match. The custom field names on the list and the envelope do not match. Use identical names for both. | [create_list]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendlist/ [create_test]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendtestrequest/ [BulkSendOverview]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendRequest"> (optional)</param>
/// <returns>Task of BulkSendResponse</returns>
System.Threading.Tasks.Task<BulkSendResponse> CreateBulkSendRequestAsync(string accountId, string bulkSendListId, BulkSendRequest bulkSendRequest = null);
/// <summary>
/// Uses the specified bulk send list to send the envelope specified in the payload
/// </summary>
/// <remarks>
/// This method initiates the bulk send process. It generates a bulk send request based on an [existing bulk send list][create_list] and an envelope or template. Consider using the [BulkSend::createBulkSendTestRequest][create_test] method to test your bulk send list for compatibility with the envelope or template that you want to send first. To learn about the complete bulk send flow, see the [Bulk Send overview][BulkSendOverview]. If the envelopes were successfully queued for asynchronous processing, the response contains a `batchId` that you can use to get the status of the batch. If a failure occurs, the API returns an error message. **Note:** Partial success or failure generally does not occur. Only the entire batch is queued for asynchronous processing. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/) ### Errors This method returns the following errors: | Error code | Description | | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | | BULK_SEND_ENVELOPE_NOT_IN_SENDABLE_STATE | Envelope {0} is not in a sendable state. The envelope is not complete. Make sure it has a sendable status, such as `created`. | | BULK_SEND_ENVELOPE_LIST_CONTAINS_NO_COPIES | Cannot send an envelope with a bulk sending list which contains no copies. The list you're trying to bulk send is empty. Make sure the bulk sending list you're using contains recipients. | | BULK_SEND_ENVELOPE_LIST_CONTAINS_TOO_MANY_COPIES | Bulk sending list contains more than {0} copies. The list you're trying to bulk send will cause your account to exceed the 1,000-copy limit imposed for all accounts. Try sending two or more separate lists. | | BULK_SEND_ENVELOPE_CANNOT_BE_NULL | Cannot send a bulk list without an envelope. Specify the envelope ID or template ID for the envelope you want to bulk send. | | BULK_SEND_BLOB_STORE_ERROR | Could not save copy of bulk sending list. An error writing to the database occurred. Try again. If the error persists, contact DocuSign Support. | | BULK_SEND_ACCOUNT_HAS_TOO_MANY_QUEUED_ENVELOPES | Cannot send this bulk sending list because doing so would exceed the maximum of {maxCopies} in-flight envelopes. This account currently has {unprocessedEnvelopes} envelopes waiting to be processed. Please try again later.\" .Try again later, or contact DocuSign Support to request a higher tier. | | BULK_SEND_ENVELOPE_NOT_FOUND | Envelope {envelopeOrTemplateId} does not exist or you do not have permission to access it. The envelopeId or templateId specified could not be found. Specify a valid value. | | BULK_SEND_LIST_NOT_FOUND | Bulk Sending list {listId} does not exist or you do not have permission to access it. The mailingListId specified could not be found. Specify a valid value. | | BULK_SEND_ENVELOPE_HAS_NO_RECIPIENTS | Bulk sending copy contains recipients, but the specified envelope does not. The recipients on the envelope and the bulk send list do not match. Make sure the envelope and list are compatible for sending. | | BULK_SEND_RECIPIENT_ID_DOES_NOT_EXIST_IN_ENVELOPE | Recipient {0} does not exist in the envelope. Add the missing recipient to the envelope. | | BULK_SEND_RECIPIENT_ID_DOES_NOT_MATCH | Recipient ID {envelopeMember.ID} does not match. Make sure the recipient information in the list and the envelope match up. | | BULK_SEND_ENVELOPE_HAS_BULK_RECIPIENT | Recipient {0} is a bulk recipient. This is not supported. No legacy 'bulk recipient' allowed. In v2.1 of the eSignature API, you must use a bulk send list instead of a bulk recipient. See the API documentation for details. | | BULK_SEND_RECIPIENT_ROLE_DOES_NOT_MATCH | Recipient Role {envelopeMember.RoleName} does not match. Make sure the recipient information in the list and the envelope is compatible. | | BULK_SEND_DUPLICATE_RECIPIENT_DETECTED | Duplicate recipients ({0}) not allowed, unless recipients have unique routing order specified on envelope. | | BULK_SEND_ENVELOPE_HAS_NO_TABS | Bulk sending copy contains tabs, but the specified envelope does not. List and envelope tabs cannot be coalesced. Make sure they are compatible for sending. | | BULK_SEND_TAB_LABEL_DOES_NOT_EXIST_IN_ENVELOPE | Tab with label {0} does not exist in envelope. Add the tab label to the envelope, remove the label from the list, or make sure you're specifying the correct list and envelope. | | BULK_SEND_TAB_DOES_NOT_MATCH | Tab {0} does not match {0} in envelope. A tab exists on the list that does not match or is missing on the envelope. Make sure the tabs on the list and the envelope match. | | BULK_SEND_ENVELOPE_HAS_NO_ENVELOPE_CUSTOM_FIELDS | Bulk sending copy contains custom fields, but the specified envelope does not. There are custom fields on the list that the envelope does not have. Make sure that any custom fields on the list and the envelope match. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_DOES_NOT_EXIST_IN_ENVELOPE | Custom field {0} does not exist in the envelope. Either add the custom field on the list to the envelope, remove the custom field from the list, or make sure you're specifying the correct list and envelope. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_DOES_NOT_MATCH | Custom field names must match. {0} and {1} do not match. The custom field names on the list and the envelope do not match. Use identical names for both. | [create_list]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendlist/ [create_test]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendtestrequest/ [BulkSendOverview]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendRequest"> (optional)</param>
/// <returns>Task of ApiResponse (BulkSendResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<BulkSendResponse>> CreateBulkSendRequestAsyncWithHttpInfo(string accountId, string bulkSendListId, BulkSendRequest bulkSendRequest = null);
/// <summary>
/// Tests whether the specified bulk sending list can be used to send an envelope
/// </summary>
/// <remarks>
/// This method tests a bulk send list for compatibility with the envelope or template that you want to send. For example, a template that has three roles is not compatible with a bulk send list that has only two recipients. For this reason, you might want to test compatibility first. A successful test result returns `true` for the `canBeSent` property. An unsuccessful test returns a JSON response that contains information about the errors that occurred. If the test is successful, you can then send the envelope or template by using the [BulkSend::createBulkSendRequest][BulkSendRequest] method. ## Envelope Compatibility Checks This section describes the envelope compatibility checks that the system performs. **Top-Level Issues** - Envelopes must be in a sendable state. - The bulk send list must contain at least one copy (instance of an envelope), and no more than the maximum number of copies allowed for the account. - The envelope must not be null and must be visible to the current user. - The account cannot have more queued envelopes than the maximum number configured for the account. - The bulk send list must exist. **Recipients** - The envelope must have recipients. - If you are using an envelope, all of the recipients defined in the bulk send list must have corresponding recipient IDs in the envelope definition. If you are using a template, you must either match the recipient IDs or role IDs. - The envelope cannot contain a bulk recipient (an artifact of the legacy version of DocuSign's bulk send functionality). **Recipient Tabs** - Every `recipient ID, tab label` pair in the bulk send list must correspond to a tab in the envelope. **Custom Fields** - Each envelope-level custom field in the bulk send list must correspond to the name of a `customField` in the envelope definition. You do not have to match the recipient-level custom fields. [BulkSendRequest]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendrequest/
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendRequest"> (optional)</param>
/// <returns>Task of BulkSendTestResponse</returns>
System.Threading.Tasks.Task<BulkSendTestResponse> CreateBulkSendTestRequestAsync(string accountId, string bulkSendListId, BulkSendRequest bulkSendRequest = null);
/// <summary>
/// Tests whether the specified bulk sending list can be used to send an envelope
/// </summary>
/// <remarks>
/// This method tests a bulk send list for compatibility with the envelope or template that you want to send. For example, a template that has three roles is not compatible with a bulk send list that has only two recipients. For this reason, you might want to test compatibility first. A successful test result returns `true` for the `canBeSent` property. An unsuccessful test returns a JSON response that contains information about the errors that occurred. If the test is successful, you can then send the envelope or template by using the [BulkSend::createBulkSendRequest][BulkSendRequest] method. ## Envelope Compatibility Checks This section describes the envelope compatibility checks that the system performs. **Top-Level Issues** - Envelopes must be in a sendable state. - The bulk send list must contain at least one copy (instance of an envelope), and no more than the maximum number of copies allowed for the account. - The envelope must not be null and must be visible to the current user. - The account cannot have more queued envelopes than the maximum number configured for the account. - The bulk send list must exist. **Recipients** - The envelope must have recipients. - If you are using an envelope, all of the recipients defined in the bulk send list must have corresponding recipient IDs in the envelope definition. If you are using a template, you must either match the recipient IDs or role IDs. - The envelope cannot contain a bulk recipient (an artifact of the legacy version of DocuSign's bulk send functionality). **Recipient Tabs** - Every `recipient ID, tab label` pair in the bulk send list must correspond to a tab in the envelope. **Custom Fields** - Each envelope-level custom field in the bulk send list must correspond to the name of a `customField` in the envelope definition. You do not have to match the recipient-level custom fields. [BulkSendRequest]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendrequest/
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendRequest"> (optional)</param>
/// <returns>Task of ApiResponse (BulkSendTestResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<BulkSendTestResponse>> CreateBulkSendTestRequestAsyncWithHttpInfo(string accountId, string bulkSendListId, BulkSendRequest bulkSendRequest = null);
/// <summary>
/// Deletes an existing bulk send list
/// </summary>
/// <remarks>
/// This method deletes a bulk send list.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <returns>Task of BulkSendingListSummaries</returns>
System.Threading.Tasks.Task<BulkSendingListSummaries> DeleteBulkSendListAsync(string accountId, string bulkSendListId);
/// <summary>
/// Deletes an existing bulk send list
/// </summary>
/// <remarks>
/// This method deletes a bulk send list.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <returns>Task of ApiResponse (BulkSendingListSummaries)</returns>
System.Threading.Tasks.Task<ApiResponse<BulkSendingListSummaries>> DeleteBulkSendListAsyncWithHttpInfo(string accountId, string bulkSendListId);
/// <summary>
/// Gets envelopes from a specific bulk send batch
/// </summary>
/// <remarks>
/// This method returns a list of envelopes in a specified bulk batch. Use the query parameters to filter and sort the envelopes by different attributes.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendBatchId"></param>
/// <param name="options">Options for modifying the behavior of the function.</param>
/// <returns>Task of EnvelopesInformation</returns>
System.Threading.Tasks.Task<EnvelopesInformation> GetBulkSendBatchEnvelopesAsync(string accountId, string bulkSendBatchId, BulkEnvelopesApi.GetBulkSendBatchEnvelopesOptions options = null);
/// <summary>
/// Gets envelopes from a specific bulk send batch
/// </summary>
/// <remarks>
/// This method returns a list of envelopes in a specified bulk batch. Use the query parameters to filter and sort the envelopes by different attributes.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendBatchId"></param>
/// <param name="options">Options for modifying the behavior of the function.</param>
/// <returns>Task of ApiResponse (EnvelopesInformation)</returns>
System.Threading.Tasks.Task<ApiResponse<EnvelopesInformation>> GetBulkSendBatchEnvelopesAsyncWithHttpInfo(string accountId, string bulkSendBatchId, BulkEnvelopesApi.GetBulkSendBatchEnvelopesOptions options = null);
/// <summary>
/// Gets a specific bulk send batch status
/// </summary>
/// <remarks>
/// Gets the general status of a specific bulk send batch such as: - number of successes - number pending - number of errors The `bulkErrors` property of the response object contains more information about the errors. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/)
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendBatchId"></param>
/// <returns>Task of BulkSendBatchStatus</returns>
System.Threading.Tasks.Task<BulkSendBatchStatus> GetBulkSendBatchStatusAsync(string accountId, string bulkSendBatchId);
/// <summary>
/// Gets a specific bulk send batch status
/// </summary>
/// <remarks>
/// Gets the general status of a specific bulk send batch such as: - number of successes - number pending - number of errors The `bulkErrors` property of the response object contains more information about the errors. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/)
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendBatchId"></param>
/// <returns>Task of ApiResponse (BulkSendBatchStatus)</returns>
System.Threading.Tasks.Task<ApiResponse<BulkSendBatchStatus>> GetBulkSendBatchStatusAsyncWithHttpInfo(string accountId, string bulkSendBatchId);
/// <summary>
/// Returns a list of bulk send batch satuses initiated by account.
/// </summary>
/// <remarks>
/// Returns a summary of bulk send batches. Use the `batch_ids` query parameter to narrow the list of batches.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="options">Options for modifying the behavior of the function.</param>
/// <returns>Task of BulkSendBatchSummaries</returns>
System.Threading.Tasks.Task<BulkSendBatchSummaries> GetBulkSendBatchesAsync(string accountId, BulkEnvelopesApi.GetBulkSendBatchesOptions options = null);
/// <summary>
/// Returns a list of bulk send batch satuses initiated by account.
/// </summary>
/// <remarks>
/// Returns a summary of bulk send batches. Use the `batch_ids` query parameter to narrow the list of batches.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="options">Options for modifying the behavior of the function.</param>
/// <returns>Task of ApiResponse (BulkSendBatchSummaries)</returns>
System.Threading.Tasks.Task<ApiResponse<BulkSendBatchSummaries>> GetBulkSendBatchesAsyncWithHttpInfo(string accountId, BulkEnvelopesApi.GetBulkSendBatchesOptions options = null);
/// <summary>
/// Gets a specific bulk send list
/// </summary>
/// <remarks>
/// This method returns all of the details associated with a specific bulk send list that belongs to the current user.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <returns>Task of BulkSendingList</returns>
System.Threading.Tasks.Task<BulkSendingList> GetBulkSendListAsync(string accountId, string bulkSendListId);
/// <summary>
/// Gets a specific bulk send list
/// </summary>
/// <remarks>
/// This method returns all of the details associated with a specific bulk send list that belongs to the current user.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <returns>Task of ApiResponse (BulkSendingList)</returns>
System.Threading.Tasks.Task<ApiResponse<BulkSendingList>> GetBulkSendListAsyncWithHttpInfo(string accountId, string bulkSendListId);
/// <summary>
/// Lists top-level details for all bulk send lists visible to the current user
/// </summary>
/// <remarks>
/// This method returns a list of bulk send lists belonging to the current user, as well as basic information about each list.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <returns>Task of BulkSendingListSummaries</returns>
System.Threading.Tasks.Task<BulkSendingListSummaries> GetBulkSendListsAsync(string accountId);
/// <summary>
/// Lists top-level details for all bulk send lists visible to the current user
/// </summary>
/// <remarks>
/// This method returns a list of bulk send lists belonging to the current user, as well as basic information about each list.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <returns>Task of ApiResponse (BulkSendingListSummaries)</returns>
System.Threading.Tasks.Task<ApiResponse<BulkSendingListSummaries>> GetBulkSendListsAsyncWithHttpInfo(string accountId);
/// <summary>
/// Initiate a specific bulk send batch action
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendBatchId"></param>
/// <param name="bulkAction"></param>
/// <param name="bulkSendBatchActionRequest"> (optional)</param>
/// <returns>Task of BulkSendBatchStatus</returns>
System.Threading.Tasks.Task<BulkSendBatchStatus> UpdateBulkSendBatchActionAsync(string accountId, string bulkSendBatchId, string bulkAction, BulkSendBatchActionRequest bulkSendBatchActionRequest = null);
/// <summary>
/// Initiate a specific bulk send batch action
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendBatchId"></param>
/// <param name="bulkAction"></param>
/// <param name="bulkSendBatchActionRequest"> (optional)</param>
/// <returns>Task of ApiResponse (BulkSendBatchStatus)</returns>
System.Threading.Tasks.Task<ApiResponse<BulkSendBatchStatus>> UpdateBulkSendBatchActionAsyncWithHttpInfo(string accountId, string bulkSendBatchId, string bulkAction, BulkSendBatchActionRequest bulkSendBatchActionRequest = null);
/// <summary>
/// Put/Update a specific bulk send batch status
/// </summary>
/// <remarks>
/// Updates a specific bulk send batch status.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendBatchId"></param>
/// <param name="bulkSendBatchRequest"> (optional)</param>
/// <returns>Task of BulkSendBatchStatus</returns>
System.Threading.Tasks.Task<BulkSendBatchStatus> UpdateBulkSendBatchStatusAsync(string accountId, string bulkSendBatchId, BulkSendBatchRequest bulkSendBatchRequest = null);
/// <summary>
/// Put/Update a specific bulk send batch status
/// </summary>
/// <remarks>
/// Updates a specific bulk send batch status.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendBatchId"></param>
/// <param name="bulkSendBatchRequest"> (optional)</param>
/// <returns>Task of ApiResponse (BulkSendBatchStatus)</returns>
System.Threading.Tasks.Task<ApiResponse<BulkSendBatchStatus>> UpdateBulkSendBatchStatusAsyncWithHttpInfo(string accountId, string bulkSendBatchId, BulkSendBatchRequest bulkSendBatchRequest = null);
/// <summary>
/// Updates an existing bulk send list. If send_envelope query string value is provided, will accept an empty payload and try to send the specified envelope
/// </summary>
/// <remarks>
/// This method replaces the definition of an existing bulk send list.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendingList"> (optional)</param>
/// <returns>Task of BulkSendingList</returns>
System.Threading.Tasks.Task<BulkSendingList> UpdateBulkSendListAsync(string accountId, string bulkSendListId, BulkSendingList bulkSendingList = null);
/// <summary>
/// Updates an existing bulk send list. If send_envelope query string value is provided, will accept an empty payload and try to send the specified envelope
/// </summary>
/// <remarks>
/// This method replaces the definition of an existing bulk send list.
/// </remarks>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendingList"> (optional)</param>
/// <returns>Task of ApiResponse (BulkSendingList)</returns>
System.Threading.Tasks.Task<ApiResponse<BulkSendingList>> UpdateBulkSendListAsyncWithHttpInfo(string accountId, string bulkSendListId, BulkSendingList bulkSendingList = null);
#endregion Asynchronous Operations
}
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public partial class BulkEnvelopesApi : IBulkEnvelopesApi
{
private DocuSign.eSign.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
/// <summary>
/// Initializes a new instance of the <see cref="BulkEnvelopesApi"/> class
/// using AplClient object
/// </summary>
/// <param name="aplClient">An instance of AplClient</param>
/// <returns></returns>
public BulkEnvelopesApi(DocuSignClient aplClient)
{
this.ApiClient = aplClient;
ExceptionFactory = Configuration.DefaultExceptionFactory;
}
/// <summary>
/// Gets the base path of the API client.
/// </summary>
/// <value>The base path</value>
public String GetBasePath()
{
return this.ApiClient.GetBasePath();
}
/// <summary>
/// Gets or sets the ApiClient object
/// </summary>
/// <value>An instance of the ApiClient</value>
public DocuSignClient ApiClient { get; set; }
/// <summary>
/// Provides a factory method hook for the creation of exceptions.
/// </summary>
public DocuSign.eSign.Client.ExceptionFactory ExceptionFactory
{
get
{
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
{
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
}
return _exceptionFactory;
}
set { _exceptionFactory = value; }
}
/// <summary>
/// Creates a new bulk send list This method creates a bulk send list that you can use to send an envelope to up to 1,000 recipients at once. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/) ### Errors | Error code | Description | | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | | BULK_SEND_MAX_COPIES_EXCEEDED | A bulk sending list cannot specify more than XXX copies in the mailing list. Call the settings API endpoint to find the maximum number of copies in a batch allowed for your account. In almost all cases, the default limit is 1000. | | BULK_SEND_RECIPIENT_IDS_MUST_BE_UNIQUE | No two recipientIds can be same within a bulkCopy. Same restriction as a regular envelope applies. Specify unique recipient IDs for each recipient within a bulkCopy (model for envelope in mailing list). | | BULK_SEND_RECIPIENT_ID_REQUIRED | If no RoleName is present, recipientID is required in mailing list's bulkCopy. Add a roleName (that coalesces with template/envelope) or a recipientID. | | BULK_SEND_RECIPIENT_NAME_REQUIRED | Recipient {0} has no name. Specify a name for the recipient. | | BULK_SEND_EMAIL_ADDRESS_REQUIRED_FOR_EMAIL_RECIPIENT | Recipient {0} is an email recipient with no email address. Specify an email for the email recipient. | | BULK_SEND_FAX_NUMBER_REQUIRED_FOR_FAX_RECIPIENT | Recipient {0} is a fax recipient with no fax number. Specify a fax number for the fax recipient. | | BULK_SEND_FAX_NUMBER_NOT_VALID | Recipient {0} specifies fax number {1}, which is not valid. Specify a valid fax number for the fax recipient. | | BULK_SEND_EMAIL_ADDRESS_NOT_VALID | Recipient {0} specifies email address {1}, which is not a valid email address. Specify a valid email address for the recipient. | | BULK_SEND_PHONE_NUMBER_REQURED_FOR_SMS_AUTH | Recipient {0} specifies SMS auth, but no number was provided. Specify a phone number for the SMS auth recipient. | | BULK_SEND_PHONE_NUMBER_INVALID_FOR_SMS_AUTH | Recipient {0} specifies phone number {1} for SMS auth, which is not valid. Specify a valid phone number for the SMS auth recipient. | | BULK_SEND_ROLE_NAMES_MUST_BE_UNIQUE | Recipient role names cannot be duplicated; role {duplicateRecipientRole} appears multiple times. Use unique roleNames for recipients. | | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_ON_SAME_RECIPIENT | Recipients cannot have both ID and Role; {0} has both. Specify a roleName or recipientId, but not both for the same recipient. | | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_IN_SAME_LIST | Cannot use both recipient role and ID in the same list. Specify a roleName or recipientId, but not both in the same list. | | BULK_SEND_INVALID_ID_CHECK_CONFIGURATION | Recipient {0} specified SMS authentication, but no SMS auth settings were provided. Provide an SMS auth setting (proper ID configuration) if SMS auth is specified. | | BULK_SEND_INVALID_SBS_INPUT_CONFIGURATION | Recipient {0} has more than one signature provider specified. Or signingProviderName is not specified. Or Signature provider : {0} is either unknown or not an available pen for this account. One or more SBS configuration is missing or invalid. The error details provide specifics. | | BULK_SEND_TAB_LABELS_MUST_BE_UNIQUE | Tab label {0} is duplicated. Needs to be unique. Use a unique tab label. | | BULK_SEND_TAB_LABEL_REQUIRED | Tab label is required. Specify a tab label. | | BULK_SEND_TAB_VALUE_REQUIRED | Tab Label value is required. Specify a value for the tab label. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_MUST_BE_UNIQUE | Custom fields must have distinct names. The field {0} appears more than once in a copy. Use unique names for custom fields. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_REQUIRED | All custom fields must have names. Specify a name for the custom field. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_VALUE_REQUIRED | Custom field {0} has no value. A custom field can have an empty value, but it cannot have a null value. Specify a value for the custom field. |
/// </summary>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendingList"> (optional)</param>
/// <returns>BulkSendingList</returns>
public BulkSendingList CreateBulkSendList(string accountId, BulkSendingList bulkSendingList = null)
{
ApiResponse<BulkSendingList> localVarResponse = CreateBulkSendListWithHttpInfo(accountId, bulkSendingList);
return localVarResponse.Data;
}
/// <summary>
/// Creates a new bulk send list This method creates a bulk send list that you can use to send an envelope to up to 1,000 recipients at once. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/) ### Errors | Error code | Description | | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | | BULK_SEND_MAX_COPIES_EXCEEDED | A bulk sending list cannot specify more than XXX copies in the mailing list. Call the settings API endpoint to find the maximum number of copies in a batch allowed for your account. In almost all cases, the default limit is 1000. | | BULK_SEND_RECIPIENT_IDS_MUST_BE_UNIQUE | No two recipientIds can be same within a bulkCopy. Same restriction as a regular envelope applies. Specify unique recipient IDs for each recipient within a bulkCopy (model for envelope in mailing list). | | BULK_SEND_RECIPIENT_ID_REQUIRED | If no RoleName is present, recipientID is required in mailing list's bulkCopy. Add a roleName (that coalesces with template/envelope) or a recipientID. | | BULK_SEND_RECIPIENT_NAME_REQUIRED | Recipient {0} has no name. Specify a name for the recipient. | | BULK_SEND_EMAIL_ADDRESS_REQUIRED_FOR_EMAIL_RECIPIENT | Recipient {0} is an email recipient with no email address. Specify an email for the email recipient. | | BULK_SEND_FAX_NUMBER_REQUIRED_FOR_FAX_RECIPIENT | Recipient {0} is a fax recipient with no fax number. Specify a fax number for the fax recipient. | | BULK_SEND_FAX_NUMBER_NOT_VALID | Recipient {0} specifies fax number {1}, which is not valid. Specify a valid fax number for the fax recipient. | | BULK_SEND_EMAIL_ADDRESS_NOT_VALID | Recipient {0} specifies email address {1}, which is not a valid email address. Specify a valid email address for the recipient. | | BULK_SEND_PHONE_NUMBER_REQURED_FOR_SMS_AUTH | Recipient {0} specifies SMS auth, but no number was provided. Specify a phone number for the SMS auth recipient. | | BULK_SEND_PHONE_NUMBER_INVALID_FOR_SMS_AUTH | Recipient {0} specifies phone number {1} for SMS auth, which is not valid. Specify a valid phone number for the SMS auth recipient. | | BULK_SEND_ROLE_NAMES_MUST_BE_UNIQUE | Recipient role names cannot be duplicated; role {duplicateRecipientRole} appears multiple times. Use unique roleNames for recipients. | | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_ON_SAME_RECIPIENT | Recipients cannot have both ID and Role; {0} has both. Specify a roleName or recipientId, but not both for the same recipient. | | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_IN_SAME_LIST | Cannot use both recipient role and ID in the same list. Specify a roleName or recipientId, but not both in the same list. | | BULK_SEND_INVALID_ID_CHECK_CONFIGURATION | Recipient {0} specified SMS authentication, but no SMS auth settings were provided. Provide an SMS auth setting (proper ID configuration) if SMS auth is specified. | | BULK_SEND_INVALID_SBS_INPUT_CONFIGURATION | Recipient {0} has more than one signature provider specified. Or signingProviderName is not specified. Or Signature provider : {0} is either unknown or not an available pen for this account. One or more SBS configuration is missing or invalid. The error details provide specifics. | | BULK_SEND_TAB_LABELS_MUST_BE_UNIQUE | Tab label {0} is duplicated. Needs to be unique. Use a unique tab label. | | BULK_SEND_TAB_LABEL_REQUIRED | Tab label is required. Specify a tab label. | | BULK_SEND_TAB_VALUE_REQUIRED | Tab Label value is required. Specify a value for the tab label. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_MUST_BE_UNIQUE | Custom fields must have distinct names. The field {0} appears more than once in a copy. Use unique names for custom fields. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_REQUIRED | All custom fields must have names. Specify a name for the custom field. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_VALUE_REQUIRED | Custom field {0} has no value. A custom field can have an empty value, but it cannot have a null value. Specify a value for the custom field. |
/// </summary>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendingList"> (optional)</param>
/// <returns>ApiResponse of BulkSendingList</returns>
public ApiResponse<BulkSendingList> CreateBulkSendListWithHttpInfo(string accountId, BulkSendingList bulkSendingList = null)
{
return CreateBulkSendListAsyncWithHttpInfo(accountId, bulkSendingList)
.ConfigureAwait(false)
.GetAwaiter()
.GetResult();
}
/// <summary>
/// Creates a new bulk send list This method creates a bulk send list that you can use to send an envelope to up to 1,000 recipients at once. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/) ### Errors | Error code | Description | | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | | BULK_SEND_MAX_COPIES_EXCEEDED | A bulk sending list cannot specify more than XXX copies in the mailing list. Call the settings API endpoint to find the maximum number of copies in a batch allowed for your account. In almost all cases, the default limit is 1000. | | BULK_SEND_RECIPIENT_IDS_MUST_BE_UNIQUE | No two recipientIds can be same within a bulkCopy. Same restriction as a regular envelope applies. Specify unique recipient IDs for each recipient within a bulkCopy (model for envelope in mailing list). | | BULK_SEND_RECIPIENT_ID_REQUIRED | If no RoleName is present, recipientID is required in mailing list's bulkCopy. Add a roleName (that coalesces with template/envelope) or a recipientID. | | BULK_SEND_RECIPIENT_NAME_REQUIRED | Recipient {0} has no name. Specify a name for the recipient. | | BULK_SEND_EMAIL_ADDRESS_REQUIRED_FOR_EMAIL_RECIPIENT | Recipient {0} is an email recipient with no email address. Specify an email for the email recipient. | | BULK_SEND_FAX_NUMBER_REQUIRED_FOR_FAX_RECIPIENT | Recipient {0} is a fax recipient with no fax number. Specify a fax number for the fax recipient. | | BULK_SEND_FAX_NUMBER_NOT_VALID | Recipient {0} specifies fax number {1}, which is not valid. Specify a valid fax number for the fax recipient. | | BULK_SEND_EMAIL_ADDRESS_NOT_VALID | Recipient {0} specifies email address {1}, which is not a valid email address. Specify a valid email address for the recipient. | | BULK_SEND_PHONE_NUMBER_REQURED_FOR_SMS_AUTH | Recipient {0} specifies SMS auth, but no number was provided. Specify a phone number for the SMS auth recipient. | | BULK_SEND_PHONE_NUMBER_INVALID_FOR_SMS_AUTH | Recipient {0} specifies phone number {1} for SMS auth, which is not valid. Specify a valid phone number for the SMS auth recipient. | | BULK_SEND_ROLE_NAMES_MUST_BE_UNIQUE | Recipient role names cannot be duplicated; role {duplicateRecipientRole} appears multiple times. Use unique roleNames for recipients. | | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_ON_SAME_RECIPIENT | Recipients cannot have both ID and Role; {0} has both. Specify a roleName or recipientId, but not both for the same recipient. | | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_IN_SAME_LIST | Cannot use both recipient role and ID in the same list. Specify a roleName or recipientId, but not both in the same list. | | BULK_SEND_INVALID_ID_CHECK_CONFIGURATION | Recipient {0} specified SMS authentication, but no SMS auth settings were provided. Provide an SMS auth setting (proper ID configuration) if SMS auth is specified. | | BULK_SEND_INVALID_SBS_INPUT_CONFIGURATION | Recipient {0} has more than one signature provider specified. Or signingProviderName is not specified. Or Signature provider : {0} is either unknown or not an available pen for this account. One or more SBS configuration is missing or invalid. The error details provide specifics. | | BULK_SEND_TAB_LABELS_MUST_BE_UNIQUE | Tab label {0} is duplicated. Needs to be unique. Use a unique tab label. | | BULK_SEND_TAB_LABEL_REQUIRED | Tab label is required. Specify a tab label. | | BULK_SEND_TAB_VALUE_REQUIRED | Tab Label value is required. Specify a value for the tab label. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_MUST_BE_UNIQUE | Custom fields must have distinct names. The field {0} appears more than once in a copy. Use unique names for custom fields. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_REQUIRED | All custom fields must have names. Specify a name for the custom field. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_VALUE_REQUIRED | Custom field {0} has no value. A custom field can have an empty value, but it cannot have a null value. Specify a value for the custom field. |
/// </summary>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendingList"> (optional)</param>
/// <returns>Task of BulkSendingList</returns>
public async System.Threading.Tasks.Task<BulkSendingList> CreateBulkSendListAsync(string accountId, BulkSendingList bulkSendingList = null, System.Threading.CancellationToken cancellationToken = default)
{
ApiResponse<BulkSendingList> localVarResponse = await CreateBulkSendListAsyncWithHttpInfo(accountId, bulkSendingList);
return localVarResponse.Data;
}
/// <summary>
/// Creates a new bulk send list This method creates a bulk send list that you can use to send an envelope to up to 1,000 recipients at once. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/) ### Errors | Error code | Description | | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | | BULK_SEND_MAX_COPIES_EXCEEDED | A bulk sending list cannot specify more than XXX copies in the mailing list. Call the settings API endpoint to find the maximum number of copies in a batch allowed for your account. In almost all cases, the default limit is 1000. | | BULK_SEND_RECIPIENT_IDS_MUST_BE_UNIQUE | No two recipientIds can be same within a bulkCopy. Same restriction as a regular envelope applies. Specify unique recipient IDs for each recipient within a bulkCopy (model for envelope in mailing list). | | BULK_SEND_RECIPIENT_ID_REQUIRED | If no RoleName is present, recipientID is required in mailing list's bulkCopy. Add a roleName (that coalesces with template/envelope) or a recipientID. | | BULK_SEND_RECIPIENT_NAME_REQUIRED | Recipient {0} has no name. Specify a name for the recipient. | | BULK_SEND_EMAIL_ADDRESS_REQUIRED_FOR_EMAIL_RECIPIENT | Recipient {0} is an email recipient with no email address. Specify an email for the email recipient. | | BULK_SEND_FAX_NUMBER_REQUIRED_FOR_FAX_RECIPIENT | Recipient {0} is a fax recipient with no fax number. Specify a fax number for the fax recipient. | | BULK_SEND_FAX_NUMBER_NOT_VALID | Recipient {0} specifies fax number {1}, which is not valid. Specify a valid fax number for the fax recipient. | | BULK_SEND_EMAIL_ADDRESS_NOT_VALID | Recipient {0} specifies email address {1}, which is not a valid email address. Specify a valid email address for the recipient. | | BULK_SEND_PHONE_NUMBER_REQURED_FOR_SMS_AUTH | Recipient {0} specifies SMS auth, but no number was provided. Specify a phone number for the SMS auth recipient. | | BULK_SEND_PHONE_NUMBER_INVALID_FOR_SMS_AUTH | Recipient {0} specifies phone number {1} for SMS auth, which is not valid. Specify a valid phone number for the SMS auth recipient. | | BULK_SEND_ROLE_NAMES_MUST_BE_UNIQUE | Recipient role names cannot be duplicated; role {duplicateRecipientRole} appears multiple times. Use unique roleNames for recipients. | | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_ON_SAME_RECIPIENT | Recipients cannot have both ID and Role; {0} has both. Specify a roleName or recipientId, but not both for the same recipient. | | BULK_SEND_CANNOT_USE_BOTH_ROLE_AND_ID_IN_SAME_LIST | Cannot use both recipient role and ID in the same list. Specify a roleName or recipientId, but not both in the same list. | | BULK_SEND_INVALID_ID_CHECK_CONFIGURATION | Recipient {0} specified SMS authentication, but no SMS auth settings were provided. Provide an SMS auth setting (proper ID configuration) if SMS auth is specified. | | BULK_SEND_INVALID_SBS_INPUT_CONFIGURATION | Recipient {0} has more than one signature provider specified. Or signingProviderName is not specified. Or Signature provider : {0} is either unknown or not an available pen for this account. One or more SBS configuration is missing or invalid. The error details provide specifics. | | BULK_SEND_TAB_LABELS_MUST_BE_UNIQUE | Tab label {0} is duplicated. Needs to be unique. Use a unique tab label. | | BULK_SEND_TAB_LABEL_REQUIRED | Tab label is required. Specify a tab label. | | BULK_SEND_TAB_VALUE_REQUIRED | Tab Label value is required. Specify a value for the tab label. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_MUST_BE_UNIQUE | Custom fields must have distinct names. The field {0} appears more than once in a copy. Use unique names for custom fields. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_REQUIRED | All custom fields must have names. Specify a name for the custom field. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_VALUE_REQUIRED | Custom field {0} has no value. A custom field can have an empty value, but it cannot have a null value. Specify a value for the custom field. |
/// </summary>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendingList"> (optional)</param>
/// <returns>Task of ApiResponse (BulkSendingList)</returns>
public async System.Threading.Tasks.Task<ApiResponse<BulkSendingList>> CreateBulkSendListAsyncWithHttpInfo(string accountId, BulkSendingList bulkSendingList = null, System.Threading.CancellationToken cancellationToken = default)
{
// verify the required parameter 'accountId' is set
if (accountId == null)
throw new ApiException(400, "Missing required parameter 'accountId' when calling BulkEnvelopesApi->CreateBulkSendList");
var localVarPath = "/v2.1/accounts/{accountId}/bulk_send_lists";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(this.ApiClient.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new List<FileParameter>();
Object localVarPostBody = null;
String localVarHttpContentDisposition = string.Empty;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
// set "format" to json by default
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
localVarPathParams.Add("format", "json");
if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter
if (bulkSendingList != null && bulkSendingList.GetType() != typeof(byte[]))
{
localVarPostBody = this.ApiClient.Serialize(bulkSendingList); // http body (model) parameter
}
else
{
localVarPostBody = bulkSendingList; // byte array
}
// authentication (docusignAccessCode) required
// oauth required
if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken;
}
// make the HTTP request
DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, HttpMethod.Post, localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition);
DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest, cancellationToken)
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("CreateBulkSendList", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<BulkSendingList>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(BulkSendingList)this.ApiClient.Deserialize(localVarResponse, typeof(BulkSendingList)));
}
/// <summary>
/// Uses the specified bulk send list to send the envelope specified in the payload This method initiates the bulk send process. It generates a bulk send request based on an [existing bulk send list][create_list] and an envelope or template. Consider using the [BulkSend::createBulkSendTestRequest][create_test] method to test your bulk send list for compatibility with the envelope or template that you want to send first. To learn about the complete bulk send flow, see the [Bulk Send overview][BulkSendOverview]. If the envelopes were successfully queued for asynchronous processing, the response contains a `batchId` that you can use to get the status of the batch. If a failure occurs, the API returns an error message. **Note:** Partial success or failure generally does not occur. Only the entire batch is queued for asynchronous processing. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/) ### Errors This method returns the following errors: | Error code | Description | | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | | BULK_SEND_ENVELOPE_NOT_IN_SENDABLE_STATE | Envelope {0} is not in a sendable state. The envelope is not complete. Make sure it has a sendable status, such as `created`. | | BULK_SEND_ENVELOPE_LIST_CONTAINS_NO_COPIES | Cannot send an envelope with a bulk sending list which contains no copies. The list you're trying to bulk send is empty. Make sure the bulk sending list you're using contains recipients. | | BULK_SEND_ENVELOPE_LIST_CONTAINS_TOO_MANY_COPIES | Bulk sending list contains more than {0} copies. The list you're trying to bulk send will cause your account to exceed the 1,000-copy limit imposed for all accounts. Try sending two or more separate lists. | | BULK_SEND_ENVELOPE_CANNOT_BE_NULL | Cannot send a bulk list without an envelope. Specify the envelope ID or template ID for the envelope you want to bulk send. | | BULK_SEND_BLOB_STORE_ERROR | Could not save copy of bulk sending list. An error writing to the database occurred. Try again. If the error persists, contact DocuSign Support. | | BULK_SEND_ACCOUNT_HAS_TOO_MANY_QUEUED_ENVELOPES | Cannot send this bulk sending list because doing so would exceed the maximum of {maxCopies} in-flight envelopes. This account currently has {unprocessedEnvelopes} envelopes waiting to be processed. Please try again later.\" .Try again later, or contact DocuSign Support to request a higher tier. | | BULK_SEND_ENVELOPE_NOT_FOUND | Envelope {envelopeOrTemplateId} does not exist or you do not have permission to access it. The envelopeId or templateId specified could not be found. Specify a valid value. | | BULK_SEND_LIST_NOT_FOUND | Bulk Sending list {listId} does not exist or you do not have permission to access it. The mailingListId specified could not be found. Specify a valid value. | | BULK_SEND_ENVELOPE_HAS_NO_RECIPIENTS | Bulk sending copy contains recipients, but the specified envelope does not. The recipients on the envelope and the bulk send list do not match. Make sure the envelope and list are compatible for sending. | | BULK_SEND_RECIPIENT_ID_DOES_NOT_EXIST_IN_ENVELOPE | Recipient {0} does not exist in the envelope. Add the missing recipient to the envelope. | | BULK_SEND_RECIPIENT_ID_DOES_NOT_MATCH | Recipient ID {envelopeMember.ID} does not match. Make sure the recipient information in the list and the envelope match up. | | BULK_SEND_ENVELOPE_HAS_BULK_RECIPIENT | Recipient {0} is a bulk recipient. This is not supported. No legacy 'bulk recipient' allowed. In v2.1 of the eSignature API, you must use a bulk send list instead of a bulk recipient. See the API documentation for details. | | BULK_SEND_RECIPIENT_ROLE_DOES_NOT_MATCH | Recipient Role {envelopeMember.RoleName} does not match. Make sure the recipient information in the list and the envelope is compatible. | | BULK_SEND_DUPLICATE_RECIPIENT_DETECTED | Duplicate recipients ({0}) not allowed, unless recipients have unique routing order specified on envelope. | | BULK_SEND_ENVELOPE_HAS_NO_TABS | Bulk sending copy contains tabs, but the specified envelope does not. List and envelope tabs cannot be coalesced. Make sure they are compatible for sending. | | BULK_SEND_TAB_LABEL_DOES_NOT_EXIST_IN_ENVELOPE | Tab with label {0} does not exist in envelope. Add the tab label to the envelope, remove the label from the list, or make sure you're specifying the correct list and envelope. | | BULK_SEND_TAB_DOES_NOT_MATCH | Tab {0} does not match {0} in envelope. A tab exists on the list that does not match or is missing on the envelope. Make sure the tabs on the list and the envelope match. | | BULK_SEND_ENVELOPE_HAS_NO_ENVELOPE_CUSTOM_FIELDS | Bulk sending copy contains custom fields, but the specified envelope does not. There are custom fields on the list that the envelope does not have. Make sure that any custom fields on the list and the envelope match. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_DOES_NOT_EXIST_IN_ENVELOPE | Custom field {0} does not exist in the envelope. Either add the custom field on the list to the envelope, remove the custom field from the list, or make sure you're specifying the correct list and envelope. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_DOES_NOT_MATCH | Custom field names must match. {0} and {1} do not match. The custom field names on the list and the envelope do not match. Use identical names for both. | [create_list]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendlist/ [create_test]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendtestrequest/ [BulkSendOverview]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/
/// </summary>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendRequest"> (optional)</param>
/// <returns>BulkSendResponse</returns>
public BulkSendResponse CreateBulkSendRequest(string accountId, string bulkSendListId, BulkSendRequest bulkSendRequest = null)
{
ApiResponse<BulkSendResponse> localVarResponse = CreateBulkSendRequestWithHttpInfo(accountId, bulkSendListId, bulkSendRequest);
return localVarResponse.Data;
}
/// <summary>
/// Uses the specified bulk send list to send the envelope specified in the payload This method initiates the bulk send process. It generates a bulk send request based on an [existing bulk send list][create_list] and an envelope or template. Consider using the [BulkSend::createBulkSendTestRequest][create_test] method to test your bulk send list for compatibility with the envelope or template that you want to send first. To learn about the complete bulk send flow, see the [Bulk Send overview][BulkSendOverview]. If the envelopes were successfully queued for asynchronous processing, the response contains a `batchId` that you can use to get the status of the batch. If a failure occurs, the API returns an error message. **Note:** Partial success or failure generally does not occur. Only the entire batch is queued for asynchronous processing. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/) ### Errors This method returns the following errors: | Error code | Description | | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | | BULK_SEND_ENVELOPE_NOT_IN_SENDABLE_STATE | Envelope {0} is not in a sendable state. The envelope is not complete. Make sure it has a sendable status, such as `created`. | | BULK_SEND_ENVELOPE_LIST_CONTAINS_NO_COPIES | Cannot send an envelope with a bulk sending list which contains no copies. The list you're trying to bulk send is empty. Make sure the bulk sending list you're using contains recipients. | | BULK_SEND_ENVELOPE_LIST_CONTAINS_TOO_MANY_COPIES | Bulk sending list contains more than {0} copies. The list you're trying to bulk send will cause your account to exceed the 1,000-copy limit imposed for all accounts. Try sending two or more separate lists. | | BULK_SEND_ENVELOPE_CANNOT_BE_NULL | Cannot send a bulk list without an envelope. Specify the envelope ID or template ID for the envelope you want to bulk send. | | BULK_SEND_BLOB_STORE_ERROR | Could not save copy of bulk sending list. An error writing to the database occurred. Try again. If the error persists, contact DocuSign Support. | | BULK_SEND_ACCOUNT_HAS_TOO_MANY_QUEUED_ENVELOPES | Cannot send this bulk sending list because doing so would exceed the maximum of {maxCopies} in-flight envelopes. This account currently has {unprocessedEnvelopes} envelopes waiting to be processed. Please try again later.\" .Try again later, or contact DocuSign Support to request a higher tier. | | BULK_SEND_ENVELOPE_NOT_FOUND | Envelope {envelopeOrTemplateId} does not exist or you do not have permission to access it. The envelopeId or templateId specified could not be found. Specify a valid value. | | BULK_SEND_LIST_NOT_FOUND | Bulk Sending list {listId} does not exist or you do not have permission to access it. The mailingListId specified could not be found. Specify a valid value. | | BULK_SEND_ENVELOPE_HAS_NO_RECIPIENTS | Bulk sending copy contains recipients, but the specified envelope does not. The recipients on the envelope and the bulk send list do not match. Make sure the envelope and list are compatible for sending. | | BULK_SEND_RECIPIENT_ID_DOES_NOT_EXIST_IN_ENVELOPE | Recipient {0} does not exist in the envelope. Add the missing recipient to the envelope. | | BULK_SEND_RECIPIENT_ID_DOES_NOT_MATCH | Recipient ID {envelopeMember.ID} does not match. Make sure the recipient information in the list and the envelope match up. | | BULK_SEND_ENVELOPE_HAS_BULK_RECIPIENT | Recipient {0} is a bulk recipient. This is not supported. No legacy 'bulk recipient' allowed. In v2.1 of the eSignature API, you must use a bulk send list instead of a bulk recipient. See the API documentation for details. | | BULK_SEND_RECIPIENT_ROLE_DOES_NOT_MATCH | Recipient Role {envelopeMember.RoleName} does not match. Make sure the recipient information in the list and the envelope is compatible. | | BULK_SEND_DUPLICATE_RECIPIENT_DETECTED | Duplicate recipients ({0}) not allowed, unless recipients have unique routing order specified on envelope. | | BULK_SEND_ENVELOPE_HAS_NO_TABS | Bulk sending copy contains tabs, but the specified envelope does not. List and envelope tabs cannot be coalesced. Make sure they are compatible for sending. | | BULK_SEND_TAB_LABEL_DOES_NOT_EXIST_IN_ENVELOPE | Tab with label {0} does not exist in envelope. Add the tab label to the envelope, remove the label from the list, or make sure you're specifying the correct list and envelope. | | BULK_SEND_TAB_DOES_NOT_MATCH | Tab {0} does not match {0} in envelope. A tab exists on the list that does not match or is missing on the envelope. Make sure the tabs on the list and the envelope match. | | BULK_SEND_ENVELOPE_HAS_NO_ENVELOPE_CUSTOM_FIELDS | Bulk sending copy contains custom fields, but the specified envelope does not. There are custom fields on the list that the envelope does not have. Make sure that any custom fields on the list and the envelope match. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_DOES_NOT_EXIST_IN_ENVELOPE | Custom field {0} does not exist in the envelope. Either add the custom field on the list to the envelope, remove the custom field from the list, or make sure you're specifying the correct list and envelope. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_DOES_NOT_MATCH | Custom field names must match. {0} and {1} do not match. The custom field names on the list and the envelope do not match. Use identical names for both. | [create_list]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendlist/ [create_test]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendtestrequest/ [BulkSendOverview]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/
/// </summary>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendRequest"> (optional)</param>
/// <returns>ApiResponse of BulkSendResponse</returns>
public ApiResponse<BulkSendResponse> CreateBulkSendRequestWithHttpInfo(string accountId, string bulkSendListId, BulkSendRequest bulkSendRequest = null)
{
return CreateBulkSendRequestAsyncWithHttpInfo(accountId, bulkSendListId, bulkSendRequest)
.ConfigureAwait(false)
.GetAwaiter()
.GetResult();
}
/// <summary>
/// Uses the specified bulk send list to send the envelope specified in the payload This method initiates the bulk send process. It generates a bulk send request based on an [existing bulk send list][create_list] and an envelope or template. Consider using the [BulkSend::createBulkSendTestRequest][create_test] method to test your bulk send list for compatibility with the envelope or template that you want to send first. To learn about the complete bulk send flow, see the [Bulk Send overview][BulkSendOverview]. If the envelopes were successfully queued for asynchronous processing, the response contains a `batchId` that you can use to get the status of the batch. If a failure occurs, the API returns an error message. **Note:** Partial success or failure generally does not occur. Only the entire batch is queued for asynchronous processing. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/) ### Errors This method returns the following errors: | Error code | Description | | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | | BULK_SEND_ENVELOPE_NOT_IN_SENDABLE_STATE | Envelope {0} is not in a sendable state. The envelope is not complete. Make sure it has a sendable status, such as `created`. | | BULK_SEND_ENVELOPE_LIST_CONTAINS_NO_COPIES | Cannot send an envelope with a bulk sending list which contains no copies. The list you're trying to bulk send is empty. Make sure the bulk sending list you're using contains recipients. | | BULK_SEND_ENVELOPE_LIST_CONTAINS_TOO_MANY_COPIES | Bulk sending list contains more than {0} copies. The list you're trying to bulk send will cause your account to exceed the 1,000-copy limit imposed for all accounts. Try sending two or more separate lists. | | BULK_SEND_ENVELOPE_CANNOT_BE_NULL | Cannot send a bulk list without an envelope. Specify the envelope ID or template ID for the envelope you want to bulk send. | | BULK_SEND_BLOB_STORE_ERROR | Could not save copy of bulk sending list. An error writing to the database occurred. Try again. If the error persists, contact DocuSign Support. | | BULK_SEND_ACCOUNT_HAS_TOO_MANY_QUEUED_ENVELOPES | Cannot send this bulk sending list because doing so would exceed the maximum of {maxCopies} in-flight envelopes. This account currently has {unprocessedEnvelopes} envelopes waiting to be processed. Please try again later.\" .Try again later, or contact DocuSign Support to request a higher tier. | | BULK_SEND_ENVELOPE_NOT_FOUND | Envelope {envelopeOrTemplateId} does not exist or you do not have permission to access it. The envelopeId or templateId specified could not be found. Specify a valid value. | | BULK_SEND_LIST_NOT_FOUND | Bulk Sending list {listId} does not exist or you do not have permission to access it. The mailingListId specified could not be found. Specify a valid value. | | BULK_SEND_ENVELOPE_HAS_NO_RECIPIENTS | Bulk sending copy contains recipients, but the specified envelope does not. The recipients on the envelope and the bulk send list do not match. Make sure the envelope and list are compatible for sending. | | BULK_SEND_RECIPIENT_ID_DOES_NOT_EXIST_IN_ENVELOPE | Recipient {0} does not exist in the envelope. Add the missing recipient to the envelope. | | BULK_SEND_RECIPIENT_ID_DOES_NOT_MATCH | Recipient ID {envelopeMember.ID} does not match. Make sure the recipient information in the list and the envelope match up. | | BULK_SEND_ENVELOPE_HAS_BULK_RECIPIENT | Recipient {0} is a bulk recipient. This is not supported. No legacy 'bulk recipient' allowed. In v2.1 of the eSignature API, you must use a bulk send list instead of a bulk recipient. See the API documentation for details. | | BULK_SEND_RECIPIENT_ROLE_DOES_NOT_MATCH | Recipient Role {envelopeMember.RoleName} does not match. Make sure the recipient information in the list and the envelope is compatible. | | BULK_SEND_DUPLICATE_RECIPIENT_DETECTED | Duplicate recipients ({0}) not allowed, unless recipients have unique routing order specified on envelope. | | BULK_SEND_ENVELOPE_HAS_NO_TABS | Bulk sending copy contains tabs, but the specified envelope does not. List and envelope tabs cannot be coalesced. Make sure they are compatible for sending. | | BULK_SEND_TAB_LABEL_DOES_NOT_EXIST_IN_ENVELOPE | Tab with label {0} does not exist in envelope. Add the tab label to the envelope, remove the label from the list, or make sure you're specifying the correct list and envelope. | | BULK_SEND_TAB_DOES_NOT_MATCH | Tab {0} does not match {0} in envelope. A tab exists on the list that does not match or is missing on the envelope. Make sure the tabs on the list and the envelope match. | | BULK_SEND_ENVELOPE_HAS_NO_ENVELOPE_CUSTOM_FIELDS | Bulk sending copy contains custom fields, but the specified envelope does not. There are custom fields on the list that the envelope does not have. Make sure that any custom fields on the list and the envelope match. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_DOES_NOT_EXIST_IN_ENVELOPE | Custom field {0} does not exist in the envelope. Either add the custom field on the list to the envelope, remove the custom field from the list, or make sure you're specifying the correct list and envelope. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_DOES_NOT_MATCH | Custom field names must match. {0} and {1} do not match. The custom field names on the list and the envelope do not match. Use identical names for both. | [create_list]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendlist/ [create_test]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendtestrequest/ [BulkSendOverview]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/
/// </summary>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendRequest"> (optional)</param>
/// <returns>Task of BulkSendResponse</returns>
public async System.Threading.Tasks.Task<BulkSendResponse> CreateBulkSendRequestAsync(string accountId, string bulkSendListId, BulkSendRequest bulkSendRequest = null, System.Threading.CancellationToken cancellationToken = default)
{
ApiResponse<BulkSendResponse> localVarResponse = await CreateBulkSendRequestAsyncWithHttpInfo(accountId, bulkSendListId, bulkSendRequest);
return localVarResponse.Data;
}
/// <summary>
/// Uses the specified bulk send list to send the envelope specified in the payload This method initiates the bulk send process. It generates a bulk send request based on an [existing bulk send list][create_list] and an envelope or template. Consider using the [BulkSend::createBulkSendTestRequest][create_test] method to test your bulk send list for compatibility with the envelope or template that you want to send first. To learn about the complete bulk send flow, see the [Bulk Send overview][BulkSendOverview]. If the envelopes were successfully queued for asynchronous processing, the response contains a `batchId` that you can use to get the status of the batch. If a failure occurs, the API returns an error message. **Note:** Partial success or failure generally does not occur. Only the entire batch is queued for asynchronous processing. ### Related topics - [How to bulk send envelopes](/docs/esign-rest-api/how-to/bulk-send-envelopes/) ### Errors This method returns the following errors: | Error code | Description | | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | :- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | | BULK_SEND_ENVELOPE_NOT_IN_SENDABLE_STATE | Envelope {0} is not in a sendable state. The envelope is not complete. Make sure it has a sendable status, such as `created`. | | BULK_SEND_ENVELOPE_LIST_CONTAINS_NO_COPIES | Cannot send an envelope with a bulk sending list which contains no copies. The list you're trying to bulk send is empty. Make sure the bulk sending list you're using contains recipients. | | BULK_SEND_ENVELOPE_LIST_CONTAINS_TOO_MANY_COPIES | Bulk sending list contains more than {0} copies. The list you're trying to bulk send will cause your account to exceed the 1,000-copy limit imposed for all accounts. Try sending two or more separate lists. | | BULK_SEND_ENVELOPE_CANNOT_BE_NULL | Cannot send a bulk list without an envelope. Specify the envelope ID or template ID for the envelope you want to bulk send. | | BULK_SEND_BLOB_STORE_ERROR | Could not save copy of bulk sending list. An error writing to the database occurred. Try again. If the error persists, contact DocuSign Support. | | BULK_SEND_ACCOUNT_HAS_TOO_MANY_QUEUED_ENVELOPES | Cannot send this bulk sending list because doing so would exceed the maximum of {maxCopies} in-flight envelopes. This account currently has {unprocessedEnvelopes} envelopes waiting to be processed. Please try again later.\" .Try again later, or contact DocuSign Support to request a higher tier. | | BULK_SEND_ENVELOPE_NOT_FOUND | Envelope {envelopeOrTemplateId} does not exist or you do not have permission to access it. The envelopeId or templateId specified could not be found. Specify a valid value. | | BULK_SEND_LIST_NOT_FOUND | Bulk Sending list {listId} does not exist or you do not have permission to access it. The mailingListId specified could not be found. Specify a valid value. | | BULK_SEND_ENVELOPE_HAS_NO_RECIPIENTS | Bulk sending copy contains recipients, but the specified envelope does not. The recipients on the envelope and the bulk send list do not match. Make sure the envelope and list are compatible for sending. | | BULK_SEND_RECIPIENT_ID_DOES_NOT_EXIST_IN_ENVELOPE | Recipient {0} does not exist in the envelope. Add the missing recipient to the envelope. | | BULK_SEND_RECIPIENT_ID_DOES_NOT_MATCH | Recipient ID {envelopeMember.ID} does not match. Make sure the recipient information in the list and the envelope match up. | | BULK_SEND_ENVELOPE_HAS_BULK_RECIPIENT | Recipient {0} is a bulk recipient. This is not supported. No legacy 'bulk recipient' allowed. In v2.1 of the eSignature API, you must use a bulk send list instead of a bulk recipient. See the API documentation for details. | | BULK_SEND_RECIPIENT_ROLE_DOES_NOT_MATCH | Recipient Role {envelopeMember.RoleName} does not match. Make sure the recipient information in the list and the envelope is compatible. | | BULK_SEND_DUPLICATE_RECIPIENT_DETECTED | Duplicate recipients ({0}) not allowed, unless recipients have unique routing order specified on envelope. | | BULK_SEND_ENVELOPE_HAS_NO_TABS | Bulk sending copy contains tabs, but the specified envelope does not. List and envelope tabs cannot be coalesced. Make sure they are compatible for sending. | | BULK_SEND_TAB_LABEL_DOES_NOT_EXIST_IN_ENVELOPE | Tab with label {0} does not exist in envelope. Add the tab label to the envelope, remove the label from the list, or make sure you're specifying the correct list and envelope. | | BULK_SEND_TAB_DOES_NOT_MATCH | Tab {0} does not match {0} in envelope. A tab exists on the list that does not match or is missing on the envelope. Make sure the tabs on the list and the envelope match. | | BULK_SEND_ENVELOPE_HAS_NO_ENVELOPE_CUSTOM_FIELDS | Bulk sending copy contains custom fields, but the specified envelope does not. There are custom fields on the list that the envelope does not have. Make sure that any custom fields on the list and the envelope match. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_DOES_NOT_EXIST_IN_ENVELOPE | Custom field {0} does not exist in the envelope. Either add the custom field on the list to the envelope, remove the custom field from the list, or make sure you're specifying the correct list and envelope. | | BULK_SEND_ENVELOPE_CUSTOM_FIELD_NAME_DOES_NOT_MATCH | Custom field names must match. {0} and {1} do not match. The custom field names on the list and the envelope do not match. Use identical names for both. | [create_list]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendlist/ [create_test]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendtestrequest/ [BulkSendOverview]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/
/// </summary>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendRequest"> (optional)</param>
/// <returns>Task of ApiResponse (BulkSendResponse)</returns>
public async System.Threading.Tasks.Task<ApiResponse<BulkSendResponse>> CreateBulkSendRequestAsyncWithHttpInfo(string accountId, string bulkSendListId, BulkSendRequest bulkSendRequest = null, System.Threading.CancellationToken cancellationToken = default)
{
// verify the required parameter 'accountId' is set
if (accountId == null)
throw new ApiException(400, "Missing required parameter 'accountId' when calling BulkEnvelopesApi->CreateBulkSendRequest");
// verify the required parameter 'bulkSendListId' is set
if (bulkSendListId == null)
throw new ApiException(400, "Missing required parameter 'bulkSendListId' when calling BulkEnvelopesApi->CreateBulkSendRequest");
var localVarPath = "/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}/send";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(this.ApiClient.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new List<FileParameter>();
Object localVarPostBody = null;
String localVarHttpContentDisposition = string.Empty;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
// set "format" to json by default
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
localVarPathParams.Add("format", "json");
if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter
if (bulkSendListId != null) localVarPathParams.Add("bulkSendListId", this.ApiClient.ParameterToString(bulkSendListId)); // path parameter
if (bulkSendRequest != null && bulkSendRequest.GetType() != typeof(byte[]))
{
localVarPostBody = this.ApiClient.Serialize(bulkSendRequest); // http body (model) parameter
}
else
{
localVarPostBody = bulkSendRequest; // byte array
}
// authentication (docusignAccessCode) required
// oauth required
if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken;
}
// make the HTTP request
DocuSignRequest localVarRequest = this.ApiClient.PrepareRequest(localVarPath, HttpMethod.Post, localVarQueryParams.ToList(), localVarPostBody, localVarHeaderParams.ToList(), localVarFormParams.ToList(), localVarPathParams.ToList(), localVarFileParams, localVarHttpContentType, localVarHttpContentDisposition);
DocuSignResponse localVarResponse = await this.ApiClient.CallApiAsync(localVarRequest, cancellationToken)
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("CreateBulkSendRequest", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<BulkSendResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(BulkSendResponse)this.ApiClient.Deserialize(localVarResponse, typeof(BulkSendResponse)));
}
/// <summary>
/// Tests whether the specified bulk sending list can be used to send an envelope This method tests a bulk send list for compatibility with the envelope or template that you want to send. For example, a template that has three roles is not compatible with a bulk send list that has only two recipients. For this reason, you might want to test compatibility first. A successful test result returns `true` for the `canBeSent` property. An unsuccessful test returns a JSON response that contains information about the errors that occurred. If the test is successful, you can then send the envelope or template by using the [BulkSend::createBulkSendRequest][BulkSendRequest] method. ## Envelope Compatibility Checks This section describes the envelope compatibility checks that the system performs. **Top-Level Issues** - Envelopes must be in a sendable state. - The bulk send list must contain at least one copy (instance of an envelope), and no more than the maximum number of copies allowed for the account. - The envelope must not be null and must be visible to the current user. - The account cannot have more queued envelopes than the maximum number configured for the account. - The bulk send list must exist. **Recipients** - The envelope must have recipients. - If you are using an envelope, all of the recipients defined in the bulk send list must have corresponding recipient IDs in the envelope definition. If you are using a template, you must either match the recipient IDs or role IDs. - The envelope cannot contain a bulk recipient (an artifact of the legacy version of DocuSign's bulk send functionality). **Recipient Tabs** - Every `recipient ID, tab label` pair in the bulk send list must correspond to a tab in the envelope. **Custom Fields** - Each envelope-level custom field in the bulk send list must correspond to the name of a `customField` in the envelope definition. You do not have to match the recipient-level custom fields. [BulkSendRequest]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendrequest/
/// </summary>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendRequest"> (optional)</param>
/// <returns>BulkSendTestResponse</returns>
public BulkSendTestResponse CreateBulkSendTestRequest(string accountId, string bulkSendListId, BulkSendRequest bulkSendRequest = null)
{
ApiResponse<BulkSendTestResponse> localVarResponse = CreateBulkSendTestRequestWithHttpInfo(accountId, bulkSendListId, bulkSendRequest);
return localVarResponse.Data;
}
/// <summary>
/// Tests whether the specified bulk sending list can be used to send an envelope This method tests a bulk send list for compatibility with the envelope or template that you want to send. For example, a template that has three roles is not compatible with a bulk send list that has only two recipients. For this reason, you might want to test compatibility first. A successful test result returns `true` for the `canBeSent` property. An unsuccessful test returns a JSON response that contains information about the errors that occurred. If the test is successful, you can then send the envelope or template by using the [BulkSend::createBulkSendRequest][BulkSendRequest] method. ## Envelope Compatibility Checks This section describes the envelope compatibility checks that the system performs. **Top-Level Issues** - Envelopes must be in a sendable state. - The bulk send list must contain at least one copy (instance of an envelope), and no more than the maximum number of copies allowed for the account. - The envelope must not be null and must be visible to the current user. - The account cannot have more queued envelopes than the maximum number configured for the account. - The bulk send list must exist. **Recipients** - The envelope must have recipients. - If you are using an envelope, all of the recipients defined in the bulk send list must have corresponding recipient IDs in the envelope definition. If you are using a template, you must either match the recipient IDs or role IDs. - The envelope cannot contain a bulk recipient (an artifact of the legacy version of DocuSign's bulk send functionality). **Recipient Tabs** - Every `recipient ID, tab label` pair in the bulk send list must correspond to a tab in the envelope. **Custom Fields** - Each envelope-level custom field in the bulk send list must correspond to the name of a `customField` in the envelope definition. You do not have to match the recipient-level custom fields. [BulkSendRequest]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendrequest/
/// </summary>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendRequest"> (optional)</param>
/// <returns>ApiResponse of BulkSendTestResponse</returns>
public ApiResponse<BulkSendTestResponse> CreateBulkSendTestRequestWithHttpInfo(string accountId, string bulkSendListId, BulkSendRequest bulkSendRequest = null)
{
return CreateBulkSendTestRequestAsyncWithHttpInfo(accountId, bulkSendListId, bulkSendRequest)
.ConfigureAwait(false)
.GetAwaiter()
.GetResult();
}
/// <summary>
/// Tests whether the specified bulk sending list can be used to send an envelope This method tests a bulk send list for compatibility with the envelope or template that you want to send. For example, a template that has three roles is not compatible with a bulk send list that has only two recipients. For this reason, you might want to test compatibility first. A successful test result returns `true` for the `canBeSent` property. An unsuccessful test returns a JSON response that contains information about the errors that occurred. If the test is successful, you can then send the envelope or template by using the [BulkSend::createBulkSendRequest][BulkSendRequest] method. ## Envelope Compatibility Checks This section describes the envelope compatibility checks that the system performs. **Top-Level Issues** - Envelopes must be in a sendable state. - The bulk send list must contain at least one copy (instance of an envelope), and no more than the maximum number of copies allowed for the account. - The envelope must not be null and must be visible to the current user. - The account cannot have more queued envelopes than the maximum number configured for the account. - The bulk send list must exist. **Recipients** - The envelope must have recipients. - If you are using an envelope, all of the recipients defined in the bulk send list must have corresponding recipient IDs in the envelope definition. If you are using a template, you must either match the recipient IDs or role IDs. - The envelope cannot contain a bulk recipient (an artifact of the legacy version of DocuSign's bulk send functionality). **Recipient Tabs** - Every `recipient ID, tab label` pair in the bulk send list must correspond to a tab in the envelope. **Custom Fields** - Each envelope-level custom field in the bulk send list must correspond to the name of a `customField` in the envelope definition. You do not have to match the recipient-level custom fields. [BulkSendRequest]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendrequest/
/// </summary>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendRequest"> (optional)</param>
/// <returns>Task of BulkSendTestResponse</returns>
public async System.Threading.Tasks.Task<BulkSendTestResponse> CreateBulkSendTestRequestAsync(string accountId, string bulkSendListId, BulkSendRequest bulkSendRequest = null, System.Threading.CancellationToken cancellationToken = default)
{
ApiResponse<BulkSendTestResponse> localVarResponse = await CreateBulkSendTestRequestAsyncWithHttpInfo(accountId, bulkSendListId, bulkSendRequest);
return localVarResponse.Data;
}
/// <summary>
/// Tests whether the specified bulk sending list can be used to send an envelope This method tests a bulk send list for compatibility with the envelope or template that you want to send. For example, a template that has three roles is not compatible with a bulk send list that has only two recipients. For this reason, you might want to test compatibility first. A successful test result returns `true` for the `canBeSent` property. An unsuccessful test returns a JSON response that contains information about the errors that occurred. If the test is successful, you can then send the envelope or template by using the [BulkSend::createBulkSendRequest][BulkSendRequest] method. ## Envelope Compatibility Checks This section describes the envelope compatibility checks that the system performs. **Top-Level Issues** - Envelopes must be in a sendable state. - The bulk send list must contain at least one copy (instance of an envelope), and no more than the maximum number of copies allowed for the account. - The envelope must not be null and must be visible to the current user. - The account cannot have more queued envelopes than the maximum number configured for the account. - The bulk send list must exist. **Recipients** - The envelope must have recipients. - If you are using an envelope, all of the recipients defined in the bulk send list must have corresponding recipient IDs in the envelope definition. If you are using a template, you must either match the recipient IDs or role IDs. - The envelope cannot contain a bulk recipient (an artifact of the legacy version of DocuSign's bulk send functionality). **Recipient Tabs** - Every `recipient ID, tab label` pair in the bulk send list must correspond to a tab in the envelope. **Custom Fields** - Each envelope-level custom field in the bulk send list must correspond to the name of a `customField` in the envelope definition. You do not have to match the recipient-level custom fields. [BulkSendRequest]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendrequest/
/// </summary>
/// <exception cref="DocuSign.eSign.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accountId">The external account number (int) or account ID Guid.</param>
/// <param name="bulkSendListId"></param>
/// <param name="bulkSendRequest"> (optional)</param>
/// <returns>Task of ApiResponse (BulkSendTestResponse)</returns>
public async System.Threading.Tasks.Task<ApiResponse<BulkSendTestResponse>> CreateBulkSendTestRequestAsyncWithHttpInfo(string accountId, string bulkSendListId, BulkSendRequest bulkSendRequest = null, System.Threading.CancellationToken cancellationToken = default)
{
// verify the required parameter 'accountId' is set
if (accountId == null)
throw new ApiException(400, "Missing required parameter 'accountId' when calling BulkEnvelopesApi->CreateBulkSendTestRequest");
// verify the required parameter 'bulkSendListId' is set
if (bulkSendListId == null)
throw new ApiException(400, "Missing required parameter 'bulkSendListId' when calling BulkEnvelopesApi->CreateBulkSendTestRequest");
var localVarPath = "/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}/test";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(this.ApiClient.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new List<FileParameter>();
Object localVarPostBody = null;
String localVarHttpContentDisposition = string.Empty;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
// set "format" to json by default
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
localVarPathParams.Add("format", "json");
if (accountId != null) localVarPathParams.Add("accountId", this.ApiClient.ParameterToString(accountId)); // path parameter
if (bulkSendListId != null) localVarPathParams.Add("bulkSendListId", this.ApiClient.ParameterToString(bulkSendListId)); // path parameter
if (bulkSendRequest != null && bulkSendRequest.GetType() != typeof(byte[]))
{
localVarPostBody = this.ApiClient.Serialize(bulkSendRequest); // http body (model) parameter
}
else
{
localVarPostBody = bulkSendRequest; // byte array
}
// authentication (docusignAccessCode) required
// oauth required
if (!String.IsNullOrEmpty(this.ApiClient.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.ApiClient.Configuration.AccessToken;
}