docusign_esign.apis.bulk_envelopes_api
Docusign eSignature REST API
The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. # noqa: E501
OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git
1# coding: utf-8 2 3""" 4 Docusign eSignature REST API 5 6 The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. # noqa: E501 7 8 OpenAPI spec version: v2.1 9 Contact: devcenter@docusign.com 10 Generated by: https://github.com/swagger-api/swagger-codegen.git 11""" 12 13 14from __future__ import absolute_import 15 16import sys 17import os 18import re 19 20# python 2 and python 3 compatibility library 21from six import iteritems 22 23from ..client.configuration import Configuration 24from ..client.api_client import ApiClient 25 26 27class BulkEnvelopesApi(object): 28 """ 29 NOTE: This class is auto generated by the swagger code generator program. 30 Do not edit the class manually. 31 Ref: https://github.com/swagger-api/swagger-codegen 32 """ 33 34 def __init__(self, api_client=None): 35 config = Configuration() 36 if api_client: 37 self.api_client = api_client 38 else: 39 if not config.api_client: 40 config.api_client = ApiClient() 41 self.api_client = config.api_client 42 43 def create_bulk_send_list(self, account_id, **kwargs): 44 """ 45 Creates a new bulk send list 46 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. | 47 This method makes a synchronous HTTP request by default. To make an 48 asynchronous HTTP request, please define a `callback` function 49 to be invoked when receiving the response. 50 >>> def callback_function(response): 51 >>> pprint(response) 52 >>> 53 >>> thread = api.create_bulk_send_list(account_id, callback=callback_function) 54 55 :param callback function: The callback function 56 for asynchronous request. (optional) 57 :param str account_id: The external account number (int) or account ID Guid. (required) 58 :param BulkSendingList bulk_sending_list: 59 :return: BulkSendingList 60 If the method is called asynchronously, 61 returns the request thread. 62 """ 63 kwargs['_return_http_data_only'] = True 64 if kwargs.get('callback'): 65 return self.create_bulk_send_list_with_http_info(account_id, **kwargs) 66 else: 67 (data) = self.create_bulk_send_list_with_http_info(account_id, **kwargs) 68 return data 69 70 def create_bulk_send_list_with_http_info(self, account_id, **kwargs): 71 """ 72 Creates a new bulk send list 73 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. | 74 This method makes a synchronous HTTP request by default. To make an 75 asynchronous HTTP request, please define a `callback` function 76 to be invoked when receiving the response. 77 >>> def callback_function(response): 78 >>> pprint(response) 79 >>> 80 >>> thread = api.create_bulk_send_list_with_http_info(account_id, callback=callback_function) 81 82 :param callback function: The callback function 83 for asynchronous request. (optional) 84 :param str account_id: The external account number (int) or account ID Guid. (required) 85 :param BulkSendingList bulk_sending_list: 86 :return: BulkSendingList 87 If the method is called asynchronously, 88 returns the request thread. 89 """ 90 91 all_params = ['account_id', 'bulk_sending_list'] 92 all_params.append('callback') 93 all_params.append('_return_http_data_only') 94 all_params.append('_preload_content') 95 all_params.append('_request_timeout') 96 97 params = locals() 98 for key, val in iteritems(params['kwargs']): 99 if key not in all_params: 100 raise TypeError( 101 "Got an unexpected keyword argument '%s'" 102 " to method create_bulk_send_list" % key 103 ) 104 params[key] = val 105 del params['kwargs'] 106 # verify the required parameter 'account_id' is set 107 if ('account_id' not in params) or (params['account_id'] is None): 108 raise ValueError("Missing the required parameter `account_id` when calling `create_bulk_send_list`") 109 110 111 collection_formats = {} 112 113 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists'.replace('{format}', 'json') 114 path_params = {} 115 if 'account_id' in params: 116 path_params['accountId'] = params['account_id'] 117 118 query_params = {} 119 120 header_params = {} 121 122 form_params = [] 123 local_var_files = {} 124 125 body_params = None 126 if 'bulk_sending_list' in params: 127 body_params = params['bulk_sending_list'] 128 # HTTP header `Accept` 129 header_params['Accept'] = self.api_client.\ 130 select_header_accept(['application/json']) 131 132 # Authentication setting 133 auth_settings = [] 134 135 return self.api_client.call_api(resource_path, 'POST', 136 path_params, 137 query_params, 138 header_params, 139 body=body_params, 140 post_params=form_params, 141 files=local_var_files, 142 response_type='BulkSendingList', 143 auth_settings=auth_settings, 144 callback=params.get('callback'), 145 _return_http_data_only=params.get('_return_http_data_only'), 146 _preload_content=params.get('_preload_content', True), 147 _request_timeout=params.get('_request_timeout'), 148 collection_formats=collection_formats) 149 150 def create_bulk_send_request(self, account_id, bulk_send_list_id, **kwargs): 151 """ 152 Uses the specified bulk send list to send the envelope specified in the payload 153 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/ 154 This method makes a synchronous HTTP request by default. To make an 155 asynchronous HTTP request, please define a `callback` function 156 to be invoked when receiving the response. 157 >>> def callback_function(response): 158 >>> pprint(response) 159 >>> 160 >>> thread = api.create_bulk_send_request(account_id, bulk_send_list_id, callback=callback_function) 161 162 :param callback function: The callback function 163 for asynchronous request. (optional) 164 :param str account_id: The external account number (int) or account ID Guid. (required) 165 :param str bulk_send_list_id: (required) 166 :param BulkSendRequest bulk_send_request: 167 :return: BulkSendResponse 168 If the method is called asynchronously, 169 returns the request thread. 170 """ 171 kwargs['_return_http_data_only'] = True 172 if kwargs.get('callback'): 173 return self.create_bulk_send_request_with_http_info(account_id, bulk_send_list_id, **kwargs) 174 else: 175 (data) = self.create_bulk_send_request_with_http_info(account_id, bulk_send_list_id, **kwargs) 176 return data 177 178 def create_bulk_send_request_with_http_info(self, account_id, bulk_send_list_id, **kwargs): 179 """ 180 Uses the specified bulk send list to send the envelope specified in the payload 181 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/ 182 This method makes a synchronous HTTP request by default. To make an 183 asynchronous HTTP request, please define a `callback` function 184 to be invoked when receiving the response. 185 >>> def callback_function(response): 186 >>> pprint(response) 187 >>> 188 >>> thread = api.create_bulk_send_request_with_http_info(account_id, bulk_send_list_id, callback=callback_function) 189 190 :param callback function: The callback function 191 for asynchronous request. (optional) 192 :param str account_id: The external account number (int) or account ID Guid. (required) 193 :param str bulk_send_list_id: (required) 194 :param BulkSendRequest bulk_send_request: 195 :return: BulkSendResponse 196 If the method is called asynchronously, 197 returns the request thread. 198 """ 199 200 all_params = ['account_id', 'bulk_send_list_id', 'bulk_send_request'] 201 all_params.append('callback') 202 all_params.append('_return_http_data_only') 203 all_params.append('_preload_content') 204 all_params.append('_request_timeout') 205 206 params = locals() 207 for key, val in iteritems(params['kwargs']): 208 if key not in all_params: 209 raise TypeError( 210 "Got an unexpected keyword argument '%s'" 211 " to method create_bulk_send_request" % key 212 ) 213 params[key] = val 214 del params['kwargs'] 215 # verify the required parameter 'account_id' is set 216 if ('account_id' not in params) or (params['account_id'] is None): 217 raise ValueError("Missing the required parameter `account_id` when calling `create_bulk_send_request`") 218 # verify the required parameter 'bulk_send_list_id' is set 219 if ('bulk_send_list_id' not in params) or (params['bulk_send_list_id'] is None): 220 raise ValueError("Missing the required parameter `bulk_send_list_id` when calling `create_bulk_send_request`") 221 222 223 collection_formats = {} 224 225 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}/send'.replace('{format}', 'json') 226 path_params = {} 227 if 'account_id' in params: 228 path_params['accountId'] = params['account_id'] 229 if 'bulk_send_list_id' in params: 230 path_params['bulkSendListId'] = params['bulk_send_list_id'] 231 232 query_params = {} 233 234 header_params = {} 235 236 form_params = [] 237 local_var_files = {} 238 239 body_params = None 240 if 'bulk_send_request' in params: 241 body_params = params['bulk_send_request'] 242 # HTTP header `Accept` 243 header_params['Accept'] = self.api_client.\ 244 select_header_accept(['application/json']) 245 246 # Authentication setting 247 auth_settings = [] 248 249 return self.api_client.call_api(resource_path, 'POST', 250 path_params, 251 query_params, 252 header_params, 253 body=body_params, 254 post_params=form_params, 255 files=local_var_files, 256 response_type='BulkSendResponse', 257 auth_settings=auth_settings, 258 callback=params.get('callback'), 259 _return_http_data_only=params.get('_return_http_data_only'), 260 _preload_content=params.get('_preload_content', True), 261 _request_timeout=params.get('_request_timeout'), 262 collection_formats=collection_formats) 263 264 def create_bulk_send_test_request(self, account_id, bulk_send_list_id, **kwargs): 265 """ 266 Tests whether the specified bulk sending list can be used to send an envelope 267 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/ 268 This method makes a synchronous HTTP request by default. To make an 269 asynchronous HTTP request, please define a `callback` function 270 to be invoked when receiving the response. 271 >>> def callback_function(response): 272 >>> pprint(response) 273 >>> 274 >>> thread = api.create_bulk_send_test_request(account_id, bulk_send_list_id, callback=callback_function) 275 276 :param callback function: The callback function 277 for asynchronous request. (optional) 278 :param str account_id: The external account number (int) or account ID Guid. (required) 279 :param str bulk_send_list_id: (required) 280 :param BulkSendRequest bulk_send_request: 281 :return: BulkSendTestResponse 282 If the method is called asynchronously, 283 returns the request thread. 284 """ 285 kwargs['_return_http_data_only'] = True 286 if kwargs.get('callback'): 287 return self.create_bulk_send_test_request_with_http_info(account_id, bulk_send_list_id, **kwargs) 288 else: 289 (data) = self.create_bulk_send_test_request_with_http_info(account_id, bulk_send_list_id, **kwargs) 290 return data 291 292 def create_bulk_send_test_request_with_http_info(self, account_id, bulk_send_list_id, **kwargs): 293 """ 294 Tests whether the specified bulk sending list can be used to send an envelope 295 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/ 296 This method makes a synchronous HTTP request by default. To make an 297 asynchronous HTTP request, please define a `callback` function 298 to be invoked when receiving the response. 299 >>> def callback_function(response): 300 >>> pprint(response) 301 >>> 302 >>> thread = api.create_bulk_send_test_request_with_http_info(account_id, bulk_send_list_id, callback=callback_function) 303 304 :param callback function: The callback function 305 for asynchronous request. (optional) 306 :param str account_id: The external account number (int) or account ID Guid. (required) 307 :param str bulk_send_list_id: (required) 308 :param BulkSendRequest bulk_send_request: 309 :return: BulkSendTestResponse 310 If the method is called asynchronously, 311 returns the request thread. 312 """ 313 314 all_params = ['account_id', 'bulk_send_list_id', 'bulk_send_request'] 315 all_params.append('callback') 316 all_params.append('_return_http_data_only') 317 all_params.append('_preload_content') 318 all_params.append('_request_timeout') 319 320 params = locals() 321 for key, val in iteritems(params['kwargs']): 322 if key not in all_params: 323 raise TypeError( 324 "Got an unexpected keyword argument '%s'" 325 " to method create_bulk_send_test_request" % key 326 ) 327 params[key] = val 328 del params['kwargs'] 329 # verify the required parameter 'account_id' is set 330 if ('account_id' not in params) or (params['account_id'] is None): 331 raise ValueError("Missing the required parameter `account_id` when calling `create_bulk_send_test_request`") 332 # verify the required parameter 'bulk_send_list_id' is set 333 if ('bulk_send_list_id' not in params) or (params['bulk_send_list_id'] is None): 334 raise ValueError("Missing the required parameter `bulk_send_list_id` when calling `create_bulk_send_test_request`") 335 336 337 collection_formats = {} 338 339 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}/test'.replace('{format}', 'json') 340 path_params = {} 341 if 'account_id' in params: 342 path_params['accountId'] = params['account_id'] 343 if 'bulk_send_list_id' in params: 344 path_params['bulkSendListId'] = params['bulk_send_list_id'] 345 346 query_params = {} 347 348 header_params = {} 349 350 form_params = [] 351 local_var_files = {} 352 353 body_params = None 354 if 'bulk_send_request' in params: 355 body_params = params['bulk_send_request'] 356 # HTTP header `Accept` 357 header_params['Accept'] = self.api_client.\ 358 select_header_accept(['application/json']) 359 360 # Authentication setting 361 auth_settings = [] 362 363 return self.api_client.call_api(resource_path, 'POST', 364 path_params, 365 query_params, 366 header_params, 367 body=body_params, 368 post_params=form_params, 369 files=local_var_files, 370 response_type='BulkSendTestResponse', 371 auth_settings=auth_settings, 372 callback=params.get('callback'), 373 _return_http_data_only=params.get('_return_http_data_only'), 374 _preload_content=params.get('_preload_content', True), 375 _request_timeout=params.get('_request_timeout'), 376 collection_formats=collection_formats) 377 378 def delete_bulk_send_list(self, account_id, bulk_send_list_id, **kwargs): 379 """ 380 Deletes an existing bulk send list 381 This method deletes a bulk send list. 382 This method makes a synchronous HTTP request by default. To make an 383 asynchronous HTTP request, please define a `callback` function 384 to be invoked when receiving the response. 385 >>> def callback_function(response): 386 >>> pprint(response) 387 >>> 388 >>> thread = api.delete_bulk_send_list(account_id, bulk_send_list_id, callback=callback_function) 389 390 :param callback function: The callback function 391 for asynchronous request. (optional) 392 :param str account_id: The external account number (int) or account ID Guid. (required) 393 :param str bulk_send_list_id: (required) 394 :return: BulkSendingListSummaries 395 If the method is called asynchronously, 396 returns the request thread. 397 """ 398 kwargs['_return_http_data_only'] = True 399 if kwargs.get('callback'): 400 return self.delete_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 401 else: 402 (data) = self.delete_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 403 return data 404 405 def delete_bulk_send_list_with_http_info(self, account_id, bulk_send_list_id, **kwargs): 406 """ 407 Deletes an existing bulk send list 408 This method deletes a bulk send list. 409 This method makes a synchronous HTTP request by default. To make an 410 asynchronous HTTP request, please define a `callback` function 411 to be invoked when receiving the response. 412 >>> def callback_function(response): 413 >>> pprint(response) 414 >>> 415 >>> thread = api.delete_bulk_send_list_with_http_info(account_id, bulk_send_list_id, callback=callback_function) 416 417 :param callback function: The callback function 418 for asynchronous request. (optional) 419 :param str account_id: The external account number (int) or account ID Guid. (required) 420 :param str bulk_send_list_id: (required) 421 :return: BulkSendingListSummaries 422 If the method is called asynchronously, 423 returns the request thread. 424 """ 425 426 all_params = ['account_id', 'bulk_send_list_id'] 427 all_params.append('callback') 428 all_params.append('_return_http_data_only') 429 all_params.append('_preload_content') 430 all_params.append('_request_timeout') 431 432 params = locals() 433 for key, val in iteritems(params['kwargs']): 434 if key not in all_params: 435 raise TypeError( 436 "Got an unexpected keyword argument '%s'" 437 " to method delete_bulk_send_list" % key 438 ) 439 params[key] = val 440 del params['kwargs'] 441 # verify the required parameter 'account_id' is set 442 if ('account_id' not in params) or (params['account_id'] is None): 443 raise ValueError("Missing the required parameter `account_id` when calling `delete_bulk_send_list`") 444 # verify the required parameter 'bulk_send_list_id' is set 445 if ('bulk_send_list_id' not in params) or (params['bulk_send_list_id'] is None): 446 raise ValueError("Missing the required parameter `bulk_send_list_id` when calling `delete_bulk_send_list`") 447 448 449 collection_formats = {} 450 451 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}'.replace('{format}', 'json') 452 path_params = {} 453 if 'account_id' in params: 454 path_params['accountId'] = params['account_id'] 455 if 'bulk_send_list_id' in params: 456 path_params['bulkSendListId'] = params['bulk_send_list_id'] 457 458 query_params = {} 459 460 header_params = {} 461 462 form_params = [] 463 local_var_files = {} 464 465 body_params = None 466 # HTTP header `Accept` 467 header_params['Accept'] = self.api_client.\ 468 select_header_accept(['application/json']) 469 470 # Authentication setting 471 auth_settings = [] 472 473 return self.api_client.call_api(resource_path, 'DELETE', 474 path_params, 475 query_params, 476 header_params, 477 body=body_params, 478 post_params=form_params, 479 files=local_var_files, 480 response_type='BulkSendingListSummaries', 481 auth_settings=auth_settings, 482 callback=params.get('callback'), 483 _return_http_data_only=params.get('_return_http_data_only'), 484 _preload_content=params.get('_preload_content', True), 485 _request_timeout=params.get('_request_timeout'), 486 collection_formats=collection_formats) 487 488 def get_bulk_send_batch_envelopes(self, account_id, bulk_send_batch_id, **kwargs): 489 """ 490 Gets envelopes from a specific bulk send batch 491 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. 492 This method makes a synchronous HTTP request by default. To make an 493 asynchronous HTTP request, please define a `callback` function 494 to be invoked when receiving the response. 495 >>> def callback_function(response): 496 >>> pprint(response) 497 >>> 498 >>> thread = api.get_bulk_send_batch_envelopes(account_id, bulk_send_batch_id, callback=callback_function) 499 500 :param callback function: The callback function 501 for asynchronous request. (optional) 502 :param str account_id: The external account number (int) or account ID Guid. (required) 503 :param str bulk_send_batch_id: (required) 504 :param str count: 505 :param str include: 506 :param str order: 507 :param str order_by: 508 :param str search_text: 509 :param str start_position: 510 :param str status: 511 :return: EnvelopesInformation 512 If the method is called asynchronously, 513 returns the request thread. 514 """ 515 kwargs['_return_http_data_only'] = True 516 if kwargs.get('callback'): 517 return self.get_bulk_send_batch_envelopes_with_http_info(account_id, bulk_send_batch_id, **kwargs) 518 else: 519 (data) = self.get_bulk_send_batch_envelopes_with_http_info(account_id, bulk_send_batch_id, **kwargs) 520 return data 521 522 def get_bulk_send_batch_envelopes_with_http_info(self, account_id, bulk_send_batch_id, **kwargs): 523 """ 524 Gets envelopes from a specific bulk send batch 525 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. 526 This method makes a synchronous HTTP request by default. To make an 527 asynchronous HTTP request, please define a `callback` function 528 to be invoked when receiving the response. 529 >>> def callback_function(response): 530 >>> pprint(response) 531 >>> 532 >>> thread = api.get_bulk_send_batch_envelopes_with_http_info(account_id, bulk_send_batch_id, callback=callback_function) 533 534 :param callback function: The callback function 535 for asynchronous request. (optional) 536 :param str account_id: The external account number (int) or account ID Guid. (required) 537 :param str bulk_send_batch_id: (required) 538 :param str count: 539 :param str include: 540 :param str order: 541 :param str order_by: 542 :param str search_text: 543 :param str start_position: 544 :param str status: 545 :return: EnvelopesInformation 546 If the method is called asynchronously, 547 returns the request thread. 548 """ 549 550 all_params = ['account_id', 'bulk_send_batch_id', 'count', 'include', 'order', 'order_by', 'search_text', 'start_position', 'status'] 551 all_params.append('callback') 552 all_params.append('_return_http_data_only') 553 all_params.append('_preload_content') 554 all_params.append('_request_timeout') 555 556 params = locals() 557 for key, val in iteritems(params['kwargs']): 558 if key not in all_params: 559 raise TypeError( 560 "Got an unexpected keyword argument '%s'" 561 " to method get_bulk_send_batch_envelopes" % key 562 ) 563 params[key] = val 564 del params['kwargs'] 565 # verify the required parameter 'account_id' is set 566 if ('account_id' not in params) or (params['account_id'] is None): 567 raise ValueError("Missing the required parameter `account_id` when calling `get_bulk_send_batch_envelopes`") 568 # verify the required parameter 'bulk_send_batch_id' is set 569 if ('bulk_send_batch_id' not in params) or (params['bulk_send_batch_id'] is None): 570 raise ValueError("Missing the required parameter `bulk_send_batch_id` when calling `get_bulk_send_batch_envelopes`") 571 572 573 collection_formats = {} 574 575 resource_path = '/v2.1/accounts/{accountId}/bulk_send_batch/{bulkSendBatchId}/envelopes'.replace('{format}', 'json') 576 path_params = {} 577 if 'account_id' in params: 578 path_params['accountId'] = params['account_id'] 579 if 'bulk_send_batch_id' in params: 580 path_params['bulkSendBatchId'] = params['bulk_send_batch_id'] 581 582 query_params = {} 583 if 'count' in params: 584 query_params['count'] = params['count'] 585 if 'include' in params: 586 query_params['include'] = params['include'] 587 if 'order' in params: 588 query_params['order'] = params['order'] 589 if 'order_by' in params: 590 query_params['order_by'] = params['order_by'] 591 if 'search_text' in params: 592 query_params['search_text'] = params['search_text'] 593 if 'start_position' in params: 594 query_params['start_position'] = params['start_position'] 595 if 'status' in params: 596 query_params['status'] = params['status'] 597 598 header_params = {} 599 600 form_params = [] 601 local_var_files = {} 602 603 body_params = None 604 # HTTP header `Accept` 605 header_params['Accept'] = self.api_client.\ 606 select_header_accept(['application/json']) 607 608 # Authentication setting 609 auth_settings = [] 610 611 return self.api_client.call_api(resource_path, 'GET', 612 path_params, 613 query_params, 614 header_params, 615 body=body_params, 616 post_params=form_params, 617 files=local_var_files, 618 response_type='EnvelopesInformation', 619 auth_settings=auth_settings, 620 callback=params.get('callback'), 621 _return_http_data_only=params.get('_return_http_data_only'), 622 _preload_content=params.get('_preload_content', True), 623 _request_timeout=params.get('_request_timeout'), 624 collection_formats=collection_formats) 625 626 def get_bulk_send_batch_status(self, account_id, bulk_send_batch_id, **kwargs): 627 """ 628 Gets a specific bulk send batch status 629 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/) 630 This method makes a synchronous HTTP request by default. To make an 631 asynchronous HTTP request, please define a `callback` function 632 to be invoked when receiving the response. 633 >>> def callback_function(response): 634 >>> pprint(response) 635 >>> 636 >>> thread = api.get_bulk_send_batch_status(account_id, bulk_send_batch_id, callback=callback_function) 637 638 :param callback function: The callback function 639 for asynchronous request. (optional) 640 :param str account_id: The external account number (int) or account ID Guid. (required) 641 :param str bulk_send_batch_id: (required) 642 :return: BulkSendBatchStatus 643 If the method is called asynchronously, 644 returns the request thread. 645 """ 646 kwargs['_return_http_data_only'] = True 647 if kwargs.get('callback'): 648 return self.get_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, **kwargs) 649 else: 650 (data) = self.get_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, **kwargs) 651 return data 652 653 def get_bulk_send_batch_status_with_http_info(self, account_id, bulk_send_batch_id, **kwargs): 654 """ 655 Gets a specific bulk send batch status 656 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/) 657 This method makes a synchronous HTTP request by default. To make an 658 asynchronous HTTP request, please define a `callback` function 659 to be invoked when receiving the response. 660 >>> def callback_function(response): 661 >>> pprint(response) 662 >>> 663 >>> thread = api.get_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, callback=callback_function) 664 665 :param callback function: The callback function 666 for asynchronous request. (optional) 667 :param str account_id: The external account number (int) or account ID Guid. (required) 668 :param str bulk_send_batch_id: (required) 669 :return: BulkSendBatchStatus 670 If the method is called asynchronously, 671 returns the request thread. 672 """ 673 674 all_params = ['account_id', 'bulk_send_batch_id'] 675 all_params.append('callback') 676 all_params.append('_return_http_data_only') 677 all_params.append('_preload_content') 678 all_params.append('_request_timeout') 679 680 params = locals() 681 for key, val in iteritems(params['kwargs']): 682 if key not in all_params: 683 raise TypeError( 684 "Got an unexpected keyword argument '%s'" 685 " to method get_bulk_send_batch_status" % key 686 ) 687 params[key] = val 688 del params['kwargs'] 689 # verify the required parameter 'account_id' is set 690 if ('account_id' not in params) or (params['account_id'] is None): 691 raise ValueError("Missing the required parameter `account_id` when calling `get_bulk_send_batch_status`") 692 # verify the required parameter 'bulk_send_batch_id' is set 693 if ('bulk_send_batch_id' not in params) or (params['bulk_send_batch_id'] is None): 694 raise ValueError("Missing the required parameter `bulk_send_batch_id` when calling `get_bulk_send_batch_status`") 695 696 697 collection_formats = {} 698 699 resource_path = '/v2.1/accounts/{accountId}/bulk_send_batch/{bulkSendBatchId}'.replace('{format}', 'json') 700 path_params = {} 701 if 'account_id' in params: 702 path_params['accountId'] = params['account_id'] 703 if 'bulk_send_batch_id' in params: 704 path_params['bulkSendBatchId'] = params['bulk_send_batch_id'] 705 706 query_params = {} 707 708 header_params = {} 709 710 form_params = [] 711 local_var_files = {} 712 713 body_params = None 714 # HTTP header `Accept` 715 header_params['Accept'] = self.api_client.\ 716 select_header_accept(['application/json']) 717 718 # Authentication setting 719 auth_settings = [] 720 721 return self.api_client.call_api(resource_path, 'GET', 722 path_params, 723 query_params, 724 header_params, 725 body=body_params, 726 post_params=form_params, 727 files=local_var_files, 728 response_type='BulkSendBatchStatus', 729 auth_settings=auth_settings, 730 callback=params.get('callback'), 731 _return_http_data_only=params.get('_return_http_data_only'), 732 _preload_content=params.get('_preload_content', True), 733 _request_timeout=params.get('_request_timeout'), 734 collection_formats=collection_formats) 735 736 def get_bulk_send_batches(self, account_id, **kwargs): 737 """ 738 Returns a list of bulk send batch satuses initiated by account. 739 Returns a summary of bulk send batches. Use the `batch_ids` query parameter to narrow the list of batches. 740 This method makes a synchronous HTTP request by default. To make an 741 asynchronous HTTP request, please define a `callback` function 742 to be invoked when receiving the response. 743 >>> def callback_function(response): 744 >>> pprint(response) 745 >>> 746 >>> thread = api.get_bulk_send_batches(account_id, callback=callback_function) 747 748 :param callback function: The callback function 749 for asynchronous request. (optional) 750 :param str account_id: The external account number (int) or account ID Guid. (required) 751 :param str batch_ids: 752 :param str count: 753 :param str from_date: 754 :param str search_text: 755 :param str start_position: 756 :param str status: 757 :param str to_date: 758 :param str user_id: 759 :return: BulkSendBatchSummaries 760 If the method is called asynchronously, 761 returns the request thread. 762 """ 763 kwargs['_return_http_data_only'] = True 764 if kwargs.get('callback'): 765 return self.get_bulk_send_batches_with_http_info(account_id, **kwargs) 766 else: 767 (data) = self.get_bulk_send_batches_with_http_info(account_id, **kwargs) 768 return data 769 770 def get_bulk_send_batches_with_http_info(self, account_id, **kwargs): 771 """ 772 Returns a list of bulk send batch satuses initiated by account. 773 Returns a summary of bulk send batches. Use the `batch_ids` query parameter to narrow the list of batches. 774 This method makes a synchronous HTTP request by default. To make an 775 asynchronous HTTP request, please define a `callback` function 776 to be invoked when receiving the response. 777 >>> def callback_function(response): 778 >>> pprint(response) 779 >>> 780 >>> thread = api.get_bulk_send_batches_with_http_info(account_id, callback=callback_function) 781 782 :param callback function: The callback function 783 for asynchronous request. (optional) 784 :param str account_id: The external account number (int) or account ID Guid. (required) 785 :param str batch_ids: 786 :param str count: 787 :param str from_date: 788 :param str search_text: 789 :param str start_position: 790 :param str status: 791 :param str to_date: 792 :param str user_id: 793 :return: BulkSendBatchSummaries 794 If the method is called asynchronously, 795 returns the request thread. 796 """ 797 798 all_params = ['account_id', 'batch_ids', 'count', 'from_date', 'search_text', 'start_position', 'status', 'to_date', 'user_id'] 799 all_params.append('callback') 800 all_params.append('_return_http_data_only') 801 all_params.append('_preload_content') 802 all_params.append('_request_timeout') 803 804 params = locals() 805 for key, val in iteritems(params['kwargs']): 806 if key not in all_params: 807 raise TypeError( 808 "Got an unexpected keyword argument '%s'" 809 " to method get_bulk_send_batches" % key 810 ) 811 params[key] = val 812 del params['kwargs'] 813 # verify the required parameter 'account_id' is set 814 if ('account_id' not in params) or (params['account_id'] is None): 815 raise ValueError("Missing the required parameter `account_id` when calling `get_bulk_send_batches`") 816 817 818 collection_formats = {} 819 820 resource_path = '/v2.1/accounts/{accountId}/bulk_send_batch'.replace('{format}', 'json') 821 path_params = {} 822 if 'account_id' in params: 823 path_params['accountId'] = params['account_id'] 824 825 query_params = {} 826 if 'batch_ids' in params: 827 query_params['batch_ids'] = params['batch_ids'] 828 if 'count' in params: 829 query_params['count'] = params['count'] 830 if 'from_date' in params: 831 query_params['from_date'] = params['from_date'] 832 if 'search_text' in params: 833 query_params['search_text'] = params['search_text'] 834 if 'start_position' in params: 835 query_params['start_position'] = params['start_position'] 836 if 'status' in params: 837 query_params['status'] = params['status'] 838 if 'to_date' in params: 839 query_params['to_date'] = params['to_date'] 840 if 'user_id' in params: 841 query_params['user_id'] = params['user_id'] 842 843 header_params = {} 844 845 form_params = [] 846 local_var_files = {} 847 848 body_params = None 849 # HTTP header `Accept` 850 header_params['Accept'] = self.api_client.\ 851 select_header_accept(['application/json']) 852 853 # Authentication setting 854 auth_settings = [] 855 856 return self.api_client.call_api(resource_path, 'GET', 857 path_params, 858 query_params, 859 header_params, 860 body=body_params, 861 post_params=form_params, 862 files=local_var_files, 863 response_type='BulkSendBatchSummaries', 864 auth_settings=auth_settings, 865 callback=params.get('callback'), 866 _return_http_data_only=params.get('_return_http_data_only'), 867 _preload_content=params.get('_preload_content', True), 868 _request_timeout=params.get('_request_timeout'), 869 collection_formats=collection_formats) 870 871 def get_bulk_send_list(self, account_id, bulk_send_list_id, **kwargs): 872 """ 873 Gets a specific bulk send list 874 This method returns all of the details associated with a specific bulk send list that belongs to the current user. 875 This method makes a synchronous HTTP request by default. To make an 876 asynchronous HTTP request, please define a `callback` function 877 to be invoked when receiving the response. 878 >>> def callback_function(response): 879 >>> pprint(response) 880 >>> 881 >>> thread = api.get_bulk_send_list(account_id, bulk_send_list_id, callback=callback_function) 882 883 :param callback function: The callback function 884 for asynchronous request. (optional) 885 :param str account_id: The external account number (int) or account ID Guid. (required) 886 :param str bulk_send_list_id: (required) 887 :return: BulkSendingList 888 If the method is called asynchronously, 889 returns the request thread. 890 """ 891 kwargs['_return_http_data_only'] = True 892 if kwargs.get('callback'): 893 return self.get_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 894 else: 895 (data) = self.get_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 896 return data 897 898 def get_bulk_send_list_with_http_info(self, account_id, bulk_send_list_id, **kwargs): 899 """ 900 Gets a specific bulk send list 901 This method returns all of the details associated with a specific bulk send list that belongs to the current user. 902 This method makes a synchronous HTTP request by default. To make an 903 asynchronous HTTP request, please define a `callback` function 904 to be invoked when receiving the response. 905 >>> def callback_function(response): 906 >>> pprint(response) 907 >>> 908 >>> thread = api.get_bulk_send_list_with_http_info(account_id, bulk_send_list_id, callback=callback_function) 909 910 :param callback function: The callback function 911 for asynchronous request. (optional) 912 :param str account_id: The external account number (int) or account ID Guid. (required) 913 :param str bulk_send_list_id: (required) 914 :return: BulkSendingList 915 If the method is called asynchronously, 916 returns the request thread. 917 """ 918 919 all_params = ['account_id', 'bulk_send_list_id'] 920 all_params.append('callback') 921 all_params.append('_return_http_data_only') 922 all_params.append('_preload_content') 923 all_params.append('_request_timeout') 924 925 params = locals() 926 for key, val in iteritems(params['kwargs']): 927 if key not in all_params: 928 raise TypeError( 929 "Got an unexpected keyword argument '%s'" 930 " to method get_bulk_send_list" % key 931 ) 932 params[key] = val 933 del params['kwargs'] 934 # verify the required parameter 'account_id' is set 935 if ('account_id' not in params) or (params['account_id'] is None): 936 raise ValueError("Missing the required parameter `account_id` when calling `get_bulk_send_list`") 937 # verify the required parameter 'bulk_send_list_id' is set 938 if ('bulk_send_list_id' not in params) or (params['bulk_send_list_id'] is None): 939 raise ValueError("Missing the required parameter `bulk_send_list_id` when calling `get_bulk_send_list`") 940 941 942 collection_formats = {} 943 944 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}'.replace('{format}', 'json') 945 path_params = {} 946 if 'account_id' in params: 947 path_params['accountId'] = params['account_id'] 948 if 'bulk_send_list_id' in params: 949 path_params['bulkSendListId'] = params['bulk_send_list_id'] 950 951 query_params = {} 952 953 header_params = {} 954 955 form_params = [] 956 local_var_files = {} 957 958 body_params = None 959 # HTTP header `Accept` 960 header_params['Accept'] = self.api_client.\ 961 select_header_accept(['application/json']) 962 963 # Authentication setting 964 auth_settings = [] 965 966 return self.api_client.call_api(resource_path, 'GET', 967 path_params, 968 query_params, 969 header_params, 970 body=body_params, 971 post_params=form_params, 972 files=local_var_files, 973 response_type='BulkSendingList', 974 auth_settings=auth_settings, 975 callback=params.get('callback'), 976 _return_http_data_only=params.get('_return_http_data_only'), 977 _preload_content=params.get('_preload_content', True), 978 _request_timeout=params.get('_request_timeout'), 979 collection_formats=collection_formats) 980 981 def get_bulk_send_lists(self, account_id, **kwargs): 982 """ 983 Lists top-level details for all bulk send lists visible to the current user 984 This method returns a list of bulk send lists belonging to the current user, as well as basic information about each list. 985 This method makes a synchronous HTTP request by default. To make an 986 asynchronous HTTP request, please define a `callback` function 987 to be invoked when receiving the response. 988 >>> def callback_function(response): 989 >>> pprint(response) 990 >>> 991 >>> thread = api.get_bulk_send_lists(account_id, callback=callback_function) 992 993 :param callback function: The callback function 994 for asynchronous request. (optional) 995 :param str account_id: The external account number (int) or account ID Guid. (required) 996 :return: BulkSendingListSummaries 997 If the method is called asynchronously, 998 returns the request thread. 999 """ 1000 kwargs['_return_http_data_only'] = True 1001 if kwargs.get('callback'): 1002 return self.get_bulk_send_lists_with_http_info(account_id, **kwargs) 1003 else: 1004 (data) = self.get_bulk_send_lists_with_http_info(account_id, **kwargs) 1005 return data 1006 1007 def get_bulk_send_lists_with_http_info(self, account_id, **kwargs): 1008 """ 1009 Lists top-level details for all bulk send lists visible to the current user 1010 This method returns a list of bulk send lists belonging to the current user, as well as basic information about each list. 1011 This method makes a synchronous HTTP request by default. To make an 1012 asynchronous HTTP request, please define a `callback` function 1013 to be invoked when receiving the response. 1014 >>> def callback_function(response): 1015 >>> pprint(response) 1016 >>> 1017 >>> thread = api.get_bulk_send_lists_with_http_info(account_id, callback=callback_function) 1018 1019 :param callback function: The callback function 1020 for asynchronous request. (optional) 1021 :param str account_id: The external account number (int) or account ID Guid. (required) 1022 :return: BulkSendingListSummaries 1023 If the method is called asynchronously, 1024 returns the request thread. 1025 """ 1026 1027 all_params = ['account_id'] 1028 all_params.append('callback') 1029 all_params.append('_return_http_data_only') 1030 all_params.append('_preload_content') 1031 all_params.append('_request_timeout') 1032 1033 params = locals() 1034 for key, val in iteritems(params['kwargs']): 1035 if key not in all_params: 1036 raise TypeError( 1037 "Got an unexpected keyword argument '%s'" 1038 " to method get_bulk_send_lists" % key 1039 ) 1040 params[key] = val 1041 del params['kwargs'] 1042 # verify the required parameter 'account_id' is set 1043 if ('account_id' not in params) or (params['account_id'] is None): 1044 raise ValueError("Missing the required parameter `account_id` when calling `get_bulk_send_lists`") 1045 1046 1047 collection_formats = {} 1048 1049 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists'.replace('{format}', 'json') 1050 path_params = {} 1051 if 'account_id' in params: 1052 path_params['accountId'] = params['account_id'] 1053 1054 query_params = {} 1055 1056 header_params = {} 1057 1058 form_params = [] 1059 local_var_files = {} 1060 1061 body_params = None 1062 # HTTP header `Accept` 1063 header_params['Accept'] = self.api_client.\ 1064 select_header_accept(['application/json']) 1065 1066 # Authentication setting 1067 auth_settings = [] 1068 1069 return self.api_client.call_api(resource_path, 'GET', 1070 path_params, 1071 query_params, 1072 header_params, 1073 body=body_params, 1074 post_params=form_params, 1075 files=local_var_files, 1076 response_type='BulkSendingListSummaries', 1077 auth_settings=auth_settings, 1078 callback=params.get('callback'), 1079 _return_http_data_only=params.get('_return_http_data_only'), 1080 _preload_content=params.get('_preload_content', True), 1081 _request_timeout=params.get('_request_timeout'), 1082 collection_formats=collection_formats) 1083 1084 def update_bulk_send_batch_action(self, account_id, bulk_action, bulk_send_batch_id, **kwargs): 1085 """ 1086 Initiate a specific bulk send batch action 1087 1088 This method makes a synchronous HTTP request by default. To make an 1089 asynchronous HTTP request, please define a `callback` function 1090 to be invoked when receiving the response. 1091 >>> def callback_function(response): 1092 >>> pprint(response) 1093 >>> 1094 >>> thread = api.update_bulk_send_batch_action(account_id, bulk_action, bulk_send_batch_id, callback=callback_function) 1095 1096 :param callback function: The callback function 1097 for asynchronous request. (optional) 1098 :param str account_id: The external account number (int) or account ID Guid. (required) 1099 :param str bulk_action: (required) 1100 :param str bulk_send_batch_id: (required) 1101 :param BulkSendBatchActionRequest bulk_send_batch_action_request: 1102 :return: BulkSendBatchStatus 1103 If the method is called asynchronously, 1104 returns the request thread. 1105 """ 1106 kwargs['_return_http_data_only'] = True 1107 if kwargs.get('callback'): 1108 return self.update_bulk_send_batch_action_with_http_info(account_id, bulk_action, bulk_send_batch_id, **kwargs) 1109 else: 1110 (data) = self.update_bulk_send_batch_action_with_http_info(account_id, bulk_action, bulk_send_batch_id, **kwargs) 1111 return data 1112 1113 def update_bulk_send_batch_action_with_http_info(self, account_id, bulk_action, bulk_send_batch_id, **kwargs): 1114 """ 1115 Initiate a specific bulk send batch action 1116 1117 This method makes a synchronous HTTP request by default. To make an 1118 asynchronous HTTP request, please define a `callback` function 1119 to be invoked when receiving the response. 1120 >>> def callback_function(response): 1121 >>> pprint(response) 1122 >>> 1123 >>> thread = api.update_bulk_send_batch_action_with_http_info(account_id, bulk_action, bulk_send_batch_id, callback=callback_function) 1124 1125 :param callback function: The callback function 1126 for asynchronous request. (optional) 1127 :param str account_id: The external account number (int) or account ID Guid. (required) 1128 :param str bulk_action: (required) 1129 :param str bulk_send_batch_id: (required) 1130 :param BulkSendBatchActionRequest bulk_send_batch_action_request: 1131 :return: BulkSendBatchStatus 1132 If the method is called asynchronously, 1133 returns the request thread. 1134 """ 1135 1136 all_params = ['account_id', 'bulk_action', 'bulk_send_batch_id', 'bulk_send_batch_action_request'] 1137 all_params.append('callback') 1138 all_params.append('_return_http_data_only') 1139 all_params.append('_preload_content') 1140 all_params.append('_request_timeout') 1141 1142 params = locals() 1143 for key, val in iteritems(params['kwargs']): 1144 if key not in all_params: 1145 raise TypeError( 1146 "Got an unexpected keyword argument '%s'" 1147 " to method update_bulk_send_batch_action" % key 1148 ) 1149 params[key] = val 1150 del params['kwargs'] 1151 # verify the required parameter 'account_id' is set 1152 if ('account_id' not in params) or (params['account_id'] is None): 1153 raise ValueError("Missing the required parameter `account_id` when calling `update_bulk_send_batch_action`") 1154 # verify the required parameter 'bulk_action' is set 1155 if ('bulk_action' not in params) or (params['bulk_action'] is None): 1156 raise ValueError("Missing the required parameter `bulk_action` when calling `update_bulk_send_batch_action`") 1157 # verify the required parameter 'bulk_send_batch_id' is set 1158 if ('bulk_send_batch_id' not in params) or (params['bulk_send_batch_id'] is None): 1159 raise ValueError("Missing the required parameter `bulk_send_batch_id` when calling `update_bulk_send_batch_action`") 1160 1161 1162 collection_formats = {} 1163 1164 resource_path = '/v2.1/accounts/{accountId}/bulk_send_batch/{bulkSendBatchId}/{bulkAction}'.replace('{format}', 'json') 1165 path_params = {} 1166 if 'account_id' in params: 1167 path_params['accountId'] = params['account_id'] 1168 if 'bulk_action' in params: 1169 path_params['bulkAction'] = params['bulk_action'] 1170 if 'bulk_send_batch_id' in params: 1171 path_params['bulkSendBatchId'] = params['bulk_send_batch_id'] 1172 1173 query_params = {} 1174 1175 header_params = {} 1176 1177 form_params = [] 1178 local_var_files = {} 1179 1180 body_params = None 1181 if 'bulk_send_batch_action_request' in params: 1182 body_params = params['bulk_send_batch_action_request'] 1183 # HTTP header `Accept` 1184 header_params['Accept'] = self.api_client.\ 1185 select_header_accept(['application/json']) 1186 1187 # Authentication setting 1188 auth_settings = [] 1189 1190 return self.api_client.call_api(resource_path, 'PUT', 1191 path_params, 1192 query_params, 1193 header_params, 1194 body=body_params, 1195 post_params=form_params, 1196 files=local_var_files, 1197 response_type='BulkSendBatchStatus', 1198 auth_settings=auth_settings, 1199 callback=params.get('callback'), 1200 _return_http_data_only=params.get('_return_http_data_only'), 1201 _preload_content=params.get('_preload_content', True), 1202 _request_timeout=params.get('_request_timeout'), 1203 collection_formats=collection_formats) 1204 1205 def update_bulk_send_batch_status(self, account_id, bulk_send_batch_id, **kwargs): 1206 """ 1207 Put/Update a specific bulk send batch status 1208 Updates a specific bulk send batch status. 1209 This method makes a synchronous HTTP request by default. To make an 1210 asynchronous HTTP request, please define a `callback` function 1211 to be invoked when receiving the response. 1212 >>> def callback_function(response): 1213 >>> pprint(response) 1214 >>> 1215 >>> thread = api.update_bulk_send_batch_status(account_id, bulk_send_batch_id, callback=callback_function) 1216 1217 :param callback function: The callback function 1218 for asynchronous request. (optional) 1219 :param str account_id: The external account number (int) or account ID Guid. (required) 1220 :param str bulk_send_batch_id: (required) 1221 :param BulkSendBatchRequest bulk_send_batch_request: 1222 :return: BulkSendBatchStatus 1223 If the method is called asynchronously, 1224 returns the request thread. 1225 """ 1226 kwargs['_return_http_data_only'] = True 1227 if kwargs.get('callback'): 1228 return self.update_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, **kwargs) 1229 else: 1230 (data) = self.update_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, **kwargs) 1231 return data 1232 1233 def update_bulk_send_batch_status_with_http_info(self, account_id, bulk_send_batch_id, **kwargs): 1234 """ 1235 Put/Update a specific bulk send batch status 1236 Updates a specific bulk send batch status. 1237 This method makes a synchronous HTTP request by default. To make an 1238 asynchronous HTTP request, please define a `callback` function 1239 to be invoked when receiving the response. 1240 >>> def callback_function(response): 1241 >>> pprint(response) 1242 >>> 1243 >>> thread = api.update_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, callback=callback_function) 1244 1245 :param callback function: The callback function 1246 for asynchronous request. (optional) 1247 :param str account_id: The external account number (int) or account ID Guid. (required) 1248 :param str bulk_send_batch_id: (required) 1249 :param BulkSendBatchRequest bulk_send_batch_request: 1250 :return: BulkSendBatchStatus 1251 If the method is called asynchronously, 1252 returns the request thread. 1253 """ 1254 1255 all_params = ['account_id', 'bulk_send_batch_id', 'bulk_send_batch_request'] 1256 all_params.append('callback') 1257 all_params.append('_return_http_data_only') 1258 all_params.append('_preload_content') 1259 all_params.append('_request_timeout') 1260 1261 params = locals() 1262 for key, val in iteritems(params['kwargs']): 1263 if key not in all_params: 1264 raise TypeError( 1265 "Got an unexpected keyword argument '%s'" 1266 " to method update_bulk_send_batch_status" % key 1267 ) 1268 params[key] = val 1269 del params['kwargs'] 1270 # verify the required parameter 'account_id' is set 1271 if ('account_id' not in params) or (params['account_id'] is None): 1272 raise ValueError("Missing the required parameter `account_id` when calling `update_bulk_send_batch_status`") 1273 # verify the required parameter 'bulk_send_batch_id' is set 1274 if ('bulk_send_batch_id' not in params) or (params['bulk_send_batch_id'] is None): 1275 raise ValueError("Missing the required parameter `bulk_send_batch_id` when calling `update_bulk_send_batch_status`") 1276 1277 1278 collection_formats = {} 1279 1280 resource_path = '/v2.1/accounts/{accountId}/bulk_send_batch/{bulkSendBatchId}'.replace('{format}', 'json') 1281 path_params = {} 1282 if 'account_id' in params: 1283 path_params['accountId'] = params['account_id'] 1284 if 'bulk_send_batch_id' in params: 1285 path_params['bulkSendBatchId'] = params['bulk_send_batch_id'] 1286 1287 query_params = {} 1288 1289 header_params = {} 1290 1291 form_params = [] 1292 local_var_files = {} 1293 1294 body_params = None 1295 if 'bulk_send_batch_request' in params: 1296 body_params = params['bulk_send_batch_request'] 1297 # HTTP header `Accept` 1298 header_params['Accept'] = self.api_client.\ 1299 select_header_accept(['application/json']) 1300 1301 # Authentication setting 1302 auth_settings = [] 1303 1304 return self.api_client.call_api(resource_path, 'PUT', 1305 path_params, 1306 query_params, 1307 header_params, 1308 body=body_params, 1309 post_params=form_params, 1310 files=local_var_files, 1311 response_type='BulkSendBatchStatus', 1312 auth_settings=auth_settings, 1313 callback=params.get('callback'), 1314 _return_http_data_only=params.get('_return_http_data_only'), 1315 _preload_content=params.get('_preload_content', True), 1316 _request_timeout=params.get('_request_timeout'), 1317 collection_formats=collection_formats) 1318 1319 def update_bulk_send_list(self, account_id, bulk_send_list_id, **kwargs): 1320 """ 1321 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 1322 This method replaces the definition of an existing bulk send list. 1323 This method makes a synchronous HTTP request by default. To make an 1324 asynchronous HTTP request, please define a `callback` function 1325 to be invoked when receiving the response. 1326 >>> def callback_function(response): 1327 >>> pprint(response) 1328 >>> 1329 >>> thread = api.update_bulk_send_list(account_id, bulk_send_list_id, callback=callback_function) 1330 1331 :param callback function: The callback function 1332 for asynchronous request. (optional) 1333 :param str account_id: The external account number (int) or account ID Guid. (required) 1334 :param str bulk_send_list_id: (required) 1335 :param BulkSendingList bulk_sending_list: 1336 :return: BulkSendingList 1337 If the method is called asynchronously, 1338 returns the request thread. 1339 """ 1340 kwargs['_return_http_data_only'] = True 1341 if kwargs.get('callback'): 1342 return self.update_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 1343 else: 1344 (data) = self.update_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 1345 return data 1346 1347 def update_bulk_send_list_with_http_info(self, account_id, bulk_send_list_id, **kwargs): 1348 """ 1349 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 1350 This method replaces the definition of an existing bulk send list. 1351 This method makes a synchronous HTTP request by default. To make an 1352 asynchronous HTTP request, please define a `callback` function 1353 to be invoked when receiving the response. 1354 >>> def callback_function(response): 1355 >>> pprint(response) 1356 >>> 1357 >>> thread = api.update_bulk_send_list_with_http_info(account_id, bulk_send_list_id, callback=callback_function) 1358 1359 :param callback function: The callback function 1360 for asynchronous request. (optional) 1361 :param str account_id: The external account number (int) or account ID Guid. (required) 1362 :param str bulk_send_list_id: (required) 1363 :param BulkSendingList bulk_sending_list: 1364 :return: BulkSendingList 1365 If the method is called asynchronously, 1366 returns the request thread. 1367 """ 1368 1369 all_params = ['account_id', 'bulk_send_list_id', 'bulk_sending_list'] 1370 all_params.append('callback') 1371 all_params.append('_return_http_data_only') 1372 all_params.append('_preload_content') 1373 all_params.append('_request_timeout') 1374 1375 params = locals() 1376 for key, val in iteritems(params['kwargs']): 1377 if key not in all_params: 1378 raise TypeError( 1379 "Got an unexpected keyword argument '%s'" 1380 " to method update_bulk_send_list" % key 1381 ) 1382 params[key] = val 1383 del params['kwargs'] 1384 # verify the required parameter 'account_id' is set 1385 if ('account_id' not in params) or (params['account_id'] is None): 1386 raise ValueError("Missing the required parameter `account_id` when calling `update_bulk_send_list`") 1387 # verify the required parameter 'bulk_send_list_id' is set 1388 if ('bulk_send_list_id' not in params) or (params['bulk_send_list_id'] is None): 1389 raise ValueError("Missing the required parameter `bulk_send_list_id` when calling `update_bulk_send_list`") 1390 1391 1392 collection_formats = {} 1393 1394 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}'.replace('{format}', 'json') 1395 path_params = {} 1396 if 'account_id' in params: 1397 path_params['accountId'] = params['account_id'] 1398 if 'bulk_send_list_id' in params: 1399 path_params['bulkSendListId'] = params['bulk_send_list_id'] 1400 1401 query_params = {} 1402 1403 header_params = {} 1404 1405 form_params = [] 1406 local_var_files = {} 1407 1408 body_params = None 1409 if 'bulk_sending_list' in params: 1410 body_params = params['bulk_sending_list'] 1411 # HTTP header `Accept` 1412 header_params['Accept'] = self.api_client.\ 1413 select_header_accept(['application/json']) 1414 1415 # Authentication setting 1416 auth_settings = [] 1417 1418 return self.api_client.call_api(resource_path, 'PUT', 1419 path_params, 1420 query_params, 1421 header_params, 1422 body=body_params, 1423 post_params=form_params, 1424 files=local_var_files, 1425 response_type='BulkSendingList', 1426 auth_settings=auth_settings, 1427 callback=params.get('callback'), 1428 _return_http_data_only=params.get('_return_http_data_only'), 1429 _preload_content=params.get('_preload_content', True), 1430 _request_timeout=params.get('_request_timeout'), 1431 collection_formats=collection_formats)
28class BulkEnvelopesApi(object): 29 """ 30 NOTE: This class is auto generated by the swagger code generator program. 31 Do not edit the class manually. 32 Ref: https://github.com/swagger-api/swagger-codegen 33 """ 34 35 def __init__(self, api_client=None): 36 config = Configuration() 37 if api_client: 38 self.api_client = api_client 39 else: 40 if not config.api_client: 41 config.api_client = ApiClient() 42 self.api_client = config.api_client 43 44 def create_bulk_send_list(self, account_id, **kwargs): 45 """ 46 Creates a new bulk send list 47 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. | 48 This method makes a synchronous HTTP request by default. To make an 49 asynchronous HTTP request, please define a `callback` function 50 to be invoked when receiving the response. 51 >>> def callback_function(response): 52 >>> pprint(response) 53 >>> 54 >>> thread = api.create_bulk_send_list(account_id, callback=callback_function) 55 56 :param callback function: The callback function 57 for asynchronous request. (optional) 58 :param str account_id: The external account number (int) or account ID Guid. (required) 59 :param BulkSendingList bulk_sending_list: 60 :return: BulkSendingList 61 If the method is called asynchronously, 62 returns the request thread. 63 """ 64 kwargs['_return_http_data_only'] = True 65 if kwargs.get('callback'): 66 return self.create_bulk_send_list_with_http_info(account_id, **kwargs) 67 else: 68 (data) = self.create_bulk_send_list_with_http_info(account_id, **kwargs) 69 return data 70 71 def create_bulk_send_list_with_http_info(self, account_id, **kwargs): 72 """ 73 Creates a new bulk send list 74 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. | 75 This method makes a synchronous HTTP request by default. To make an 76 asynchronous HTTP request, please define a `callback` function 77 to be invoked when receiving the response. 78 >>> def callback_function(response): 79 >>> pprint(response) 80 >>> 81 >>> thread = api.create_bulk_send_list_with_http_info(account_id, callback=callback_function) 82 83 :param callback function: The callback function 84 for asynchronous request. (optional) 85 :param str account_id: The external account number (int) or account ID Guid. (required) 86 :param BulkSendingList bulk_sending_list: 87 :return: BulkSendingList 88 If the method is called asynchronously, 89 returns the request thread. 90 """ 91 92 all_params = ['account_id', 'bulk_sending_list'] 93 all_params.append('callback') 94 all_params.append('_return_http_data_only') 95 all_params.append('_preload_content') 96 all_params.append('_request_timeout') 97 98 params = locals() 99 for key, val in iteritems(params['kwargs']): 100 if key not in all_params: 101 raise TypeError( 102 "Got an unexpected keyword argument '%s'" 103 " to method create_bulk_send_list" % key 104 ) 105 params[key] = val 106 del params['kwargs'] 107 # verify the required parameter 'account_id' is set 108 if ('account_id' not in params) or (params['account_id'] is None): 109 raise ValueError("Missing the required parameter `account_id` when calling `create_bulk_send_list`") 110 111 112 collection_formats = {} 113 114 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists'.replace('{format}', 'json') 115 path_params = {} 116 if 'account_id' in params: 117 path_params['accountId'] = params['account_id'] 118 119 query_params = {} 120 121 header_params = {} 122 123 form_params = [] 124 local_var_files = {} 125 126 body_params = None 127 if 'bulk_sending_list' in params: 128 body_params = params['bulk_sending_list'] 129 # HTTP header `Accept` 130 header_params['Accept'] = self.api_client.\ 131 select_header_accept(['application/json']) 132 133 # Authentication setting 134 auth_settings = [] 135 136 return self.api_client.call_api(resource_path, 'POST', 137 path_params, 138 query_params, 139 header_params, 140 body=body_params, 141 post_params=form_params, 142 files=local_var_files, 143 response_type='BulkSendingList', 144 auth_settings=auth_settings, 145 callback=params.get('callback'), 146 _return_http_data_only=params.get('_return_http_data_only'), 147 _preload_content=params.get('_preload_content', True), 148 _request_timeout=params.get('_request_timeout'), 149 collection_formats=collection_formats) 150 151 def create_bulk_send_request(self, account_id, bulk_send_list_id, **kwargs): 152 """ 153 Uses the specified bulk send list to send the envelope specified in the payload 154 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/ 155 This method makes a synchronous HTTP request by default. To make an 156 asynchronous HTTP request, please define a `callback` function 157 to be invoked when receiving the response. 158 >>> def callback_function(response): 159 >>> pprint(response) 160 >>> 161 >>> thread = api.create_bulk_send_request(account_id, bulk_send_list_id, callback=callback_function) 162 163 :param callback function: The callback function 164 for asynchronous request. (optional) 165 :param str account_id: The external account number (int) or account ID Guid. (required) 166 :param str bulk_send_list_id: (required) 167 :param BulkSendRequest bulk_send_request: 168 :return: BulkSendResponse 169 If the method is called asynchronously, 170 returns the request thread. 171 """ 172 kwargs['_return_http_data_only'] = True 173 if kwargs.get('callback'): 174 return self.create_bulk_send_request_with_http_info(account_id, bulk_send_list_id, **kwargs) 175 else: 176 (data) = self.create_bulk_send_request_with_http_info(account_id, bulk_send_list_id, **kwargs) 177 return data 178 179 def create_bulk_send_request_with_http_info(self, account_id, bulk_send_list_id, **kwargs): 180 """ 181 Uses the specified bulk send list to send the envelope specified in the payload 182 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/ 183 This method makes a synchronous HTTP request by default. To make an 184 asynchronous HTTP request, please define a `callback` function 185 to be invoked when receiving the response. 186 >>> def callback_function(response): 187 >>> pprint(response) 188 >>> 189 >>> thread = api.create_bulk_send_request_with_http_info(account_id, bulk_send_list_id, callback=callback_function) 190 191 :param callback function: The callback function 192 for asynchronous request. (optional) 193 :param str account_id: The external account number (int) or account ID Guid. (required) 194 :param str bulk_send_list_id: (required) 195 :param BulkSendRequest bulk_send_request: 196 :return: BulkSendResponse 197 If the method is called asynchronously, 198 returns the request thread. 199 """ 200 201 all_params = ['account_id', 'bulk_send_list_id', 'bulk_send_request'] 202 all_params.append('callback') 203 all_params.append('_return_http_data_only') 204 all_params.append('_preload_content') 205 all_params.append('_request_timeout') 206 207 params = locals() 208 for key, val in iteritems(params['kwargs']): 209 if key not in all_params: 210 raise TypeError( 211 "Got an unexpected keyword argument '%s'" 212 " to method create_bulk_send_request" % key 213 ) 214 params[key] = val 215 del params['kwargs'] 216 # verify the required parameter 'account_id' is set 217 if ('account_id' not in params) or (params['account_id'] is None): 218 raise ValueError("Missing the required parameter `account_id` when calling `create_bulk_send_request`") 219 # verify the required parameter 'bulk_send_list_id' is set 220 if ('bulk_send_list_id' not in params) or (params['bulk_send_list_id'] is None): 221 raise ValueError("Missing the required parameter `bulk_send_list_id` when calling `create_bulk_send_request`") 222 223 224 collection_formats = {} 225 226 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}/send'.replace('{format}', 'json') 227 path_params = {} 228 if 'account_id' in params: 229 path_params['accountId'] = params['account_id'] 230 if 'bulk_send_list_id' in params: 231 path_params['bulkSendListId'] = params['bulk_send_list_id'] 232 233 query_params = {} 234 235 header_params = {} 236 237 form_params = [] 238 local_var_files = {} 239 240 body_params = None 241 if 'bulk_send_request' in params: 242 body_params = params['bulk_send_request'] 243 # HTTP header `Accept` 244 header_params['Accept'] = self.api_client.\ 245 select_header_accept(['application/json']) 246 247 # Authentication setting 248 auth_settings = [] 249 250 return self.api_client.call_api(resource_path, 'POST', 251 path_params, 252 query_params, 253 header_params, 254 body=body_params, 255 post_params=form_params, 256 files=local_var_files, 257 response_type='BulkSendResponse', 258 auth_settings=auth_settings, 259 callback=params.get('callback'), 260 _return_http_data_only=params.get('_return_http_data_only'), 261 _preload_content=params.get('_preload_content', True), 262 _request_timeout=params.get('_request_timeout'), 263 collection_formats=collection_formats) 264 265 def create_bulk_send_test_request(self, account_id, bulk_send_list_id, **kwargs): 266 """ 267 Tests whether the specified bulk sending list can be used to send an envelope 268 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/ 269 This method makes a synchronous HTTP request by default. To make an 270 asynchronous HTTP request, please define a `callback` function 271 to be invoked when receiving the response. 272 >>> def callback_function(response): 273 >>> pprint(response) 274 >>> 275 >>> thread = api.create_bulk_send_test_request(account_id, bulk_send_list_id, callback=callback_function) 276 277 :param callback function: The callback function 278 for asynchronous request. (optional) 279 :param str account_id: The external account number (int) or account ID Guid. (required) 280 :param str bulk_send_list_id: (required) 281 :param BulkSendRequest bulk_send_request: 282 :return: BulkSendTestResponse 283 If the method is called asynchronously, 284 returns the request thread. 285 """ 286 kwargs['_return_http_data_only'] = True 287 if kwargs.get('callback'): 288 return self.create_bulk_send_test_request_with_http_info(account_id, bulk_send_list_id, **kwargs) 289 else: 290 (data) = self.create_bulk_send_test_request_with_http_info(account_id, bulk_send_list_id, **kwargs) 291 return data 292 293 def create_bulk_send_test_request_with_http_info(self, account_id, bulk_send_list_id, **kwargs): 294 """ 295 Tests whether the specified bulk sending list can be used to send an envelope 296 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/ 297 This method makes a synchronous HTTP request by default. To make an 298 asynchronous HTTP request, please define a `callback` function 299 to be invoked when receiving the response. 300 >>> def callback_function(response): 301 >>> pprint(response) 302 >>> 303 >>> thread = api.create_bulk_send_test_request_with_http_info(account_id, bulk_send_list_id, callback=callback_function) 304 305 :param callback function: The callback function 306 for asynchronous request. (optional) 307 :param str account_id: The external account number (int) or account ID Guid. (required) 308 :param str bulk_send_list_id: (required) 309 :param BulkSendRequest bulk_send_request: 310 :return: BulkSendTestResponse 311 If the method is called asynchronously, 312 returns the request thread. 313 """ 314 315 all_params = ['account_id', 'bulk_send_list_id', 'bulk_send_request'] 316 all_params.append('callback') 317 all_params.append('_return_http_data_only') 318 all_params.append('_preload_content') 319 all_params.append('_request_timeout') 320 321 params = locals() 322 for key, val in iteritems(params['kwargs']): 323 if key not in all_params: 324 raise TypeError( 325 "Got an unexpected keyword argument '%s'" 326 " to method create_bulk_send_test_request" % key 327 ) 328 params[key] = val 329 del params['kwargs'] 330 # verify the required parameter 'account_id' is set 331 if ('account_id' not in params) or (params['account_id'] is None): 332 raise ValueError("Missing the required parameter `account_id` when calling `create_bulk_send_test_request`") 333 # verify the required parameter 'bulk_send_list_id' is set 334 if ('bulk_send_list_id' not in params) or (params['bulk_send_list_id'] is None): 335 raise ValueError("Missing the required parameter `bulk_send_list_id` when calling `create_bulk_send_test_request`") 336 337 338 collection_formats = {} 339 340 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}/test'.replace('{format}', 'json') 341 path_params = {} 342 if 'account_id' in params: 343 path_params['accountId'] = params['account_id'] 344 if 'bulk_send_list_id' in params: 345 path_params['bulkSendListId'] = params['bulk_send_list_id'] 346 347 query_params = {} 348 349 header_params = {} 350 351 form_params = [] 352 local_var_files = {} 353 354 body_params = None 355 if 'bulk_send_request' in params: 356 body_params = params['bulk_send_request'] 357 # HTTP header `Accept` 358 header_params['Accept'] = self.api_client.\ 359 select_header_accept(['application/json']) 360 361 # Authentication setting 362 auth_settings = [] 363 364 return self.api_client.call_api(resource_path, 'POST', 365 path_params, 366 query_params, 367 header_params, 368 body=body_params, 369 post_params=form_params, 370 files=local_var_files, 371 response_type='BulkSendTestResponse', 372 auth_settings=auth_settings, 373 callback=params.get('callback'), 374 _return_http_data_only=params.get('_return_http_data_only'), 375 _preload_content=params.get('_preload_content', True), 376 _request_timeout=params.get('_request_timeout'), 377 collection_formats=collection_formats) 378 379 def delete_bulk_send_list(self, account_id, bulk_send_list_id, **kwargs): 380 """ 381 Deletes an existing bulk send list 382 This method deletes a bulk send list. 383 This method makes a synchronous HTTP request by default. To make an 384 asynchronous HTTP request, please define a `callback` function 385 to be invoked when receiving the response. 386 >>> def callback_function(response): 387 >>> pprint(response) 388 >>> 389 >>> thread = api.delete_bulk_send_list(account_id, bulk_send_list_id, callback=callback_function) 390 391 :param callback function: The callback function 392 for asynchronous request. (optional) 393 :param str account_id: The external account number (int) or account ID Guid. (required) 394 :param str bulk_send_list_id: (required) 395 :return: BulkSendingListSummaries 396 If the method is called asynchronously, 397 returns the request thread. 398 """ 399 kwargs['_return_http_data_only'] = True 400 if kwargs.get('callback'): 401 return self.delete_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 402 else: 403 (data) = self.delete_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 404 return data 405 406 def delete_bulk_send_list_with_http_info(self, account_id, bulk_send_list_id, **kwargs): 407 """ 408 Deletes an existing bulk send list 409 This method deletes a bulk send list. 410 This method makes a synchronous HTTP request by default. To make an 411 asynchronous HTTP request, please define a `callback` function 412 to be invoked when receiving the response. 413 >>> def callback_function(response): 414 >>> pprint(response) 415 >>> 416 >>> thread = api.delete_bulk_send_list_with_http_info(account_id, bulk_send_list_id, callback=callback_function) 417 418 :param callback function: The callback function 419 for asynchronous request. (optional) 420 :param str account_id: The external account number (int) or account ID Guid. (required) 421 :param str bulk_send_list_id: (required) 422 :return: BulkSendingListSummaries 423 If the method is called asynchronously, 424 returns the request thread. 425 """ 426 427 all_params = ['account_id', 'bulk_send_list_id'] 428 all_params.append('callback') 429 all_params.append('_return_http_data_only') 430 all_params.append('_preload_content') 431 all_params.append('_request_timeout') 432 433 params = locals() 434 for key, val in iteritems(params['kwargs']): 435 if key not in all_params: 436 raise TypeError( 437 "Got an unexpected keyword argument '%s'" 438 " to method delete_bulk_send_list" % key 439 ) 440 params[key] = val 441 del params['kwargs'] 442 # verify the required parameter 'account_id' is set 443 if ('account_id' not in params) or (params['account_id'] is None): 444 raise ValueError("Missing the required parameter `account_id` when calling `delete_bulk_send_list`") 445 # verify the required parameter 'bulk_send_list_id' is set 446 if ('bulk_send_list_id' not in params) or (params['bulk_send_list_id'] is None): 447 raise ValueError("Missing the required parameter `bulk_send_list_id` when calling `delete_bulk_send_list`") 448 449 450 collection_formats = {} 451 452 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}'.replace('{format}', 'json') 453 path_params = {} 454 if 'account_id' in params: 455 path_params['accountId'] = params['account_id'] 456 if 'bulk_send_list_id' in params: 457 path_params['bulkSendListId'] = params['bulk_send_list_id'] 458 459 query_params = {} 460 461 header_params = {} 462 463 form_params = [] 464 local_var_files = {} 465 466 body_params = None 467 # HTTP header `Accept` 468 header_params['Accept'] = self.api_client.\ 469 select_header_accept(['application/json']) 470 471 # Authentication setting 472 auth_settings = [] 473 474 return self.api_client.call_api(resource_path, 'DELETE', 475 path_params, 476 query_params, 477 header_params, 478 body=body_params, 479 post_params=form_params, 480 files=local_var_files, 481 response_type='BulkSendingListSummaries', 482 auth_settings=auth_settings, 483 callback=params.get('callback'), 484 _return_http_data_only=params.get('_return_http_data_only'), 485 _preload_content=params.get('_preload_content', True), 486 _request_timeout=params.get('_request_timeout'), 487 collection_formats=collection_formats) 488 489 def get_bulk_send_batch_envelopes(self, account_id, bulk_send_batch_id, **kwargs): 490 """ 491 Gets envelopes from a specific bulk send batch 492 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. 493 This method makes a synchronous HTTP request by default. To make an 494 asynchronous HTTP request, please define a `callback` function 495 to be invoked when receiving the response. 496 >>> def callback_function(response): 497 >>> pprint(response) 498 >>> 499 >>> thread = api.get_bulk_send_batch_envelopes(account_id, bulk_send_batch_id, callback=callback_function) 500 501 :param callback function: The callback function 502 for asynchronous request. (optional) 503 :param str account_id: The external account number (int) or account ID Guid. (required) 504 :param str bulk_send_batch_id: (required) 505 :param str count: 506 :param str include: 507 :param str order: 508 :param str order_by: 509 :param str search_text: 510 :param str start_position: 511 :param str status: 512 :return: EnvelopesInformation 513 If the method is called asynchronously, 514 returns the request thread. 515 """ 516 kwargs['_return_http_data_only'] = True 517 if kwargs.get('callback'): 518 return self.get_bulk_send_batch_envelopes_with_http_info(account_id, bulk_send_batch_id, **kwargs) 519 else: 520 (data) = self.get_bulk_send_batch_envelopes_with_http_info(account_id, bulk_send_batch_id, **kwargs) 521 return data 522 523 def get_bulk_send_batch_envelopes_with_http_info(self, account_id, bulk_send_batch_id, **kwargs): 524 """ 525 Gets envelopes from a specific bulk send batch 526 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. 527 This method makes a synchronous HTTP request by default. To make an 528 asynchronous HTTP request, please define a `callback` function 529 to be invoked when receiving the response. 530 >>> def callback_function(response): 531 >>> pprint(response) 532 >>> 533 >>> thread = api.get_bulk_send_batch_envelopes_with_http_info(account_id, bulk_send_batch_id, callback=callback_function) 534 535 :param callback function: The callback function 536 for asynchronous request. (optional) 537 :param str account_id: The external account number (int) or account ID Guid. (required) 538 :param str bulk_send_batch_id: (required) 539 :param str count: 540 :param str include: 541 :param str order: 542 :param str order_by: 543 :param str search_text: 544 :param str start_position: 545 :param str status: 546 :return: EnvelopesInformation 547 If the method is called asynchronously, 548 returns the request thread. 549 """ 550 551 all_params = ['account_id', 'bulk_send_batch_id', 'count', 'include', 'order', 'order_by', 'search_text', 'start_position', 'status'] 552 all_params.append('callback') 553 all_params.append('_return_http_data_only') 554 all_params.append('_preload_content') 555 all_params.append('_request_timeout') 556 557 params = locals() 558 for key, val in iteritems(params['kwargs']): 559 if key not in all_params: 560 raise TypeError( 561 "Got an unexpected keyword argument '%s'" 562 " to method get_bulk_send_batch_envelopes" % key 563 ) 564 params[key] = val 565 del params['kwargs'] 566 # verify the required parameter 'account_id' is set 567 if ('account_id' not in params) or (params['account_id'] is None): 568 raise ValueError("Missing the required parameter `account_id` when calling `get_bulk_send_batch_envelopes`") 569 # verify the required parameter 'bulk_send_batch_id' is set 570 if ('bulk_send_batch_id' not in params) or (params['bulk_send_batch_id'] is None): 571 raise ValueError("Missing the required parameter `bulk_send_batch_id` when calling `get_bulk_send_batch_envelopes`") 572 573 574 collection_formats = {} 575 576 resource_path = '/v2.1/accounts/{accountId}/bulk_send_batch/{bulkSendBatchId}/envelopes'.replace('{format}', 'json') 577 path_params = {} 578 if 'account_id' in params: 579 path_params['accountId'] = params['account_id'] 580 if 'bulk_send_batch_id' in params: 581 path_params['bulkSendBatchId'] = params['bulk_send_batch_id'] 582 583 query_params = {} 584 if 'count' in params: 585 query_params['count'] = params['count'] 586 if 'include' in params: 587 query_params['include'] = params['include'] 588 if 'order' in params: 589 query_params['order'] = params['order'] 590 if 'order_by' in params: 591 query_params['order_by'] = params['order_by'] 592 if 'search_text' in params: 593 query_params['search_text'] = params['search_text'] 594 if 'start_position' in params: 595 query_params['start_position'] = params['start_position'] 596 if 'status' in params: 597 query_params['status'] = params['status'] 598 599 header_params = {} 600 601 form_params = [] 602 local_var_files = {} 603 604 body_params = None 605 # HTTP header `Accept` 606 header_params['Accept'] = self.api_client.\ 607 select_header_accept(['application/json']) 608 609 # Authentication setting 610 auth_settings = [] 611 612 return self.api_client.call_api(resource_path, 'GET', 613 path_params, 614 query_params, 615 header_params, 616 body=body_params, 617 post_params=form_params, 618 files=local_var_files, 619 response_type='EnvelopesInformation', 620 auth_settings=auth_settings, 621 callback=params.get('callback'), 622 _return_http_data_only=params.get('_return_http_data_only'), 623 _preload_content=params.get('_preload_content', True), 624 _request_timeout=params.get('_request_timeout'), 625 collection_formats=collection_formats) 626 627 def get_bulk_send_batch_status(self, account_id, bulk_send_batch_id, **kwargs): 628 """ 629 Gets a specific bulk send batch status 630 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/) 631 This method makes a synchronous HTTP request by default. To make an 632 asynchronous HTTP request, please define a `callback` function 633 to be invoked when receiving the response. 634 >>> def callback_function(response): 635 >>> pprint(response) 636 >>> 637 >>> thread = api.get_bulk_send_batch_status(account_id, bulk_send_batch_id, callback=callback_function) 638 639 :param callback function: The callback function 640 for asynchronous request. (optional) 641 :param str account_id: The external account number (int) or account ID Guid. (required) 642 :param str bulk_send_batch_id: (required) 643 :return: BulkSendBatchStatus 644 If the method is called asynchronously, 645 returns the request thread. 646 """ 647 kwargs['_return_http_data_only'] = True 648 if kwargs.get('callback'): 649 return self.get_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, **kwargs) 650 else: 651 (data) = self.get_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, **kwargs) 652 return data 653 654 def get_bulk_send_batch_status_with_http_info(self, account_id, bulk_send_batch_id, **kwargs): 655 """ 656 Gets a specific bulk send batch status 657 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/) 658 This method makes a synchronous HTTP request by default. To make an 659 asynchronous HTTP request, please define a `callback` function 660 to be invoked when receiving the response. 661 >>> def callback_function(response): 662 >>> pprint(response) 663 >>> 664 >>> thread = api.get_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, callback=callback_function) 665 666 :param callback function: The callback function 667 for asynchronous request. (optional) 668 :param str account_id: The external account number (int) or account ID Guid. (required) 669 :param str bulk_send_batch_id: (required) 670 :return: BulkSendBatchStatus 671 If the method is called asynchronously, 672 returns the request thread. 673 """ 674 675 all_params = ['account_id', 'bulk_send_batch_id'] 676 all_params.append('callback') 677 all_params.append('_return_http_data_only') 678 all_params.append('_preload_content') 679 all_params.append('_request_timeout') 680 681 params = locals() 682 for key, val in iteritems(params['kwargs']): 683 if key not in all_params: 684 raise TypeError( 685 "Got an unexpected keyword argument '%s'" 686 " to method get_bulk_send_batch_status" % key 687 ) 688 params[key] = val 689 del params['kwargs'] 690 # verify the required parameter 'account_id' is set 691 if ('account_id' not in params) or (params['account_id'] is None): 692 raise ValueError("Missing the required parameter `account_id` when calling `get_bulk_send_batch_status`") 693 # verify the required parameter 'bulk_send_batch_id' is set 694 if ('bulk_send_batch_id' not in params) or (params['bulk_send_batch_id'] is None): 695 raise ValueError("Missing the required parameter `bulk_send_batch_id` when calling `get_bulk_send_batch_status`") 696 697 698 collection_formats = {} 699 700 resource_path = '/v2.1/accounts/{accountId}/bulk_send_batch/{bulkSendBatchId}'.replace('{format}', 'json') 701 path_params = {} 702 if 'account_id' in params: 703 path_params['accountId'] = params['account_id'] 704 if 'bulk_send_batch_id' in params: 705 path_params['bulkSendBatchId'] = params['bulk_send_batch_id'] 706 707 query_params = {} 708 709 header_params = {} 710 711 form_params = [] 712 local_var_files = {} 713 714 body_params = None 715 # HTTP header `Accept` 716 header_params['Accept'] = self.api_client.\ 717 select_header_accept(['application/json']) 718 719 # Authentication setting 720 auth_settings = [] 721 722 return self.api_client.call_api(resource_path, 'GET', 723 path_params, 724 query_params, 725 header_params, 726 body=body_params, 727 post_params=form_params, 728 files=local_var_files, 729 response_type='BulkSendBatchStatus', 730 auth_settings=auth_settings, 731 callback=params.get('callback'), 732 _return_http_data_only=params.get('_return_http_data_only'), 733 _preload_content=params.get('_preload_content', True), 734 _request_timeout=params.get('_request_timeout'), 735 collection_formats=collection_formats) 736 737 def get_bulk_send_batches(self, account_id, **kwargs): 738 """ 739 Returns a list of bulk send batch satuses initiated by account. 740 Returns a summary of bulk send batches. Use the `batch_ids` query parameter to narrow the list of batches. 741 This method makes a synchronous HTTP request by default. To make an 742 asynchronous HTTP request, please define a `callback` function 743 to be invoked when receiving the response. 744 >>> def callback_function(response): 745 >>> pprint(response) 746 >>> 747 >>> thread = api.get_bulk_send_batches(account_id, callback=callback_function) 748 749 :param callback function: The callback function 750 for asynchronous request. (optional) 751 :param str account_id: The external account number (int) or account ID Guid. (required) 752 :param str batch_ids: 753 :param str count: 754 :param str from_date: 755 :param str search_text: 756 :param str start_position: 757 :param str status: 758 :param str to_date: 759 :param str user_id: 760 :return: BulkSendBatchSummaries 761 If the method is called asynchronously, 762 returns the request thread. 763 """ 764 kwargs['_return_http_data_only'] = True 765 if kwargs.get('callback'): 766 return self.get_bulk_send_batches_with_http_info(account_id, **kwargs) 767 else: 768 (data) = self.get_bulk_send_batches_with_http_info(account_id, **kwargs) 769 return data 770 771 def get_bulk_send_batches_with_http_info(self, account_id, **kwargs): 772 """ 773 Returns a list of bulk send batch satuses initiated by account. 774 Returns a summary of bulk send batches. Use the `batch_ids` query parameter to narrow the list of batches. 775 This method makes a synchronous HTTP request by default. To make an 776 asynchronous HTTP request, please define a `callback` function 777 to be invoked when receiving the response. 778 >>> def callback_function(response): 779 >>> pprint(response) 780 >>> 781 >>> thread = api.get_bulk_send_batches_with_http_info(account_id, callback=callback_function) 782 783 :param callback function: The callback function 784 for asynchronous request. (optional) 785 :param str account_id: The external account number (int) or account ID Guid. (required) 786 :param str batch_ids: 787 :param str count: 788 :param str from_date: 789 :param str search_text: 790 :param str start_position: 791 :param str status: 792 :param str to_date: 793 :param str user_id: 794 :return: BulkSendBatchSummaries 795 If the method is called asynchronously, 796 returns the request thread. 797 """ 798 799 all_params = ['account_id', 'batch_ids', 'count', 'from_date', 'search_text', 'start_position', 'status', 'to_date', 'user_id'] 800 all_params.append('callback') 801 all_params.append('_return_http_data_only') 802 all_params.append('_preload_content') 803 all_params.append('_request_timeout') 804 805 params = locals() 806 for key, val in iteritems(params['kwargs']): 807 if key not in all_params: 808 raise TypeError( 809 "Got an unexpected keyword argument '%s'" 810 " to method get_bulk_send_batches" % key 811 ) 812 params[key] = val 813 del params['kwargs'] 814 # verify the required parameter 'account_id' is set 815 if ('account_id' not in params) or (params['account_id'] is None): 816 raise ValueError("Missing the required parameter `account_id` when calling `get_bulk_send_batches`") 817 818 819 collection_formats = {} 820 821 resource_path = '/v2.1/accounts/{accountId}/bulk_send_batch'.replace('{format}', 'json') 822 path_params = {} 823 if 'account_id' in params: 824 path_params['accountId'] = params['account_id'] 825 826 query_params = {} 827 if 'batch_ids' in params: 828 query_params['batch_ids'] = params['batch_ids'] 829 if 'count' in params: 830 query_params['count'] = params['count'] 831 if 'from_date' in params: 832 query_params['from_date'] = params['from_date'] 833 if 'search_text' in params: 834 query_params['search_text'] = params['search_text'] 835 if 'start_position' in params: 836 query_params['start_position'] = params['start_position'] 837 if 'status' in params: 838 query_params['status'] = params['status'] 839 if 'to_date' in params: 840 query_params['to_date'] = params['to_date'] 841 if 'user_id' in params: 842 query_params['user_id'] = params['user_id'] 843 844 header_params = {} 845 846 form_params = [] 847 local_var_files = {} 848 849 body_params = None 850 # HTTP header `Accept` 851 header_params['Accept'] = self.api_client.\ 852 select_header_accept(['application/json']) 853 854 # Authentication setting 855 auth_settings = [] 856 857 return self.api_client.call_api(resource_path, 'GET', 858 path_params, 859 query_params, 860 header_params, 861 body=body_params, 862 post_params=form_params, 863 files=local_var_files, 864 response_type='BulkSendBatchSummaries', 865 auth_settings=auth_settings, 866 callback=params.get('callback'), 867 _return_http_data_only=params.get('_return_http_data_only'), 868 _preload_content=params.get('_preload_content', True), 869 _request_timeout=params.get('_request_timeout'), 870 collection_formats=collection_formats) 871 872 def get_bulk_send_list(self, account_id, bulk_send_list_id, **kwargs): 873 """ 874 Gets a specific bulk send list 875 This method returns all of the details associated with a specific bulk send list that belongs to the current user. 876 This method makes a synchronous HTTP request by default. To make an 877 asynchronous HTTP request, please define a `callback` function 878 to be invoked when receiving the response. 879 >>> def callback_function(response): 880 >>> pprint(response) 881 >>> 882 >>> thread = api.get_bulk_send_list(account_id, bulk_send_list_id, callback=callback_function) 883 884 :param callback function: The callback function 885 for asynchronous request. (optional) 886 :param str account_id: The external account number (int) or account ID Guid. (required) 887 :param str bulk_send_list_id: (required) 888 :return: BulkSendingList 889 If the method is called asynchronously, 890 returns the request thread. 891 """ 892 kwargs['_return_http_data_only'] = True 893 if kwargs.get('callback'): 894 return self.get_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 895 else: 896 (data) = self.get_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 897 return data 898 899 def get_bulk_send_list_with_http_info(self, account_id, bulk_send_list_id, **kwargs): 900 """ 901 Gets a specific bulk send list 902 This method returns all of the details associated with a specific bulk send list that belongs to the current user. 903 This method makes a synchronous HTTP request by default. To make an 904 asynchronous HTTP request, please define a `callback` function 905 to be invoked when receiving the response. 906 >>> def callback_function(response): 907 >>> pprint(response) 908 >>> 909 >>> thread = api.get_bulk_send_list_with_http_info(account_id, bulk_send_list_id, callback=callback_function) 910 911 :param callback function: The callback function 912 for asynchronous request. (optional) 913 :param str account_id: The external account number (int) or account ID Guid. (required) 914 :param str bulk_send_list_id: (required) 915 :return: BulkSendingList 916 If the method is called asynchronously, 917 returns the request thread. 918 """ 919 920 all_params = ['account_id', 'bulk_send_list_id'] 921 all_params.append('callback') 922 all_params.append('_return_http_data_only') 923 all_params.append('_preload_content') 924 all_params.append('_request_timeout') 925 926 params = locals() 927 for key, val in iteritems(params['kwargs']): 928 if key not in all_params: 929 raise TypeError( 930 "Got an unexpected keyword argument '%s'" 931 " to method get_bulk_send_list" % key 932 ) 933 params[key] = val 934 del params['kwargs'] 935 # verify the required parameter 'account_id' is set 936 if ('account_id' not in params) or (params['account_id'] is None): 937 raise ValueError("Missing the required parameter `account_id` when calling `get_bulk_send_list`") 938 # verify the required parameter 'bulk_send_list_id' is set 939 if ('bulk_send_list_id' not in params) or (params['bulk_send_list_id'] is None): 940 raise ValueError("Missing the required parameter `bulk_send_list_id` when calling `get_bulk_send_list`") 941 942 943 collection_formats = {} 944 945 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}'.replace('{format}', 'json') 946 path_params = {} 947 if 'account_id' in params: 948 path_params['accountId'] = params['account_id'] 949 if 'bulk_send_list_id' in params: 950 path_params['bulkSendListId'] = params['bulk_send_list_id'] 951 952 query_params = {} 953 954 header_params = {} 955 956 form_params = [] 957 local_var_files = {} 958 959 body_params = None 960 # HTTP header `Accept` 961 header_params['Accept'] = self.api_client.\ 962 select_header_accept(['application/json']) 963 964 # Authentication setting 965 auth_settings = [] 966 967 return self.api_client.call_api(resource_path, 'GET', 968 path_params, 969 query_params, 970 header_params, 971 body=body_params, 972 post_params=form_params, 973 files=local_var_files, 974 response_type='BulkSendingList', 975 auth_settings=auth_settings, 976 callback=params.get('callback'), 977 _return_http_data_only=params.get('_return_http_data_only'), 978 _preload_content=params.get('_preload_content', True), 979 _request_timeout=params.get('_request_timeout'), 980 collection_formats=collection_formats) 981 982 def get_bulk_send_lists(self, account_id, **kwargs): 983 """ 984 Lists top-level details for all bulk send lists visible to the current user 985 This method returns a list of bulk send lists belonging to the current user, as well as basic information about each list. 986 This method makes a synchronous HTTP request by default. To make an 987 asynchronous HTTP request, please define a `callback` function 988 to be invoked when receiving the response. 989 >>> def callback_function(response): 990 >>> pprint(response) 991 >>> 992 >>> thread = api.get_bulk_send_lists(account_id, callback=callback_function) 993 994 :param callback function: The callback function 995 for asynchronous request. (optional) 996 :param str account_id: The external account number (int) or account ID Guid. (required) 997 :return: BulkSendingListSummaries 998 If the method is called asynchronously, 999 returns the request thread. 1000 """ 1001 kwargs['_return_http_data_only'] = True 1002 if kwargs.get('callback'): 1003 return self.get_bulk_send_lists_with_http_info(account_id, **kwargs) 1004 else: 1005 (data) = self.get_bulk_send_lists_with_http_info(account_id, **kwargs) 1006 return data 1007 1008 def get_bulk_send_lists_with_http_info(self, account_id, **kwargs): 1009 """ 1010 Lists top-level details for all bulk send lists visible to the current user 1011 This method returns a list of bulk send lists belonging to the current user, as well as basic information about each list. 1012 This method makes a synchronous HTTP request by default. To make an 1013 asynchronous HTTP request, please define a `callback` function 1014 to be invoked when receiving the response. 1015 >>> def callback_function(response): 1016 >>> pprint(response) 1017 >>> 1018 >>> thread = api.get_bulk_send_lists_with_http_info(account_id, callback=callback_function) 1019 1020 :param callback function: The callback function 1021 for asynchronous request. (optional) 1022 :param str account_id: The external account number (int) or account ID Guid. (required) 1023 :return: BulkSendingListSummaries 1024 If the method is called asynchronously, 1025 returns the request thread. 1026 """ 1027 1028 all_params = ['account_id'] 1029 all_params.append('callback') 1030 all_params.append('_return_http_data_only') 1031 all_params.append('_preload_content') 1032 all_params.append('_request_timeout') 1033 1034 params = locals() 1035 for key, val in iteritems(params['kwargs']): 1036 if key not in all_params: 1037 raise TypeError( 1038 "Got an unexpected keyword argument '%s'" 1039 " to method get_bulk_send_lists" % key 1040 ) 1041 params[key] = val 1042 del params['kwargs'] 1043 # verify the required parameter 'account_id' is set 1044 if ('account_id' not in params) or (params['account_id'] is None): 1045 raise ValueError("Missing the required parameter `account_id` when calling `get_bulk_send_lists`") 1046 1047 1048 collection_formats = {} 1049 1050 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists'.replace('{format}', 'json') 1051 path_params = {} 1052 if 'account_id' in params: 1053 path_params['accountId'] = params['account_id'] 1054 1055 query_params = {} 1056 1057 header_params = {} 1058 1059 form_params = [] 1060 local_var_files = {} 1061 1062 body_params = None 1063 # HTTP header `Accept` 1064 header_params['Accept'] = self.api_client.\ 1065 select_header_accept(['application/json']) 1066 1067 # Authentication setting 1068 auth_settings = [] 1069 1070 return self.api_client.call_api(resource_path, 'GET', 1071 path_params, 1072 query_params, 1073 header_params, 1074 body=body_params, 1075 post_params=form_params, 1076 files=local_var_files, 1077 response_type='BulkSendingListSummaries', 1078 auth_settings=auth_settings, 1079 callback=params.get('callback'), 1080 _return_http_data_only=params.get('_return_http_data_only'), 1081 _preload_content=params.get('_preload_content', True), 1082 _request_timeout=params.get('_request_timeout'), 1083 collection_formats=collection_formats) 1084 1085 def update_bulk_send_batch_action(self, account_id, bulk_action, bulk_send_batch_id, **kwargs): 1086 """ 1087 Initiate a specific bulk send batch action 1088 1089 This method makes a synchronous HTTP request by default. To make an 1090 asynchronous HTTP request, please define a `callback` function 1091 to be invoked when receiving the response. 1092 >>> def callback_function(response): 1093 >>> pprint(response) 1094 >>> 1095 >>> thread = api.update_bulk_send_batch_action(account_id, bulk_action, bulk_send_batch_id, callback=callback_function) 1096 1097 :param callback function: The callback function 1098 for asynchronous request. (optional) 1099 :param str account_id: The external account number (int) or account ID Guid. (required) 1100 :param str bulk_action: (required) 1101 :param str bulk_send_batch_id: (required) 1102 :param BulkSendBatchActionRequest bulk_send_batch_action_request: 1103 :return: BulkSendBatchStatus 1104 If the method is called asynchronously, 1105 returns the request thread. 1106 """ 1107 kwargs['_return_http_data_only'] = True 1108 if kwargs.get('callback'): 1109 return self.update_bulk_send_batch_action_with_http_info(account_id, bulk_action, bulk_send_batch_id, **kwargs) 1110 else: 1111 (data) = self.update_bulk_send_batch_action_with_http_info(account_id, bulk_action, bulk_send_batch_id, **kwargs) 1112 return data 1113 1114 def update_bulk_send_batch_action_with_http_info(self, account_id, bulk_action, bulk_send_batch_id, **kwargs): 1115 """ 1116 Initiate a specific bulk send batch action 1117 1118 This method makes a synchronous HTTP request by default. To make an 1119 asynchronous HTTP request, please define a `callback` function 1120 to be invoked when receiving the response. 1121 >>> def callback_function(response): 1122 >>> pprint(response) 1123 >>> 1124 >>> thread = api.update_bulk_send_batch_action_with_http_info(account_id, bulk_action, bulk_send_batch_id, callback=callback_function) 1125 1126 :param callback function: The callback function 1127 for asynchronous request. (optional) 1128 :param str account_id: The external account number (int) or account ID Guid. (required) 1129 :param str bulk_action: (required) 1130 :param str bulk_send_batch_id: (required) 1131 :param BulkSendBatchActionRequest bulk_send_batch_action_request: 1132 :return: BulkSendBatchStatus 1133 If the method is called asynchronously, 1134 returns the request thread. 1135 """ 1136 1137 all_params = ['account_id', 'bulk_action', 'bulk_send_batch_id', 'bulk_send_batch_action_request'] 1138 all_params.append('callback') 1139 all_params.append('_return_http_data_only') 1140 all_params.append('_preload_content') 1141 all_params.append('_request_timeout') 1142 1143 params = locals() 1144 for key, val in iteritems(params['kwargs']): 1145 if key not in all_params: 1146 raise TypeError( 1147 "Got an unexpected keyword argument '%s'" 1148 " to method update_bulk_send_batch_action" % key 1149 ) 1150 params[key] = val 1151 del params['kwargs'] 1152 # verify the required parameter 'account_id' is set 1153 if ('account_id' not in params) or (params['account_id'] is None): 1154 raise ValueError("Missing the required parameter `account_id` when calling `update_bulk_send_batch_action`") 1155 # verify the required parameter 'bulk_action' is set 1156 if ('bulk_action' not in params) or (params['bulk_action'] is None): 1157 raise ValueError("Missing the required parameter `bulk_action` when calling `update_bulk_send_batch_action`") 1158 # verify the required parameter 'bulk_send_batch_id' is set 1159 if ('bulk_send_batch_id' not in params) or (params['bulk_send_batch_id'] is None): 1160 raise ValueError("Missing the required parameter `bulk_send_batch_id` when calling `update_bulk_send_batch_action`") 1161 1162 1163 collection_formats = {} 1164 1165 resource_path = '/v2.1/accounts/{accountId}/bulk_send_batch/{bulkSendBatchId}/{bulkAction}'.replace('{format}', 'json') 1166 path_params = {} 1167 if 'account_id' in params: 1168 path_params['accountId'] = params['account_id'] 1169 if 'bulk_action' in params: 1170 path_params['bulkAction'] = params['bulk_action'] 1171 if 'bulk_send_batch_id' in params: 1172 path_params['bulkSendBatchId'] = params['bulk_send_batch_id'] 1173 1174 query_params = {} 1175 1176 header_params = {} 1177 1178 form_params = [] 1179 local_var_files = {} 1180 1181 body_params = None 1182 if 'bulk_send_batch_action_request' in params: 1183 body_params = params['bulk_send_batch_action_request'] 1184 # HTTP header `Accept` 1185 header_params['Accept'] = self.api_client.\ 1186 select_header_accept(['application/json']) 1187 1188 # Authentication setting 1189 auth_settings = [] 1190 1191 return self.api_client.call_api(resource_path, 'PUT', 1192 path_params, 1193 query_params, 1194 header_params, 1195 body=body_params, 1196 post_params=form_params, 1197 files=local_var_files, 1198 response_type='BulkSendBatchStatus', 1199 auth_settings=auth_settings, 1200 callback=params.get('callback'), 1201 _return_http_data_only=params.get('_return_http_data_only'), 1202 _preload_content=params.get('_preload_content', True), 1203 _request_timeout=params.get('_request_timeout'), 1204 collection_formats=collection_formats) 1205 1206 def update_bulk_send_batch_status(self, account_id, bulk_send_batch_id, **kwargs): 1207 """ 1208 Put/Update a specific bulk send batch status 1209 Updates a specific bulk send batch status. 1210 This method makes a synchronous HTTP request by default. To make an 1211 asynchronous HTTP request, please define a `callback` function 1212 to be invoked when receiving the response. 1213 >>> def callback_function(response): 1214 >>> pprint(response) 1215 >>> 1216 >>> thread = api.update_bulk_send_batch_status(account_id, bulk_send_batch_id, callback=callback_function) 1217 1218 :param callback function: The callback function 1219 for asynchronous request. (optional) 1220 :param str account_id: The external account number (int) or account ID Guid. (required) 1221 :param str bulk_send_batch_id: (required) 1222 :param BulkSendBatchRequest bulk_send_batch_request: 1223 :return: BulkSendBatchStatus 1224 If the method is called asynchronously, 1225 returns the request thread. 1226 """ 1227 kwargs['_return_http_data_only'] = True 1228 if kwargs.get('callback'): 1229 return self.update_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, **kwargs) 1230 else: 1231 (data) = self.update_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, **kwargs) 1232 return data 1233 1234 def update_bulk_send_batch_status_with_http_info(self, account_id, bulk_send_batch_id, **kwargs): 1235 """ 1236 Put/Update a specific bulk send batch status 1237 Updates a specific bulk send batch status. 1238 This method makes a synchronous HTTP request by default. To make an 1239 asynchronous HTTP request, please define a `callback` function 1240 to be invoked when receiving the response. 1241 >>> def callback_function(response): 1242 >>> pprint(response) 1243 >>> 1244 >>> thread = api.update_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, callback=callback_function) 1245 1246 :param callback function: The callback function 1247 for asynchronous request. (optional) 1248 :param str account_id: The external account number (int) or account ID Guid. (required) 1249 :param str bulk_send_batch_id: (required) 1250 :param BulkSendBatchRequest bulk_send_batch_request: 1251 :return: BulkSendBatchStatus 1252 If the method is called asynchronously, 1253 returns the request thread. 1254 """ 1255 1256 all_params = ['account_id', 'bulk_send_batch_id', 'bulk_send_batch_request'] 1257 all_params.append('callback') 1258 all_params.append('_return_http_data_only') 1259 all_params.append('_preload_content') 1260 all_params.append('_request_timeout') 1261 1262 params = locals() 1263 for key, val in iteritems(params['kwargs']): 1264 if key not in all_params: 1265 raise TypeError( 1266 "Got an unexpected keyword argument '%s'" 1267 " to method update_bulk_send_batch_status" % key 1268 ) 1269 params[key] = val 1270 del params['kwargs'] 1271 # verify the required parameter 'account_id' is set 1272 if ('account_id' not in params) or (params['account_id'] is None): 1273 raise ValueError("Missing the required parameter `account_id` when calling `update_bulk_send_batch_status`") 1274 # verify the required parameter 'bulk_send_batch_id' is set 1275 if ('bulk_send_batch_id' not in params) or (params['bulk_send_batch_id'] is None): 1276 raise ValueError("Missing the required parameter `bulk_send_batch_id` when calling `update_bulk_send_batch_status`") 1277 1278 1279 collection_formats = {} 1280 1281 resource_path = '/v2.1/accounts/{accountId}/bulk_send_batch/{bulkSendBatchId}'.replace('{format}', 'json') 1282 path_params = {} 1283 if 'account_id' in params: 1284 path_params['accountId'] = params['account_id'] 1285 if 'bulk_send_batch_id' in params: 1286 path_params['bulkSendBatchId'] = params['bulk_send_batch_id'] 1287 1288 query_params = {} 1289 1290 header_params = {} 1291 1292 form_params = [] 1293 local_var_files = {} 1294 1295 body_params = None 1296 if 'bulk_send_batch_request' in params: 1297 body_params = params['bulk_send_batch_request'] 1298 # HTTP header `Accept` 1299 header_params['Accept'] = self.api_client.\ 1300 select_header_accept(['application/json']) 1301 1302 # Authentication setting 1303 auth_settings = [] 1304 1305 return self.api_client.call_api(resource_path, 'PUT', 1306 path_params, 1307 query_params, 1308 header_params, 1309 body=body_params, 1310 post_params=form_params, 1311 files=local_var_files, 1312 response_type='BulkSendBatchStatus', 1313 auth_settings=auth_settings, 1314 callback=params.get('callback'), 1315 _return_http_data_only=params.get('_return_http_data_only'), 1316 _preload_content=params.get('_preload_content', True), 1317 _request_timeout=params.get('_request_timeout'), 1318 collection_formats=collection_formats) 1319 1320 def update_bulk_send_list(self, account_id, bulk_send_list_id, **kwargs): 1321 """ 1322 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 1323 This method replaces the definition of an existing bulk send list. 1324 This method makes a synchronous HTTP request by default. To make an 1325 asynchronous HTTP request, please define a `callback` function 1326 to be invoked when receiving the response. 1327 >>> def callback_function(response): 1328 >>> pprint(response) 1329 >>> 1330 >>> thread = api.update_bulk_send_list(account_id, bulk_send_list_id, callback=callback_function) 1331 1332 :param callback function: The callback function 1333 for asynchronous request. (optional) 1334 :param str account_id: The external account number (int) or account ID Guid. (required) 1335 :param str bulk_send_list_id: (required) 1336 :param BulkSendingList bulk_sending_list: 1337 :return: BulkSendingList 1338 If the method is called asynchronously, 1339 returns the request thread. 1340 """ 1341 kwargs['_return_http_data_only'] = True 1342 if kwargs.get('callback'): 1343 return self.update_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 1344 else: 1345 (data) = self.update_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 1346 return data 1347 1348 def update_bulk_send_list_with_http_info(self, account_id, bulk_send_list_id, **kwargs): 1349 """ 1350 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 1351 This method replaces the definition of an existing bulk send list. 1352 This method makes a synchronous HTTP request by default. To make an 1353 asynchronous HTTP request, please define a `callback` function 1354 to be invoked when receiving the response. 1355 >>> def callback_function(response): 1356 >>> pprint(response) 1357 >>> 1358 >>> thread = api.update_bulk_send_list_with_http_info(account_id, bulk_send_list_id, callback=callback_function) 1359 1360 :param callback function: The callback function 1361 for asynchronous request. (optional) 1362 :param str account_id: The external account number (int) or account ID Guid. (required) 1363 :param str bulk_send_list_id: (required) 1364 :param BulkSendingList bulk_sending_list: 1365 :return: BulkSendingList 1366 If the method is called asynchronously, 1367 returns the request thread. 1368 """ 1369 1370 all_params = ['account_id', 'bulk_send_list_id', 'bulk_sending_list'] 1371 all_params.append('callback') 1372 all_params.append('_return_http_data_only') 1373 all_params.append('_preload_content') 1374 all_params.append('_request_timeout') 1375 1376 params = locals() 1377 for key, val in iteritems(params['kwargs']): 1378 if key not in all_params: 1379 raise TypeError( 1380 "Got an unexpected keyword argument '%s'" 1381 " to method update_bulk_send_list" % key 1382 ) 1383 params[key] = val 1384 del params['kwargs'] 1385 # verify the required parameter 'account_id' is set 1386 if ('account_id' not in params) or (params['account_id'] is None): 1387 raise ValueError("Missing the required parameter `account_id` when calling `update_bulk_send_list`") 1388 # verify the required parameter 'bulk_send_list_id' is set 1389 if ('bulk_send_list_id' not in params) or (params['bulk_send_list_id'] is None): 1390 raise ValueError("Missing the required parameter `bulk_send_list_id` when calling `update_bulk_send_list`") 1391 1392 1393 collection_formats = {} 1394 1395 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}'.replace('{format}', 'json') 1396 path_params = {} 1397 if 'account_id' in params: 1398 path_params['accountId'] = params['account_id'] 1399 if 'bulk_send_list_id' in params: 1400 path_params['bulkSendListId'] = params['bulk_send_list_id'] 1401 1402 query_params = {} 1403 1404 header_params = {} 1405 1406 form_params = [] 1407 local_var_files = {} 1408 1409 body_params = None 1410 if 'bulk_sending_list' in params: 1411 body_params = params['bulk_sending_list'] 1412 # HTTP header `Accept` 1413 header_params['Accept'] = self.api_client.\ 1414 select_header_accept(['application/json']) 1415 1416 # Authentication setting 1417 auth_settings = [] 1418 1419 return self.api_client.call_api(resource_path, 'PUT', 1420 path_params, 1421 query_params, 1422 header_params, 1423 body=body_params, 1424 post_params=form_params, 1425 files=local_var_files, 1426 response_type='BulkSendingList', 1427 auth_settings=auth_settings, 1428 callback=params.get('callback'), 1429 _return_http_data_only=params.get('_return_http_data_only'), 1430 _preload_content=params.get('_preload_content', True), 1431 _request_timeout=params.get('_request_timeout'), 1432 collection_formats=collection_formats)
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen
44 def create_bulk_send_list(self, account_id, **kwargs): 45 """ 46 Creates a new bulk send list 47 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. | 48 This method makes a synchronous HTTP request by default. To make an 49 asynchronous HTTP request, please define a `callback` function 50 to be invoked when receiving the response. 51 >>> def callback_function(response): 52 >>> pprint(response) 53 >>> 54 >>> thread = api.create_bulk_send_list(account_id, callback=callback_function) 55 56 :param callback function: The callback function 57 for asynchronous request. (optional) 58 :param str account_id: The external account number (int) or account ID Guid. (required) 59 :param BulkSendingList bulk_sending_list: 60 :return: BulkSendingList 61 If the method is called asynchronously, 62 returns the request thread. 63 """ 64 kwargs['_return_http_data_only'] = True 65 if kwargs.get('callback'): 66 return self.create_bulk_send_list_with_http_info(account_id, **kwargs) 67 else: 68 (data) = self.create_bulk_send_list_with_http_info(account_id, **kwargs) 69 return data
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 ### 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. |
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create_bulk_send_list(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- BulkSendingList bulk_sending_list:
Returns
BulkSendingList If the method is called asynchronously, returns the request thread.
71 def create_bulk_send_list_with_http_info(self, account_id, **kwargs): 72 """ 73 Creates a new bulk send list 74 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. | 75 This method makes a synchronous HTTP request by default. To make an 76 asynchronous HTTP request, please define a `callback` function 77 to be invoked when receiving the response. 78 >>> def callback_function(response): 79 >>> pprint(response) 80 >>> 81 >>> thread = api.create_bulk_send_list_with_http_info(account_id, callback=callback_function) 82 83 :param callback function: The callback function 84 for asynchronous request. (optional) 85 :param str account_id: The external account number (int) or account ID Guid. (required) 86 :param BulkSendingList bulk_sending_list: 87 :return: BulkSendingList 88 If the method is called asynchronously, 89 returns the request thread. 90 """ 91 92 all_params = ['account_id', 'bulk_sending_list'] 93 all_params.append('callback') 94 all_params.append('_return_http_data_only') 95 all_params.append('_preload_content') 96 all_params.append('_request_timeout') 97 98 params = locals() 99 for key, val in iteritems(params['kwargs']): 100 if key not in all_params: 101 raise TypeError( 102 "Got an unexpected keyword argument '%s'" 103 " to method create_bulk_send_list" % key 104 ) 105 params[key] = val 106 del params['kwargs'] 107 # verify the required parameter 'account_id' is set 108 if ('account_id' not in params) or (params['account_id'] is None): 109 raise ValueError("Missing the required parameter `account_id` when calling `create_bulk_send_list`") 110 111 112 collection_formats = {} 113 114 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists'.replace('{format}', 'json') 115 path_params = {} 116 if 'account_id' in params: 117 path_params['accountId'] = params['account_id'] 118 119 query_params = {} 120 121 header_params = {} 122 123 form_params = [] 124 local_var_files = {} 125 126 body_params = None 127 if 'bulk_sending_list' in params: 128 body_params = params['bulk_sending_list'] 129 # HTTP header `Accept` 130 header_params['Accept'] = self.api_client.\ 131 select_header_accept(['application/json']) 132 133 # Authentication setting 134 auth_settings = [] 135 136 return self.api_client.call_api(resource_path, 'POST', 137 path_params, 138 query_params, 139 header_params, 140 body=body_params, 141 post_params=form_params, 142 files=local_var_files, 143 response_type='BulkSendingList', 144 auth_settings=auth_settings, 145 callback=params.get('callback'), 146 _return_http_data_only=params.get('_return_http_data_only'), 147 _preload_content=params.get('_preload_content', True), 148 _request_timeout=params.get('_request_timeout'), 149 collection_formats=collection_formats)
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 ### 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. |
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create_bulk_send_list_with_http_info(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- BulkSendingList bulk_sending_list:
Returns
BulkSendingList If the method is called asynchronously, returns the request thread.
151 def create_bulk_send_request(self, account_id, bulk_send_list_id, **kwargs): 152 """ 153 Uses the specified bulk send list to send the envelope specified in the payload 154 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/ 155 This method makes a synchronous HTTP request by default. To make an 156 asynchronous HTTP request, please define a `callback` function 157 to be invoked when receiving the response. 158 >>> def callback_function(response): 159 >>> pprint(response) 160 >>> 161 >>> thread = api.create_bulk_send_request(account_id, bulk_send_list_id, callback=callback_function) 162 163 :param callback function: The callback function 164 for asynchronous request. (optional) 165 :param str account_id: The external account number (int) or account ID Guid. (required) 166 :param str bulk_send_list_id: (required) 167 :param BulkSendRequest bulk_send_request: 168 :return: BulkSendResponse 169 If the method is called asynchronously, 170 returns the request thread. 171 """ 172 kwargs['_return_http_data_only'] = True 173 if kwargs.get('callback'): 174 return self.create_bulk_send_request_with_http_info(account_id, bulk_send_list_id, **kwargs) 175 else: 176 (data) = self.create_bulk_send_request_with_http_info(account_id, bulk_send_list_id, **kwargs) 177 return data
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 ### 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/
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create_bulk_send_request(account_id, bulk_send_list_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_send_list_id: (required)
- BulkSendRequest bulk_send_request:
Returns
BulkSendResponse If the method is called asynchronously, returns the request thread.
179 def create_bulk_send_request_with_http_info(self, account_id, bulk_send_list_id, **kwargs): 180 """ 181 Uses the specified bulk send list to send the envelope specified in the payload 182 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/ 183 This method makes a synchronous HTTP request by default. To make an 184 asynchronous HTTP request, please define a `callback` function 185 to be invoked when receiving the response. 186 >>> def callback_function(response): 187 >>> pprint(response) 188 >>> 189 >>> thread = api.create_bulk_send_request_with_http_info(account_id, bulk_send_list_id, callback=callback_function) 190 191 :param callback function: The callback function 192 for asynchronous request. (optional) 193 :param str account_id: The external account number (int) or account ID Guid. (required) 194 :param str bulk_send_list_id: (required) 195 :param BulkSendRequest bulk_send_request: 196 :return: BulkSendResponse 197 If the method is called asynchronously, 198 returns the request thread. 199 """ 200 201 all_params = ['account_id', 'bulk_send_list_id', 'bulk_send_request'] 202 all_params.append('callback') 203 all_params.append('_return_http_data_only') 204 all_params.append('_preload_content') 205 all_params.append('_request_timeout') 206 207 params = locals() 208 for key, val in iteritems(params['kwargs']): 209 if key not in all_params: 210 raise TypeError( 211 "Got an unexpected keyword argument '%s'" 212 " to method create_bulk_send_request" % key 213 ) 214 params[key] = val 215 del params['kwargs'] 216 # verify the required parameter 'account_id' is set 217 if ('account_id' not in params) or (params['account_id'] is None): 218 raise ValueError("Missing the required parameter `account_id` when calling `create_bulk_send_request`") 219 # verify the required parameter 'bulk_send_list_id' is set 220 if ('bulk_send_list_id' not in params) or (params['bulk_send_list_id'] is None): 221 raise ValueError("Missing the required parameter `bulk_send_list_id` when calling `create_bulk_send_request`") 222 223 224 collection_formats = {} 225 226 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}/send'.replace('{format}', 'json') 227 path_params = {} 228 if 'account_id' in params: 229 path_params['accountId'] = params['account_id'] 230 if 'bulk_send_list_id' in params: 231 path_params['bulkSendListId'] = params['bulk_send_list_id'] 232 233 query_params = {} 234 235 header_params = {} 236 237 form_params = [] 238 local_var_files = {} 239 240 body_params = None 241 if 'bulk_send_request' in params: 242 body_params = params['bulk_send_request'] 243 # HTTP header `Accept` 244 header_params['Accept'] = self.api_client.\ 245 select_header_accept(['application/json']) 246 247 # Authentication setting 248 auth_settings = [] 249 250 return self.api_client.call_api(resource_path, 'POST', 251 path_params, 252 query_params, 253 header_params, 254 body=body_params, 255 post_params=form_params, 256 files=local_var_files, 257 response_type='BulkSendResponse', 258 auth_settings=auth_settings, 259 callback=params.get('callback'), 260 _return_http_data_only=params.get('_return_http_data_only'), 261 _preload_content=params.get('_preload_content', True), 262 _request_timeout=params.get('_request_timeout'), 263 collection_formats=collection_formats)
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 ### 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/
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create_bulk_send_request_with_http_info(account_id, bulk_send_list_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_send_list_id: (required)
- BulkSendRequest bulk_send_request:
Returns
BulkSendResponse If the method is called asynchronously, returns the request thread.
265 def create_bulk_send_test_request(self, account_id, bulk_send_list_id, **kwargs): 266 """ 267 Tests whether the specified bulk sending list can be used to send an envelope 268 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/ 269 This method makes a synchronous HTTP request by default. To make an 270 asynchronous HTTP request, please define a `callback` function 271 to be invoked when receiving the response. 272 >>> def callback_function(response): 273 >>> pprint(response) 274 >>> 275 >>> thread = api.create_bulk_send_test_request(account_id, bulk_send_list_id, callback=callback_function) 276 277 :param callback function: The callback function 278 for asynchronous request. (optional) 279 :param str account_id: The external account number (int) or account ID Guid. (required) 280 :param str bulk_send_list_id: (required) 281 :param BulkSendRequest bulk_send_request: 282 :return: BulkSendTestResponse 283 If the method is called asynchronously, 284 returns the request thread. 285 """ 286 kwargs['_return_http_data_only'] = True 287 if kwargs.get('callback'): 288 return self.create_bulk_send_test_request_with_http_info(account_id, bulk_send_list_id, **kwargs) 289 else: 290 (data) = self.create_bulk_send_test_request_with_http_info(account_id, bulk_send_list_id, **kwargs) 291 return data
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/
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create_bulk_send_test_request(account_id, bulk_send_list_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_send_list_id: (required)
- BulkSendRequest bulk_send_request:
Returns
BulkSendTestResponse If the method is called asynchronously, returns the request thread.
293 def create_bulk_send_test_request_with_http_info(self, account_id, bulk_send_list_id, **kwargs): 294 """ 295 Tests whether the specified bulk sending list can be used to send an envelope 296 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/ 297 This method makes a synchronous HTTP request by default. To make an 298 asynchronous HTTP request, please define a `callback` function 299 to be invoked when receiving the response. 300 >>> def callback_function(response): 301 >>> pprint(response) 302 >>> 303 >>> thread = api.create_bulk_send_test_request_with_http_info(account_id, bulk_send_list_id, callback=callback_function) 304 305 :param callback function: The callback function 306 for asynchronous request. (optional) 307 :param str account_id: The external account number (int) or account ID Guid. (required) 308 :param str bulk_send_list_id: (required) 309 :param BulkSendRequest bulk_send_request: 310 :return: BulkSendTestResponse 311 If the method is called asynchronously, 312 returns the request thread. 313 """ 314 315 all_params = ['account_id', 'bulk_send_list_id', 'bulk_send_request'] 316 all_params.append('callback') 317 all_params.append('_return_http_data_only') 318 all_params.append('_preload_content') 319 all_params.append('_request_timeout') 320 321 params = locals() 322 for key, val in iteritems(params['kwargs']): 323 if key not in all_params: 324 raise TypeError( 325 "Got an unexpected keyword argument '%s'" 326 " to method create_bulk_send_test_request" % key 327 ) 328 params[key] = val 329 del params['kwargs'] 330 # verify the required parameter 'account_id' is set 331 if ('account_id' not in params) or (params['account_id'] is None): 332 raise ValueError("Missing the required parameter `account_id` when calling `create_bulk_send_test_request`") 333 # verify the required parameter 'bulk_send_list_id' is set 334 if ('bulk_send_list_id' not in params) or (params['bulk_send_list_id'] is None): 335 raise ValueError("Missing the required parameter `bulk_send_list_id` when calling `create_bulk_send_test_request`") 336 337 338 collection_formats = {} 339 340 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}/test'.replace('{format}', 'json') 341 path_params = {} 342 if 'account_id' in params: 343 path_params['accountId'] = params['account_id'] 344 if 'bulk_send_list_id' in params: 345 path_params['bulkSendListId'] = params['bulk_send_list_id'] 346 347 query_params = {} 348 349 header_params = {} 350 351 form_params = [] 352 local_var_files = {} 353 354 body_params = None 355 if 'bulk_send_request' in params: 356 body_params = params['bulk_send_request'] 357 # HTTP header `Accept` 358 header_params['Accept'] = self.api_client.\ 359 select_header_accept(['application/json']) 360 361 # Authentication setting 362 auth_settings = [] 363 364 return self.api_client.call_api(resource_path, 'POST', 365 path_params, 366 query_params, 367 header_params, 368 body=body_params, 369 post_params=form_params, 370 files=local_var_files, 371 response_type='BulkSendTestResponse', 372 auth_settings=auth_settings, 373 callback=params.get('callback'), 374 _return_http_data_only=params.get('_return_http_data_only'), 375 _preload_content=params.get('_preload_content', True), 376 _request_timeout=params.get('_request_timeout'), 377 collection_formats=collection_formats)
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/
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create_bulk_send_test_request_with_http_info(account_id, bulk_send_list_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_send_list_id: (required)
- BulkSendRequest bulk_send_request:
Returns
BulkSendTestResponse If the method is called asynchronously, returns the request thread.
379 def delete_bulk_send_list(self, account_id, bulk_send_list_id, **kwargs): 380 """ 381 Deletes an existing bulk send list 382 This method deletes a bulk send list. 383 This method makes a synchronous HTTP request by default. To make an 384 asynchronous HTTP request, please define a `callback` function 385 to be invoked when receiving the response. 386 >>> def callback_function(response): 387 >>> pprint(response) 388 >>> 389 >>> thread = api.delete_bulk_send_list(account_id, bulk_send_list_id, callback=callback_function) 390 391 :param callback function: The callback function 392 for asynchronous request. (optional) 393 :param str account_id: The external account number (int) or account ID Guid. (required) 394 :param str bulk_send_list_id: (required) 395 :return: BulkSendingListSummaries 396 If the method is called asynchronously, 397 returns the request thread. 398 """ 399 kwargs['_return_http_data_only'] = True 400 if kwargs.get('callback'): 401 return self.delete_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 402 else: 403 (data) = self.delete_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 404 return data
Deletes an existing bulk send list
This method deletes a bulk send list.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_bulk_send_list(account_id, bulk_send_list_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_send_list_id: (required)
Returns
BulkSendingListSummaries If the method is called asynchronously, returns the request thread.
406 def delete_bulk_send_list_with_http_info(self, account_id, bulk_send_list_id, **kwargs): 407 """ 408 Deletes an existing bulk send list 409 This method deletes a bulk send list. 410 This method makes a synchronous HTTP request by default. To make an 411 asynchronous HTTP request, please define a `callback` function 412 to be invoked when receiving the response. 413 >>> def callback_function(response): 414 >>> pprint(response) 415 >>> 416 >>> thread = api.delete_bulk_send_list_with_http_info(account_id, bulk_send_list_id, callback=callback_function) 417 418 :param callback function: The callback function 419 for asynchronous request. (optional) 420 :param str account_id: The external account number (int) or account ID Guid. (required) 421 :param str bulk_send_list_id: (required) 422 :return: BulkSendingListSummaries 423 If the method is called asynchronously, 424 returns the request thread. 425 """ 426 427 all_params = ['account_id', 'bulk_send_list_id'] 428 all_params.append('callback') 429 all_params.append('_return_http_data_only') 430 all_params.append('_preload_content') 431 all_params.append('_request_timeout') 432 433 params = locals() 434 for key, val in iteritems(params['kwargs']): 435 if key not in all_params: 436 raise TypeError( 437 "Got an unexpected keyword argument '%s'" 438 " to method delete_bulk_send_list" % key 439 ) 440 params[key] = val 441 del params['kwargs'] 442 # verify the required parameter 'account_id' is set 443 if ('account_id' not in params) or (params['account_id'] is None): 444 raise ValueError("Missing the required parameter `account_id` when calling `delete_bulk_send_list`") 445 # verify the required parameter 'bulk_send_list_id' is set 446 if ('bulk_send_list_id' not in params) or (params['bulk_send_list_id'] is None): 447 raise ValueError("Missing the required parameter `bulk_send_list_id` when calling `delete_bulk_send_list`") 448 449 450 collection_formats = {} 451 452 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}'.replace('{format}', 'json') 453 path_params = {} 454 if 'account_id' in params: 455 path_params['accountId'] = params['account_id'] 456 if 'bulk_send_list_id' in params: 457 path_params['bulkSendListId'] = params['bulk_send_list_id'] 458 459 query_params = {} 460 461 header_params = {} 462 463 form_params = [] 464 local_var_files = {} 465 466 body_params = None 467 # HTTP header `Accept` 468 header_params['Accept'] = self.api_client.\ 469 select_header_accept(['application/json']) 470 471 # Authentication setting 472 auth_settings = [] 473 474 return self.api_client.call_api(resource_path, 'DELETE', 475 path_params, 476 query_params, 477 header_params, 478 body=body_params, 479 post_params=form_params, 480 files=local_var_files, 481 response_type='BulkSendingListSummaries', 482 auth_settings=auth_settings, 483 callback=params.get('callback'), 484 _return_http_data_only=params.get('_return_http_data_only'), 485 _preload_content=params.get('_preload_content', True), 486 _request_timeout=params.get('_request_timeout'), 487 collection_formats=collection_formats)
Deletes an existing bulk send list
This method deletes a bulk send list.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_bulk_send_list_with_http_info(account_id, bulk_send_list_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_send_list_id: (required)
Returns
BulkSendingListSummaries If the method is called asynchronously, returns the request thread.
489 def get_bulk_send_batch_envelopes(self, account_id, bulk_send_batch_id, **kwargs): 490 """ 491 Gets envelopes from a specific bulk send batch 492 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. 493 This method makes a synchronous HTTP request by default. To make an 494 asynchronous HTTP request, please define a `callback` function 495 to be invoked when receiving the response. 496 >>> def callback_function(response): 497 >>> pprint(response) 498 >>> 499 >>> thread = api.get_bulk_send_batch_envelopes(account_id, bulk_send_batch_id, callback=callback_function) 500 501 :param callback function: The callback function 502 for asynchronous request. (optional) 503 :param str account_id: The external account number (int) or account ID Guid. (required) 504 :param str bulk_send_batch_id: (required) 505 :param str count: 506 :param str include: 507 :param str order: 508 :param str order_by: 509 :param str search_text: 510 :param str start_position: 511 :param str status: 512 :return: EnvelopesInformation 513 If the method is called asynchronously, 514 returns the request thread. 515 """ 516 kwargs['_return_http_data_only'] = True 517 if kwargs.get('callback'): 518 return self.get_bulk_send_batch_envelopes_with_http_info(account_id, bulk_send_batch_id, **kwargs) 519 else: 520 (data) = self.get_bulk_send_batch_envelopes_with_http_info(account_id, bulk_send_batch_id, **kwargs) 521 return data
Gets envelopes from a specific bulk send batch
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.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_bulk_send_batch_envelopes(account_id, bulk_send_batch_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_send_batch_id: (required)
- str count:
- str include:
- str order:
- str order_by:
- str search_text:
- str start_position:
- str status:
Returns
EnvelopesInformation If the method is called asynchronously, returns the request thread.
523 def get_bulk_send_batch_envelopes_with_http_info(self, account_id, bulk_send_batch_id, **kwargs): 524 """ 525 Gets envelopes from a specific bulk send batch 526 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. 527 This method makes a synchronous HTTP request by default. To make an 528 asynchronous HTTP request, please define a `callback` function 529 to be invoked when receiving the response. 530 >>> def callback_function(response): 531 >>> pprint(response) 532 >>> 533 >>> thread = api.get_bulk_send_batch_envelopes_with_http_info(account_id, bulk_send_batch_id, callback=callback_function) 534 535 :param callback function: The callback function 536 for asynchronous request. (optional) 537 :param str account_id: The external account number (int) or account ID Guid. (required) 538 :param str bulk_send_batch_id: (required) 539 :param str count: 540 :param str include: 541 :param str order: 542 :param str order_by: 543 :param str search_text: 544 :param str start_position: 545 :param str status: 546 :return: EnvelopesInformation 547 If the method is called asynchronously, 548 returns the request thread. 549 """ 550 551 all_params = ['account_id', 'bulk_send_batch_id', 'count', 'include', 'order', 'order_by', 'search_text', 'start_position', 'status'] 552 all_params.append('callback') 553 all_params.append('_return_http_data_only') 554 all_params.append('_preload_content') 555 all_params.append('_request_timeout') 556 557 params = locals() 558 for key, val in iteritems(params['kwargs']): 559 if key not in all_params: 560 raise TypeError( 561 "Got an unexpected keyword argument '%s'" 562 " to method get_bulk_send_batch_envelopes" % key 563 ) 564 params[key] = val 565 del params['kwargs'] 566 # verify the required parameter 'account_id' is set 567 if ('account_id' not in params) or (params['account_id'] is None): 568 raise ValueError("Missing the required parameter `account_id` when calling `get_bulk_send_batch_envelopes`") 569 # verify the required parameter 'bulk_send_batch_id' is set 570 if ('bulk_send_batch_id' not in params) or (params['bulk_send_batch_id'] is None): 571 raise ValueError("Missing the required parameter `bulk_send_batch_id` when calling `get_bulk_send_batch_envelopes`") 572 573 574 collection_formats = {} 575 576 resource_path = '/v2.1/accounts/{accountId}/bulk_send_batch/{bulkSendBatchId}/envelopes'.replace('{format}', 'json') 577 path_params = {} 578 if 'account_id' in params: 579 path_params['accountId'] = params['account_id'] 580 if 'bulk_send_batch_id' in params: 581 path_params['bulkSendBatchId'] = params['bulk_send_batch_id'] 582 583 query_params = {} 584 if 'count' in params: 585 query_params['count'] = params['count'] 586 if 'include' in params: 587 query_params['include'] = params['include'] 588 if 'order' in params: 589 query_params['order'] = params['order'] 590 if 'order_by' in params: 591 query_params['order_by'] = params['order_by'] 592 if 'search_text' in params: 593 query_params['search_text'] = params['search_text'] 594 if 'start_position' in params: 595 query_params['start_position'] = params['start_position'] 596 if 'status' in params: 597 query_params['status'] = params['status'] 598 599 header_params = {} 600 601 form_params = [] 602 local_var_files = {} 603 604 body_params = None 605 # HTTP header `Accept` 606 header_params['Accept'] = self.api_client.\ 607 select_header_accept(['application/json']) 608 609 # Authentication setting 610 auth_settings = [] 611 612 return self.api_client.call_api(resource_path, 'GET', 613 path_params, 614 query_params, 615 header_params, 616 body=body_params, 617 post_params=form_params, 618 files=local_var_files, 619 response_type='EnvelopesInformation', 620 auth_settings=auth_settings, 621 callback=params.get('callback'), 622 _return_http_data_only=params.get('_return_http_data_only'), 623 _preload_content=params.get('_preload_content', True), 624 _request_timeout=params.get('_request_timeout'), 625 collection_formats=collection_formats)
Gets envelopes from a specific bulk send batch
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.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_bulk_send_batch_envelopes_with_http_info(account_id, bulk_send_batch_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_send_batch_id: (required)
- str count:
- str include:
- str order:
- str order_by:
- str search_text:
- str start_position:
- str status:
Returns
EnvelopesInformation If the method is called asynchronously, returns the request thread.
627 def get_bulk_send_batch_status(self, account_id, bulk_send_batch_id, **kwargs): 628 """ 629 Gets a specific bulk send batch status 630 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/) 631 This method makes a synchronous HTTP request by default. To make an 632 asynchronous HTTP request, please define a `callback` function 633 to be invoked when receiving the response. 634 >>> def callback_function(response): 635 >>> pprint(response) 636 >>> 637 >>> thread = api.get_bulk_send_batch_status(account_id, bulk_send_batch_id, callback=callback_function) 638 639 :param callback function: The callback function 640 for asynchronous request. (optional) 641 :param str account_id: The external account number (int) or account ID Guid. (required) 642 :param str bulk_send_batch_id: (required) 643 :return: BulkSendBatchStatus 644 If the method is called asynchronously, 645 returns the request thread. 646 """ 647 kwargs['_return_http_data_only'] = True 648 if kwargs.get('callback'): 649 return self.get_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, **kwargs) 650 else: 651 (data) = self.get_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, **kwargs) 652 return data
Gets a specific bulk send batch status
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
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_bulk_send_batch_status(account_id, bulk_send_batch_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_send_batch_id: (required)
Returns
BulkSendBatchStatus If the method is called asynchronously, returns the request thread.
654 def get_bulk_send_batch_status_with_http_info(self, account_id, bulk_send_batch_id, **kwargs): 655 """ 656 Gets a specific bulk send batch status 657 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/) 658 This method makes a synchronous HTTP request by default. To make an 659 asynchronous HTTP request, please define a `callback` function 660 to be invoked when receiving the response. 661 >>> def callback_function(response): 662 >>> pprint(response) 663 >>> 664 >>> thread = api.get_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, callback=callback_function) 665 666 :param callback function: The callback function 667 for asynchronous request. (optional) 668 :param str account_id: The external account number (int) or account ID Guid. (required) 669 :param str bulk_send_batch_id: (required) 670 :return: BulkSendBatchStatus 671 If the method is called asynchronously, 672 returns the request thread. 673 """ 674 675 all_params = ['account_id', 'bulk_send_batch_id'] 676 all_params.append('callback') 677 all_params.append('_return_http_data_only') 678 all_params.append('_preload_content') 679 all_params.append('_request_timeout') 680 681 params = locals() 682 for key, val in iteritems(params['kwargs']): 683 if key not in all_params: 684 raise TypeError( 685 "Got an unexpected keyword argument '%s'" 686 " to method get_bulk_send_batch_status" % key 687 ) 688 params[key] = val 689 del params['kwargs'] 690 # verify the required parameter 'account_id' is set 691 if ('account_id' not in params) or (params['account_id'] is None): 692 raise ValueError("Missing the required parameter `account_id` when calling `get_bulk_send_batch_status`") 693 # verify the required parameter 'bulk_send_batch_id' is set 694 if ('bulk_send_batch_id' not in params) or (params['bulk_send_batch_id'] is None): 695 raise ValueError("Missing the required parameter `bulk_send_batch_id` when calling `get_bulk_send_batch_status`") 696 697 698 collection_formats = {} 699 700 resource_path = '/v2.1/accounts/{accountId}/bulk_send_batch/{bulkSendBatchId}'.replace('{format}', 'json') 701 path_params = {} 702 if 'account_id' in params: 703 path_params['accountId'] = params['account_id'] 704 if 'bulk_send_batch_id' in params: 705 path_params['bulkSendBatchId'] = params['bulk_send_batch_id'] 706 707 query_params = {} 708 709 header_params = {} 710 711 form_params = [] 712 local_var_files = {} 713 714 body_params = None 715 # HTTP header `Accept` 716 header_params['Accept'] = self.api_client.\ 717 select_header_accept(['application/json']) 718 719 # Authentication setting 720 auth_settings = [] 721 722 return self.api_client.call_api(resource_path, 'GET', 723 path_params, 724 query_params, 725 header_params, 726 body=body_params, 727 post_params=form_params, 728 files=local_var_files, 729 response_type='BulkSendBatchStatus', 730 auth_settings=auth_settings, 731 callback=params.get('callback'), 732 _return_http_data_only=params.get('_return_http_data_only'), 733 _preload_content=params.get('_preload_content', True), 734 _request_timeout=params.get('_request_timeout'), 735 collection_formats=collection_formats)
Gets a specific bulk send batch status
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
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_send_batch_id: (required)
Returns
BulkSendBatchStatus If the method is called asynchronously, returns the request thread.
737 def get_bulk_send_batches(self, account_id, **kwargs): 738 """ 739 Returns a list of bulk send batch satuses initiated by account. 740 Returns a summary of bulk send batches. Use the `batch_ids` query parameter to narrow the list of batches. 741 This method makes a synchronous HTTP request by default. To make an 742 asynchronous HTTP request, please define a `callback` function 743 to be invoked when receiving the response. 744 >>> def callback_function(response): 745 >>> pprint(response) 746 >>> 747 >>> thread = api.get_bulk_send_batches(account_id, callback=callback_function) 748 749 :param callback function: The callback function 750 for asynchronous request. (optional) 751 :param str account_id: The external account number (int) or account ID Guid. (required) 752 :param str batch_ids: 753 :param str count: 754 :param str from_date: 755 :param str search_text: 756 :param str start_position: 757 :param str status: 758 :param str to_date: 759 :param str user_id: 760 :return: BulkSendBatchSummaries 761 If the method is called asynchronously, 762 returns the request thread. 763 """ 764 kwargs['_return_http_data_only'] = True 765 if kwargs.get('callback'): 766 return self.get_bulk_send_batches_with_http_info(account_id, **kwargs) 767 else: 768 (data) = self.get_bulk_send_batches_with_http_info(account_id, **kwargs) 769 return data
Returns a list of bulk send batch satuses initiated by account.
Returns a summary of bulk send batches. Use the batch_ids
query parameter to narrow the list of batches.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_bulk_send_batches(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str batch_ids:
- str count:
- str from_date:
- str search_text:
- str start_position:
- str status:
- str to_date:
- str user_id:
Returns
BulkSendBatchSummaries If the method is called asynchronously, returns the request thread.
771 def get_bulk_send_batches_with_http_info(self, account_id, **kwargs): 772 """ 773 Returns a list of bulk send batch satuses initiated by account. 774 Returns a summary of bulk send batches. Use the `batch_ids` query parameter to narrow the list of batches. 775 This method makes a synchronous HTTP request by default. To make an 776 asynchronous HTTP request, please define a `callback` function 777 to be invoked when receiving the response. 778 >>> def callback_function(response): 779 >>> pprint(response) 780 >>> 781 >>> thread = api.get_bulk_send_batches_with_http_info(account_id, callback=callback_function) 782 783 :param callback function: The callback function 784 for asynchronous request. (optional) 785 :param str account_id: The external account number (int) or account ID Guid. (required) 786 :param str batch_ids: 787 :param str count: 788 :param str from_date: 789 :param str search_text: 790 :param str start_position: 791 :param str status: 792 :param str to_date: 793 :param str user_id: 794 :return: BulkSendBatchSummaries 795 If the method is called asynchronously, 796 returns the request thread. 797 """ 798 799 all_params = ['account_id', 'batch_ids', 'count', 'from_date', 'search_text', 'start_position', 'status', 'to_date', 'user_id'] 800 all_params.append('callback') 801 all_params.append('_return_http_data_only') 802 all_params.append('_preload_content') 803 all_params.append('_request_timeout') 804 805 params = locals() 806 for key, val in iteritems(params['kwargs']): 807 if key not in all_params: 808 raise TypeError( 809 "Got an unexpected keyword argument '%s'" 810 " to method get_bulk_send_batches" % key 811 ) 812 params[key] = val 813 del params['kwargs'] 814 # verify the required parameter 'account_id' is set 815 if ('account_id' not in params) or (params['account_id'] is None): 816 raise ValueError("Missing the required parameter `account_id` when calling `get_bulk_send_batches`") 817 818 819 collection_formats = {} 820 821 resource_path = '/v2.1/accounts/{accountId}/bulk_send_batch'.replace('{format}', 'json') 822 path_params = {} 823 if 'account_id' in params: 824 path_params['accountId'] = params['account_id'] 825 826 query_params = {} 827 if 'batch_ids' in params: 828 query_params['batch_ids'] = params['batch_ids'] 829 if 'count' in params: 830 query_params['count'] = params['count'] 831 if 'from_date' in params: 832 query_params['from_date'] = params['from_date'] 833 if 'search_text' in params: 834 query_params['search_text'] = params['search_text'] 835 if 'start_position' in params: 836 query_params['start_position'] = params['start_position'] 837 if 'status' in params: 838 query_params['status'] = params['status'] 839 if 'to_date' in params: 840 query_params['to_date'] = params['to_date'] 841 if 'user_id' in params: 842 query_params['user_id'] = params['user_id'] 843 844 header_params = {} 845 846 form_params = [] 847 local_var_files = {} 848 849 body_params = None 850 # HTTP header `Accept` 851 header_params['Accept'] = self.api_client.\ 852 select_header_accept(['application/json']) 853 854 # Authentication setting 855 auth_settings = [] 856 857 return self.api_client.call_api(resource_path, 'GET', 858 path_params, 859 query_params, 860 header_params, 861 body=body_params, 862 post_params=form_params, 863 files=local_var_files, 864 response_type='BulkSendBatchSummaries', 865 auth_settings=auth_settings, 866 callback=params.get('callback'), 867 _return_http_data_only=params.get('_return_http_data_only'), 868 _preload_content=params.get('_preload_content', True), 869 _request_timeout=params.get('_request_timeout'), 870 collection_formats=collection_formats)
Returns a list of bulk send batch satuses initiated by account.
Returns a summary of bulk send batches. Use the batch_ids
query parameter to narrow the list of batches.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_bulk_send_batches_with_http_info(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str batch_ids:
- str count:
- str from_date:
- str search_text:
- str start_position:
- str status:
- str to_date:
- str user_id:
Returns
BulkSendBatchSummaries If the method is called asynchronously, returns the request thread.
872 def get_bulk_send_list(self, account_id, bulk_send_list_id, **kwargs): 873 """ 874 Gets a specific bulk send list 875 This method returns all of the details associated with a specific bulk send list that belongs to the current user. 876 This method makes a synchronous HTTP request by default. To make an 877 asynchronous HTTP request, please define a `callback` function 878 to be invoked when receiving the response. 879 >>> def callback_function(response): 880 >>> pprint(response) 881 >>> 882 >>> thread = api.get_bulk_send_list(account_id, bulk_send_list_id, callback=callback_function) 883 884 :param callback function: The callback function 885 for asynchronous request. (optional) 886 :param str account_id: The external account number (int) or account ID Guid. (required) 887 :param str bulk_send_list_id: (required) 888 :return: BulkSendingList 889 If the method is called asynchronously, 890 returns the request thread. 891 """ 892 kwargs['_return_http_data_only'] = True 893 if kwargs.get('callback'): 894 return self.get_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 895 else: 896 (data) = self.get_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 897 return data
Gets a specific bulk send list
This method returns all of the details associated with a specific bulk send list that belongs to the current user.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_bulk_send_list(account_id, bulk_send_list_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_send_list_id: (required)
Returns
BulkSendingList If the method is called asynchronously, returns the request thread.
899 def get_bulk_send_list_with_http_info(self, account_id, bulk_send_list_id, **kwargs): 900 """ 901 Gets a specific bulk send list 902 This method returns all of the details associated with a specific bulk send list that belongs to the current user. 903 This method makes a synchronous HTTP request by default. To make an 904 asynchronous HTTP request, please define a `callback` function 905 to be invoked when receiving the response. 906 >>> def callback_function(response): 907 >>> pprint(response) 908 >>> 909 >>> thread = api.get_bulk_send_list_with_http_info(account_id, bulk_send_list_id, callback=callback_function) 910 911 :param callback function: The callback function 912 for asynchronous request. (optional) 913 :param str account_id: The external account number (int) or account ID Guid. (required) 914 :param str bulk_send_list_id: (required) 915 :return: BulkSendingList 916 If the method is called asynchronously, 917 returns the request thread. 918 """ 919 920 all_params = ['account_id', 'bulk_send_list_id'] 921 all_params.append('callback') 922 all_params.append('_return_http_data_only') 923 all_params.append('_preload_content') 924 all_params.append('_request_timeout') 925 926 params = locals() 927 for key, val in iteritems(params['kwargs']): 928 if key not in all_params: 929 raise TypeError( 930 "Got an unexpected keyword argument '%s'" 931 " to method get_bulk_send_list" % key 932 ) 933 params[key] = val 934 del params['kwargs'] 935 # verify the required parameter 'account_id' is set 936 if ('account_id' not in params) or (params['account_id'] is None): 937 raise ValueError("Missing the required parameter `account_id` when calling `get_bulk_send_list`") 938 # verify the required parameter 'bulk_send_list_id' is set 939 if ('bulk_send_list_id' not in params) or (params['bulk_send_list_id'] is None): 940 raise ValueError("Missing the required parameter `bulk_send_list_id` when calling `get_bulk_send_list`") 941 942 943 collection_formats = {} 944 945 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}'.replace('{format}', 'json') 946 path_params = {} 947 if 'account_id' in params: 948 path_params['accountId'] = params['account_id'] 949 if 'bulk_send_list_id' in params: 950 path_params['bulkSendListId'] = params['bulk_send_list_id'] 951 952 query_params = {} 953 954 header_params = {} 955 956 form_params = [] 957 local_var_files = {} 958 959 body_params = None 960 # HTTP header `Accept` 961 header_params['Accept'] = self.api_client.\ 962 select_header_accept(['application/json']) 963 964 # Authentication setting 965 auth_settings = [] 966 967 return self.api_client.call_api(resource_path, 'GET', 968 path_params, 969 query_params, 970 header_params, 971 body=body_params, 972 post_params=form_params, 973 files=local_var_files, 974 response_type='BulkSendingList', 975 auth_settings=auth_settings, 976 callback=params.get('callback'), 977 _return_http_data_only=params.get('_return_http_data_only'), 978 _preload_content=params.get('_preload_content', True), 979 _request_timeout=params.get('_request_timeout'), 980 collection_formats=collection_formats)
Gets a specific bulk send list
This method returns all of the details associated with a specific bulk send list that belongs to the current user.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_bulk_send_list_with_http_info(account_id, bulk_send_list_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_send_list_id: (required)
Returns
BulkSendingList If the method is called asynchronously, returns the request thread.
982 def get_bulk_send_lists(self, account_id, **kwargs): 983 """ 984 Lists top-level details for all bulk send lists visible to the current user 985 This method returns a list of bulk send lists belonging to the current user, as well as basic information about each list. 986 This method makes a synchronous HTTP request by default. To make an 987 asynchronous HTTP request, please define a `callback` function 988 to be invoked when receiving the response. 989 >>> def callback_function(response): 990 >>> pprint(response) 991 >>> 992 >>> thread = api.get_bulk_send_lists(account_id, callback=callback_function) 993 994 :param callback function: The callback function 995 for asynchronous request. (optional) 996 :param str account_id: The external account number (int) or account ID Guid. (required) 997 :return: BulkSendingListSummaries 998 If the method is called asynchronously, 999 returns the request thread. 1000 """ 1001 kwargs['_return_http_data_only'] = True 1002 if kwargs.get('callback'): 1003 return self.get_bulk_send_lists_with_http_info(account_id, **kwargs) 1004 else: 1005 (data) = self.get_bulk_send_lists_with_http_info(account_id, **kwargs) 1006 return data
Lists top-level details for all bulk send lists visible to the current user
This method returns a list of bulk send lists belonging to the current user, as well as basic information about each list.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_bulk_send_lists(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
Returns
BulkSendingListSummaries If the method is called asynchronously, returns the request thread.
1008 def get_bulk_send_lists_with_http_info(self, account_id, **kwargs): 1009 """ 1010 Lists top-level details for all bulk send lists visible to the current user 1011 This method returns a list of bulk send lists belonging to the current user, as well as basic information about each list. 1012 This method makes a synchronous HTTP request by default. To make an 1013 asynchronous HTTP request, please define a `callback` function 1014 to be invoked when receiving the response. 1015 >>> def callback_function(response): 1016 >>> pprint(response) 1017 >>> 1018 >>> thread = api.get_bulk_send_lists_with_http_info(account_id, callback=callback_function) 1019 1020 :param callback function: The callback function 1021 for asynchronous request. (optional) 1022 :param str account_id: The external account number (int) or account ID Guid. (required) 1023 :return: BulkSendingListSummaries 1024 If the method is called asynchronously, 1025 returns the request thread. 1026 """ 1027 1028 all_params = ['account_id'] 1029 all_params.append('callback') 1030 all_params.append('_return_http_data_only') 1031 all_params.append('_preload_content') 1032 all_params.append('_request_timeout') 1033 1034 params = locals() 1035 for key, val in iteritems(params['kwargs']): 1036 if key not in all_params: 1037 raise TypeError( 1038 "Got an unexpected keyword argument '%s'" 1039 " to method get_bulk_send_lists" % key 1040 ) 1041 params[key] = val 1042 del params['kwargs'] 1043 # verify the required parameter 'account_id' is set 1044 if ('account_id' not in params) or (params['account_id'] is None): 1045 raise ValueError("Missing the required parameter `account_id` when calling `get_bulk_send_lists`") 1046 1047 1048 collection_formats = {} 1049 1050 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists'.replace('{format}', 'json') 1051 path_params = {} 1052 if 'account_id' in params: 1053 path_params['accountId'] = params['account_id'] 1054 1055 query_params = {} 1056 1057 header_params = {} 1058 1059 form_params = [] 1060 local_var_files = {} 1061 1062 body_params = None 1063 # HTTP header `Accept` 1064 header_params['Accept'] = self.api_client.\ 1065 select_header_accept(['application/json']) 1066 1067 # Authentication setting 1068 auth_settings = [] 1069 1070 return self.api_client.call_api(resource_path, 'GET', 1071 path_params, 1072 query_params, 1073 header_params, 1074 body=body_params, 1075 post_params=form_params, 1076 files=local_var_files, 1077 response_type='BulkSendingListSummaries', 1078 auth_settings=auth_settings, 1079 callback=params.get('callback'), 1080 _return_http_data_only=params.get('_return_http_data_only'), 1081 _preload_content=params.get('_preload_content', True), 1082 _request_timeout=params.get('_request_timeout'), 1083 collection_formats=collection_formats)
Lists top-level details for all bulk send lists visible to the current user
This method returns a list of bulk send lists belonging to the current user, as well as basic information about each list.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_bulk_send_lists_with_http_info(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
Returns
BulkSendingListSummaries If the method is called asynchronously, returns the request thread.
1085 def update_bulk_send_batch_action(self, account_id, bulk_action, bulk_send_batch_id, **kwargs): 1086 """ 1087 Initiate a specific bulk send batch action 1088 1089 This method makes a synchronous HTTP request by default. To make an 1090 asynchronous HTTP request, please define a `callback` function 1091 to be invoked when receiving the response. 1092 >>> def callback_function(response): 1093 >>> pprint(response) 1094 >>> 1095 >>> thread = api.update_bulk_send_batch_action(account_id, bulk_action, bulk_send_batch_id, callback=callback_function) 1096 1097 :param callback function: The callback function 1098 for asynchronous request. (optional) 1099 :param str account_id: The external account number (int) or account ID Guid. (required) 1100 :param str bulk_action: (required) 1101 :param str bulk_send_batch_id: (required) 1102 :param BulkSendBatchActionRequest bulk_send_batch_action_request: 1103 :return: BulkSendBatchStatus 1104 If the method is called asynchronously, 1105 returns the request thread. 1106 """ 1107 kwargs['_return_http_data_only'] = True 1108 if kwargs.get('callback'): 1109 return self.update_bulk_send_batch_action_with_http_info(account_id, bulk_action, bulk_send_batch_id, **kwargs) 1110 else: 1111 (data) = self.update_bulk_send_batch_action_with_http_info(account_id, bulk_action, bulk_send_batch_id, **kwargs) 1112 return data
Initiate a specific bulk send batch action
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_bulk_send_batch_action(account_id, bulk_action, bulk_send_batch_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_action: (required)
- str bulk_send_batch_id: (required)
- BulkSendBatchActionRequest bulk_send_batch_action_request:
Returns
BulkSendBatchStatus If the method is called asynchronously, returns the request thread.
1114 def update_bulk_send_batch_action_with_http_info(self, account_id, bulk_action, bulk_send_batch_id, **kwargs): 1115 """ 1116 Initiate a specific bulk send batch action 1117 1118 This method makes a synchronous HTTP request by default. To make an 1119 asynchronous HTTP request, please define a `callback` function 1120 to be invoked when receiving the response. 1121 >>> def callback_function(response): 1122 >>> pprint(response) 1123 >>> 1124 >>> thread = api.update_bulk_send_batch_action_with_http_info(account_id, bulk_action, bulk_send_batch_id, callback=callback_function) 1125 1126 :param callback function: The callback function 1127 for asynchronous request. (optional) 1128 :param str account_id: The external account number (int) or account ID Guid. (required) 1129 :param str bulk_action: (required) 1130 :param str bulk_send_batch_id: (required) 1131 :param BulkSendBatchActionRequest bulk_send_batch_action_request: 1132 :return: BulkSendBatchStatus 1133 If the method is called asynchronously, 1134 returns the request thread. 1135 """ 1136 1137 all_params = ['account_id', 'bulk_action', 'bulk_send_batch_id', 'bulk_send_batch_action_request'] 1138 all_params.append('callback') 1139 all_params.append('_return_http_data_only') 1140 all_params.append('_preload_content') 1141 all_params.append('_request_timeout') 1142 1143 params = locals() 1144 for key, val in iteritems(params['kwargs']): 1145 if key not in all_params: 1146 raise TypeError( 1147 "Got an unexpected keyword argument '%s'" 1148 " to method update_bulk_send_batch_action" % key 1149 ) 1150 params[key] = val 1151 del params['kwargs'] 1152 # verify the required parameter 'account_id' is set 1153 if ('account_id' not in params) or (params['account_id'] is None): 1154 raise ValueError("Missing the required parameter `account_id` when calling `update_bulk_send_batch_action`") 1155 # verify the required parameter 'bulk_action' is set 1156 if ('bulk_action' not in params) or (params['bulk_action'] is None): 1157 raise ValueError("Missing the required parameter `bulk_action` when calling `update_bulk_send_batch_action`") 1158 # verify the required parameter 'bulk_send_batch_id' is set 1159 if ('bulk_send_batch_id' not in params) or (params['bulk_send_batch_id'] is None): 1160 raise ValueError("Missing the required parameter `bulk_send_batch_id` when calling `update_bulk_send_batch_action`") 1161 1162 1163 collection_formats = {} 1164 1165 resource_path = '/v2.1/accounts/{accountId}/bulk_send_batch/{bulkSendBatchId}/{bulkAction}'.replace('{format}', 'json') 1166 path_params = {} 1167 if 'account_id' in params: 1168 path_params['accountId'] = params['account_id'] 1169 if 'bulk_action' in params: 1170 path_params['bulkAction'] = params['bulk_action'] 1171 if 'bulk_send_batch_id' in params: 1172 path_params['bulkSendBatchId'] = params['bulk_send_batch_id'] 1173 1174 query_params = {} 1175 1176 header_params = {} 1177 1178 form_params = [] 1179 local_var_files = {} 1180 1181 body_params = None 1182 if 'bulk_send_batch_action_request' in params: 1183 body_params = params['bulk_send_batch_action_request'] 1184 # HTTP header `Accept` 1185 header_params['Accept'] = self.api_client.\ 1186 select_header_accept(['application/json']) 1187 1188 # Authentication setting 1189 auth_settings = [] 1190 1191 return self.api_client.call_api(resource_path, 'PUT', 1192 path_params, 1193 query_params, 1194 header_params, 1195 body=body_params, 1196 post_params=form_params, 1197 files=local_var_files, 1198 response_type='BulkSendBatchStatus', 1199 auth_settings=auth_settings, 1200 callback=params.get('callback'), 1201 _return_http_data_only=params.get('_return_http_data_only'), 1202 _preload_content=params.get('_preload_content', True), 1203 _request_timeout=params.get('_request_timeout'), 1204 collection_formats=collection_formats)
Initiate a specific bulk send batch action
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_bulk_send_batch_action_with_http_info(account_id, bulk_action, bulk_send_batch_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_action: (required)
- str bulk_send_batch_id: (required)
- BulkSendBatchActionRequest bulk_send_batch_action_request:
Returns
BulkSendBatchStatus If the method is called asynchronously, returns the request thread.
1206 def update_bulk_send_batch_status(self, account_id, bulk_send_batch_id, **kwargs): 1207 """ 1208 Put/Update a specific bulk send batch status 1209 Updates a specific bulk send batch status. 1210 This method makes a synchronous HTTP request by default. To make an 1211 asynchronous HTTP request, please define a `callback` function 1212 to be invoked when receiving the response. 1213 >>> def callback_function(response): 1214 >>> pprint(response) 1215 >>> 1216 >>> thread = api.update_bulk_send_batch_status(account_id, bulk_send_batch_id, callback=callback_function) 1217 1218 :param callback function: The callback function 1219 for asynchronous request. (optional) 1220 :param str account_id: The external account number (int) or account ID Guid. (required) 1221 :param str bulk_send_batch_id: (required) 1222 :param BulkSendBatchRequest bulk_send_batch_request: 1223 :return: BulkSendBatchStatus 1224 If the method is called asynchronously, 1225 returns the request thread. 1226 """ 1227 kwargs['_return_http_data_only'] = True 1228 if kwargs.get('callback'): 1229 return self.update_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, **kwargs) 1230 else: 1231 (data) = self.update_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, **kwargs) 1232 return data
Put/Update a specific bulk send batch status
Updates a specific bulk send batch status.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_bulk_send_batch_status(account_id, bulk_send_batch_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_send_batch_id: (required)
- BulkSendBatchRequest bulk_send_batch_request:
Returns
BulkSendBatchStatus If the method is called asynchronously, returns the request thread.
1234 def update_bulk_send_batch_status_with_http_info(self, account_id, bulk_send_batch_id, **kwargs): 1235 """ 1236 Put/Update a specific bulk send batch status 1237 Updates a specific bulk send batch status. 1238 This method makes a synchronous HTTP request by default. To make an 1239 asynchronous HTTP request, please define a `callback` function 1240 to be invoked when receiving the response. 1241 >>> def callback_function(response): 1242 >>> pprint(response) 1243 >>> 1244 >>> thread = api.update_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, callback=callback_function) 1245 1246 :param callback function: The callback function 1247 for asynchronous request. (optional) 1248 :param str account_id: The external account number (int) or account ID Guid. (required) 1249 :param str bulk_send_batch_id: (required) 1250 :param BulkSendBatchRequest bulk_send_batch_request: 1251 :return: BulkSendBatchStatus 1252 If the method is called asynchronously, 1253 returns the request thread. 1254 """ 1255 1256 all_params = ['account_id', 'bulk_send_batch_id', 'bulk_send_batch_request'] 1257 all_params.append('callback') 1258 all_params.append('_return_http_data_only') 1259 all_params.append('_preload_content') 1260 all_params.append('_request_timeout') 1261 1262 params = locals() 1263 for key, val in iteritems(params['kwargs']): 1264 if key not in all_params: 1265 raise TypeError( 1266 "Got an unexpected keyword argument '%s'" 1267 " to method update_bulk_send_batch_status" % key 1268 ) 1269 params[key] = val 1270 del params['kwargs'] 1271 # verify the required parameter 'account_id' is set 1272 if ('account_id' not in params) or (params['account_id'] is None): 1273 raise ValueError("Missing the required parameter `account_id` when calling `update_bulk_send_batch_status`") 1274 # verify the required parameter 'bulk_send_batch_id' is set 1275 if ('bulk_send_batch_id' not in params) or (params['bulk_send_batch_id'] is None): 1276 raise ValueError("Missing the required parameter `bulk_send_batch_id` when calling `update_bulk_send_batch_status`") 1277 1278 1279 collection_formats = {} 1280 1281 resource_path = '/v2.1/accounts/{accountId}/bulk_send_batch/{bulkSendBatchId}'.replace('{format}', 'json') 1282 path_params = {} 1283 if 'account_id' in params: 1284 path_params['accountId'] = params['account_id'] 1285 if 'bulk_send_batch_id' in params: 1286 path_params['bulkSendBatchId'] = params['bulk_send_batch_id'] 1287 1288 query_params = {} 1289 1290 header_params = {} 1291 1292 form_params = [] 1293 local_var_files = {} 1294 1295 body_params = None 1296 if 'bulk_send_batch_request' in params: 1297 body_params = params['bulk_send_batch_request'] 1298 # HTTP header `Accept` 1299 header_params['Accept'] = self.api_client.\ 1300 select_header_accept(['application/json']) 1301 1302 # Authentication setting 1303 auth_settings = [] 1304 1305 return self.api_client.call_api(resource_path, 'PUT', 1306 path_params, 1307 query_params, 1308 header_params, 1309 body=body_params, 1310 post_params=form_params, 1311 files=local_var_files, 1312 response_type='BulkSendBatchStatus', 1313 auth_settings=auth_settings, 1314 callback=params.get('callback'), 1315 _return_http_data_only=params.get('_return_http_data_only'), 1316 _preload_content=params.get('_preload_content', True), 1317 _request_timeout=params.get('_request_timeout'), 1318 collection_formats=collection_formats)
Put/Update a specific bulk send batch status
Updates a specific bulk send batch status.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_bulk_send_batch_status_with_http_info(account_id, bulk_send_batch_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_send_batch_id: (required)
- BulkSendBatchRequest bulk_send_batch_request:
Returns
BulkSendBatchStatus If the method is called asynchronously, returns the request thread.
1320 def update_bulk_send_list(self, account_id, bulk_send_list_id, **kwargs): 1321 """ 1322 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 1323 This method replaces the definition of an existing bulk send list. 1324 This method makes a synchronous HTTP request by default. To make an 1325 asynchronous HTTP request, please define a `callback` function 1326 to be invoked when receiving the response. 1327 >>> def callback_function(response): 1328 >>> pprint(response) 1329 >>> 1330 >>> thread = api.update_bulk_send_list(account_id, bulk_send_list_id, callback=callback_function) 1331 1332 :param callback function: The callback function 1333 for asynchronous request. (optional) 1334 :param str account_id: The external account number (int) or account ID Guid. (required) 1335 :param str bulk_send_list_id: (required) 1336 :param BulkSendingList bulk_sending_list: 1337 :return: BulkSendingList 1338 If the method is called asynchronously, 1339 returns the request thread. 1340 """ 1341 kwargs['_return_http_data_only'] = True 1342 if kwargs.get('callback'): 1343 return self.update_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 1344 else: 1345 (data) = self.update_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) 1346 return data
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
This method replaces the definition of an existing bulk send list.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_bulk_send_list(account_id, bulk_send_list_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_send_list_id: (required)
- BulkSendingList bulk_sending_list:
Returns
BulkSendingList If the method is called asynchronously, returns the request thread.
1348 def update_bulk_send_list_with_http_info(self, account_id, bulk_send_list_id, **kwargs): 1349 """ 1350 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 1351 This method replaces the definition of an existing bulk send list. 1352 This method makes a synchronous HTTP request by default. To make an 1353 asynchronous HTTP request, please define a `callback` function 1354 to be invoked when receiving the response. 1355 >>> def callback_function(response): 1356 >>> pprint(response) 1357 >>> 1358 >>> thread = api.update_bulk_send_list_with_http_info(account_id, bulk_send_list_id, callback=callback_function) 1359 1360 :param callback function: The callback function 1361 for asynchronous request. (optional) 1362 :param str account_id: The external account number (int) or account ID Guid. (required) 1363 :param str bulk_send_list_id: (required) 1364 :param BulkSendingList bulk_sending_list: 1365 :return: BulkSendingList 1366 If the method is called asynchronously, 1367 returns the request thread. 1368 """ 1369 1370 all_params = ['account_id', 'bulk_send_list_id', 'bulk_sending_list'] 1371 all_params.append('callback') 1372 all_params.append('_return_http_data_only') 1373 all_params.append('_preload_content') 1374 all_params.append('_request_timeout') 1375 1376 params = locals() 1377 for key, val in iteritems(params['kwargs']): 1378 if key not in all_params: 1379 raise TypeError( 1380 "Got an unexpected keyword argument '%s'" 1381 " to method update_bulk_send_list" % key 1382 ) 1383 params[key] = val 1384 del params['kwargs'] 1385 # verify the required parameter 'account_id' is set 1386 if ('account_id' not in params) or (params['account_id'] is None): 1387 raise ValueError("Missing the required parameter `account_id` when calling `update_bulk_send_list`") 1388 # verify the required parameter 'bulk_send_list_id' is set 1389 if ('bulk_send_list_id' not in params) or (params['bulk_send_list_id'] is None): 1390 raise ValueError("Missing the required parameter `bulk_send_list_id` when calling `update_bulk_send_list`") 1391 1392 1393 collection_formats = {} 1394 1395 resource_path = '/v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}'.replace('{format}', 'json') 1396 path_params = {} 1397 if 'account_id' in params: 1398 path_params['accountId'] = params['account_id'] 1399 if 'bulk_send_list_id' in params: 1400 path_params['bulkSendListId'] = params['bulk_send_list_id'] 1401 1402 query_params = {} 1403 1404 header_params = {} 1405 1406 form_params = [] 1407 local_var_files = {} 1408 1409 body_params = None 1410 if 'bulk_sending_list' in params: 1411 body_params = params['bulk_sending_list'] 1412 # HTTP header `Accept` 1413 header_params['Accept'] = self.api_client.\ 1414 select_header_accept(['application/json']) 1415 1416 # Authentication setting 1417 auth_settings = [] 1418 1419 return self.api_client.call_api(resource_path, 'PUT', 1420 path_params, 1421 query_params, 1422 header_params, 1423 body=body_params, 1424 post_params=form_params, 1425 files=local_var_files, 1426 response_type='BulkSendingList', 1427 auth_settings=auth_settings, 1428 callback=params.get('callback'), 1429 _return_http_data_only=params.get('_return_http_data_only'), 1430 _preload_content=params.get('_preload_content', True), 1431 _request_timeout=params.get('_request_timeout'), 1432 collection_formats=collection_formats)
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
This method replaces the definition of an existing bulk send list.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback
function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_bulk_send_list_with_http_info(account_id, bulk_send_list_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str bulk_send_list_id: (required)
- BulkSendingList bulk_sending_list:
Returns
BulkSendingList If the method is called asynchronously, returns the request thread.