Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package com.docusign.esign.api;
import com.docusign.esign.client.ApiClient;
import com.docusign.esign.client.ApiException;
import com.docusign.esign.client.Configuration;
import com.docusign.esign.client.Pair;
import com.docusign.esign.model.*;
import javax.ws.rs.core.GenericType;
/** EnvelopesApi class. */
public class EnvelopesApi {
private ApiClient apiClient;
/** EnvelopesApi. */
public EnvelopesApi() {
this(Configuration.getDefaultApiClient());
}
/** EnvelopesApi. */
public EnvelopesApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* getApiClient Method.
*
* @return ApiClient
*/
public ApiClient getApiClient() {
return apiClient;
}
/** setApiClient Method. */
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
///
/// Adds templates to an envelope. Adds templates to the specified envelope.
///
/** ApplyTemplateOptions Class. */
public class ApplyTemplateOptions {
private String preserveTemplateRecipient = null;
/** setPreserveTemplateRecipient method. */
public void setPreserveTemplateRecipient(String preserveTemplateRecipient) {
this.preserveTemplateRecipient = preserveTemplateRecipient;
}
/**
* getPreserveTemplateRecipient method.
*
* @return String
*/
public String getPreserveTemplateRecipient() {
return this.preserveTemplateRecipient;
}
}
/**
* Adds templates to an envelope.. Adds templates to the specified envelope.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param documentTemplateList (optional)
* @return DocumentTemplateList
*/
public DocumentTemplateList applyTemplate(
String accountId, String envelopeId, DocumentTemplateList documentTemplateList)
throws ApiException {
return applyTemplate(accountId, envelopeId, documentTemplateList, null);
}
/**
* Adds templates to an envelope.. Adds templates to the specified envelope.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param documentTemplateList (optional)
* @param options for modifying the method behavior.
* @return DocumentTemplateList
* @throws ApiException if fails to make API call
*/
public DocumentTemplateList applyTemplate(
String accountId,
String envelopeId,
DocumentTemplateList documentTemplateList,
EnvelopesApi.ApplyTemplateOptions options)
throws ApiException {
Object localVarPostBody = documentTemplateList;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling applyTemplate");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400, "Missing the required parameter 'envelopeId' when calling applyTemplate");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/templates"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll(
"\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
if (options != null) {
localVarQueryParams.addAll(
apiClient.parameterToPair(
"preserve_template_recipient", options.preserveTemplateRecipient));
}
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType =
new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
///
/// Adds templates to a document in an envelope. Adds templates to a document in the specified
// envelope.
///
/** ApplyTemplateToDocumentOptions Class. */
public class ApplyTemplateToDocumentOptions {
private String preserveTemplateRecipient = null;
/** setPreserveTemplateRecipient method. */
public void setPreserveTemplateRecipient(String preserveTemplateRecipient) {
this.preserveTemplateRecipient = preserveTemplateRecipient;
}
/**
* getPreserveTemplateRecipient method.
*
* @return String
*/
public String getPreserveTemplateRecipient() {
return this.preserveTemplateRecipient;
}
}
/**
* Adds templates to a document in an envelope.. Adds templates to a document in the specified
* envelope.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @param documentTemplateList (optional)
* @return DocumentTemplateList
*/
public DocumentTemplateList applyTemplateToDocument(
String accountId,
String envelopeId,
String documentId,
DocumentTemplateList documentTemplateList)
throws ApiException {
return applyTemplateToDocument(accountId, envelopeId, documentId, documentTemplateList, null);
}
/**
* Adds templates to a document in an envelope.. Adds templates to a document in the specified
* envelope.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @param documentTemplateList (optional)
* @param options for modifying the method behavior.
* @return DocumentTemplateList
* @throws ApiException if fails to make API call
*/
public DocumentTemplateList applyTemplateToDocument(
String accountId,
String envelopeId,
String documentId,
DocumentTemplateList documentTemplateList,
EnvelopesApi.ApplyTemplateToDocumentOptions options)
throws ApiException {
Object localVarPostBody = documentTemplateList;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling applyTemplateToDocument");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400, "Missing the required parameter 'envelopeId' when calling applyTemplateToDocument");
}
// verify the required parameter 'documentId' is set
if (documentId == null) {
throw new ApiException(
400, "Missing the required parameter 'documentId' when calling applyTemplateToDocument");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/templates"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()))
.replaceAll(
"\\{" + "documentId" + "\\}", apiClient.escapeString(documentId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
if (options != null) {
localVarQueryParams.addAll(
apiClient.parameterToPair(
"preserve_template_recipient", options.preserveTemplateRecipient));
}
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType =
new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Initiate a new ChunkedUpload..
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param chunkedUploadRequest (optional)
* @return ChunkedUploadResponse
* @throws ApiException if fails to make API call
*/
public ChunkedUploadResponse createChunkedUpload(
String accountId, ChunkedUploadRequest chunkedUploadRequest) throws ApiException {
Object localVarPostBody = chunkedUploadRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createChunkedUpload");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/chunked_uploads"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType =
new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Returns a URL to the authentication view UI.. Returns a URL that allows you to embed the
* authentication view of the DocuSign UI in your applications.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param consoleViewRequest (optional)
* @return ViewUrl
* @throws ApiException if fails to make API call
*/
public ViewUrl createConsoleView(String accountId, ConsoleViewRequest consoleViewRequest)
throws ApiException {
Object localVarPostBody = consoleViewRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createConsoleView");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/views/console"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Returns a URL to the envelope correction UI.. Returns a URL that allows you to embed the
* envelope correction view of the DocuSign UI in your applications. Important: iFrames should not
* be used for embedded operations on mobile devices due to screen space issues. For iOS devices
* DocuSign recommends using a WebView.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param correctViewRequest (optional)
* @return ViewUrl
* @throws ApiException if fails to make API call
*/
public ViewUrl createCorrectView(
String accountId, String envelopeId, CorrectViewRequest correctViewRequest)
throws ApiException {
Object localVarPostBody = correctViewRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createCorrectView");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400, "Missing the required parameter 'envelopeId' when calling createCorrectView");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/correct"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll(
"\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Updates envelope custom fields for an envelope.. Updates the envelope custom fields for draft
* and in-process envelopes. Each custom field used in an envelope must have a unique name.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param customFields (optional)
* @return CustomFields
* @throws ApiException if fails to make API call
*/
public CustomFields createCustomFields(
String accountId, String envelopeId, CustomFields customFields) throws ApiException {
Object localVarPostBody = customFields;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createCustomFields");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400, "Missing the required parameter 'envelopeId' when calling createCustomFields");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll(
"\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Creates custom document fields in an existing envelope document.. Creates custom document
* fields in an existing envelope document.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @param documentFieldsInformation (optional)
* @return DocumentFieldsInformation
* @throws ApiException if fails to make API call
*/
public DocumentFieldsInformation createDocumentFields(
String accountId,
String envelopeId,
String documentId,
DocumentFieldsInformation documentFieldsInformation)
throws ApiException {
Object localVarPostBody = documentFieldsInformation;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createDocumentFields");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400, "Missing the required parameter 'envelopeId' when calling createDocumentFields");
}
// verify the required parameter 'documentId' is set
if (documentId == null) {
throw new ApiException(
400, "Missing the required parameter 'documentId' when calling createDocumentFields");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()))
.replaceAll(
"\\{" + "documentId" + "\\}", apiClient.escapeString(documentId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType =
new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Get Responsive HTML Preview for a document in an envelope..
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @param documentHtmlDefinition (optional)
* @return DocumentHtmlDefinitions
* @throws ApiException if fails to make API call
*/
public DocumentHtmlDefinitions createDocumentResponsiveHtmlPreview(
String accountId,
String envelopeId,
String documentId,
DocumentHtmlDefinition documentHtmlDefinition)
throws ApiException {
Object localVarPostBody = documentHtmlDefinition;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400,
"Missing the required parameter 'accountId' when calling createDocumentResponsiveHtmlPreview");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400,
"Missing the required parameter 'envelopeId' when calling createDocumentResponsiveHtmlPreview");
}
// verify the required parameter 'documentId' is set
if (documentId == null) {
throw new ApiException(
400,
"Missing the required parameter 'documentId' when calling createDocumentResponsiveHtmlPreview");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/responsive_html_preview"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()))
.replaceAll(
"\\{" + "documentId" + "\\}", apiClient.escapeString(documentId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType =
new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Adds the tabs to an envelope document.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @param tabs (optional)
* @return Tabs
* @throws ApiException if fails to make API call
*/
public Tabs createDocumentTabs(String accountId, String envelopeId, String documentId, Tabs tabs)
throws ApiException {
Object localVarPostBody = tabs;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createDocumentTabs");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400, "Missing the required parameter 'envelopeId' when calling createDocumentTabs");
}
// verify the required parameter 'documentId' is set
if (documentId == null) {
throw new ApiException(
400, "Missing the required parameter 'documentId' when calling createDocumentTabs");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()))
.replaceAll(
"\\{" + "documentId" + "\\}", apiClient.escapeString(documentId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Returns a URL to the edit view UI.. Returns a URL that allows you to embed the edit view of the
* DocuSign UI in your applications. This is a one-time use login token that allows the user to be
* placed into the DocuSign editing view. Upon sending completion, the user is returned to the
* return URL provided by the API application. Important: iFrames should not be used for embedded
* operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends
* using a WebView.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param returnUrlRequest (optional)
* @return ViewUrl
* @throws ApiException if fails to make API call
*/
public ViewUrl createEditView(
String accountId, String envelopeId, ReturnUrlRequest returnUrlRequest) throws ApiException {
Object localVarPostBody = returnUrlRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createEditView");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400, "Missing the required parameter 'envelopeId' when calling createEditView");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/edit"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll(
"\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Adds email setting overrides to an envelope.. Adds email override settings, changing the email
* address to reply to an email address, name, or the BCC for email archive information, for the
* envelope. Note that adding email settings will only affect email communications that occur
* after the addition was made. ### Important: The BCC Email address feature is designed to
* provide a copy of all email communications for external archiving purposes. DocuSign recommends
* that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override
* option, include additional signer authentication options. To send a copy of the envelope to a
* recipient who does not need to sign, use a Carbon Copies or Certified Deliveries Recipient
* Type.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param emailSettings (optional)
* @return EmailSettings
* @throws ApiException if fails to make API call
*/
public EmailSettings createEmailSettings(
String accountId, String envelopeId, EmailSettings emailSettings) throws ApiException {
Object localVarPostBody = emailSettings;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createEmailSettings");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400, "Missing the required parameter 'envelopeId' when calling createEmailSettings");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/email_settings"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll(
"\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
///
/// Creates an envelope. Creates an envelope. Using this function you can: * Create an envelope
// and send it. * Create an envelope from an existing template and send it. In either case, you
// can choose to save the envelope as a draft envelope instead of sending it by setting the
// request's `status` property to `created` instead of `sent`.
// ## Sending Envelopes Documents can be included with the Envelopes::create call itself or a
// template can include documents. Documents can be added by using a multi-part/form request or by
// using the `documentBase64` field of the [`document`
// object](#/definitions/document) ### Recipient Types An [`envelopeDefinition`
// object](#/definitions/envelopeDefinition) is used as the method's body. Envelope recipients
// can be defined in the envelope or in templates. The `envelopeDefinition` object's
// `recipients` field is an [`EnvelopeRecipients` resource
// object](#/definitions/EnvelopeRecipients). It includes arrays of the seven types of recipients
// defined by DocuSign: Recipient type | Object definition -------------- | -----------------
// agent (can add name and email information for later recipients/signers) |
// [`agent`](#/definitions/agent) carbon copy (receives a copy of the documents) |
// [`carbonCopy`](#/definitions/carbonCopy) certified delivery (receives a copy of the
// documents and must acknowledge receipt) |
// [`certifiedDelivery`](#/definitions/certifiedDelivery) editor (can change recipients
// and document fields for later recipients/signers) | [`editor`](#/definitions/editor)
// in-person signer (\"hosts\" someone who signs in-person) |
// [`inPersonSigner`](#/definitions/inPersonSigner) intermediary (can add name and email
// information for some later recipients/signers.) |
// [`intermediary`](#/definitions/intermediary) signer (signs and/or updates document
// fields) | [`signer`](#/definitions/signer) Additional information about the
// different types of recipients is available from the [`EnvelopeRecipients` resource
// page](../../EnvelopeRecipients) and from the [Developer
// Center](https://www.docusign.com/developer-center/explore/features/recipients) ### Tabs Tabs
// (also referred to as `tags` and as `fields` in the web sending user
// interface), can be defined in the `envelopeDefinition`, in templates, by transforming
// PDF Form Fields, or by using Composite Templates (see below). Defining tabs: the
// `inPersonSigner`, and `signer` recipient objects include a `tabs`
// field. It is an [`EnvelopeTabs` resource object](#/definitions/EnvelopeTabs). It
// includes arrays of the 24 different tab types available. See the [`EnvelopeTabs`
// resource](../../EnvelopeTabs) for more information. ## Using Templates Envelopes use specific
// people or groups as recipients. Templates can specify a role, eg `account_manager.`
// When a template is used in an envelope, the roles must be replaced with specific people or
// groups. When you create an envelope using a `templateId`, the different recipient
// type objects within the [`EnvelopeRecipients`
// object](#/definitions/EnvelopeRecipients) are used to assign recipients to the template's
// roles via the `roleName` property. The recipient objects can also override settings
// that were specified in the template, and set values for tab fields that were defined in the
// template. ### Message Lock When a template is added or applied to an envelope and the template
// has a locked email subject and message, that subject and message are used for the envelope and
// cannot be changed even if another locked template is subsequently added or applied to the
// envelope. The field `messageLock` is used to lock the email subject and message. If
// an email subject or message is entered before adding or applying a template with
// `messageLock` **true**, the email subject and message is overwritten with the locked
// email subject and message from the template. ## Envelope Status The status of sent envelopes
// can be determined through the DocuSign webhook system or by polling. Webhooks are highly
// recommended: they provide your application with the quickest updates when an envelope's
// status changes. DocuSign limits polling to once every 15 minutes or less frequently. When a
// webhook is used, DocuSign calls your application, via the URL you provide, with a notification
// XML message. See the [Webhook
// recipe](https://www.docusign.com/developer-center/recipes/webhook-status) for examples and live
// demos of using webhooks. ## Webhook Options The two webhook options, *eventNotification* and
// *Connect* use the same notification mechanism and message formats. eventNotification is used to
// create a webhook for a specific envelope sent via the API. Connect webhooks can be used for any
// envelope sent from an account, from any user, from any client. ### eventNotification Webhooks
// The Envelopes::create method includes an optional [eventNotification
// object](#definition-eventNotification) that adds a webhook to the envelope. eventNotification
// webhooks are available for all DocuSign accounts with API access. ### Connect Webhooks Connect
// can be used to create a webhook for all envelopes sent by all users in an account, either
// through the API or via other DocuSign clients (web, mobile, etc). Connect configurations are
// independent of specific envelopes. A Connect configuration includes a filter that may be used
// to limit the webhook to specific users, envelope statuses, etc. Connect configurations may be
// created and managed using the [ConnectConfigurations
// resource](../../Connect/ConnectConfigurations). Configurations can also be created and managed
// from the Administration tool accessed by selecting \"Go to Admin\" from the menu next
// to your picture on the DocuSign web app. See the Integrations/Connect section of the Admin
// tool. For repeatability, and to minimize support questions, creating Connect configurations via
// the API is recommended, especially for ISVs. Connect is available for some DocuSign account
// types. Please contact DocuSign Sales for more information. ## Composite Templates The
// Composite Templates feature, like [compositing in film
// production](https://en.wikipedia.org/wiki/Compositing), enables you to *overlay* document,
// recipient, and tab definitions from multiple sources, including PDF Form Field definitions,
// templates defined on the server, and more. Each Composite Template consists of optional
// elements: server templates, inline templates, PDF Metadata templates, and documents. * The
// Composite Template ID is an optional element used to identify the composite template. It is
// used as a reference when adding document object information via a multi-part HTTP message. If
// used, the document content-disposition must include the `compositeTemplateId` to
// which the document should be added. If `compositeTemplateId` is not specified in the
// content-disposition, the document is applied based on the `documentId` only. If no
// document object is specified, the composite template inherits the first document. * Server
// Templates are server-side templates stored on the DocuSign platform. If supplied, they are
// overlaid into the envelope in the order of their Sequence value. * Inline Templates provide a
// container to add documents, recipients, tabs, and custom fields. If inline templates are
// supplied, they are overlaid into the envelope in the order of their Sequence value. * Document
// objects are optional structures that provide a container to pass in a document or form. If this
// object is not included, the composite template inherits the *first* document it finds from a
// server template or inline template, starting with the lowest sequence value. PDF Form objects
// are only transformed from the document object. DocuSign does not derive PDF form properties
// from server templates or inline templates. To instruct DocuSign to transform fields from the
// PDF form, set `transformPdfFields` to \"true\" for the document. See the
// Transform PDF Fields section for more information about process. * PDF Metadata Templates
// provide a container to embed design-time template information into a PDF document. DocuSign
// uses this information when processing the Envelope. This convention allows the document to
// carry the signing instructions with it, so that less information needs to be provided at
// run-time through an inline template or synchronized with an external structure like a server
// template. PDF Metadata templates are stored in the Metadata layer of a PDF in accordance with
// Acrobat's XMP specification. DocuSign will only find PDF Metadata templates inside
// documents passed in the Document object (see below). If supplied, the PDF metadata template
// will be overlaid into the envelope in the order of its Sequence value. ### Compositing the
// definitions Each Composite Template adds a new document and templates overlay into the
// envelope. For each Composite Template these rules are applied: * Templates are overlaid in the
// order of their Sequence value. * If Document is not passed into the Composite Template's
// `document` field, the *first* template's document (based on the template's
// Sequence value) is used. * Last in wins in all cases except for the document (i.e. envelope
// information, recipient information, secure field information). There is no special casing. For
// example, if you want higher security on a tab, then that needs to be specified in a later
// template (by sequence number) then where the tab is included. If you want higher security on a
// role recipient, then it needs to be in a later template then where that role recipient is
// specified. * Recipient matching is based on Recipient Role and Routing Order. If there are
// matches, the recipient information is merged together. A final pass is done on all Composite
// Templates, after all template overlays have been applied, to collapse recipients with the same
// email, username and routing order. This prevents having the same recipients at the same routing
// order. * If you specify in a template that a recipient is locked, once that recipient is
// overlaid the recipient attributes can no longer be changed. The only items that can be changed
// for the recipient in this case are the email, username, access code and
// IDCheckInformationInput. * Tab matching is based on Tab Labels, Tab Types and Documents. If a
// Tab Label matches but the Document is not supplied, the Tab is overlaid for all the Documents.
// For example, if you have a simple inline template with only one tab in it with a label and a
// value, the Signature, Initial, Company, Envelope ID, User Name tabs will only be matched and
// collapsed if they fall in the exact same X and Y locations. * roleName and tabLabel matching
// is case sensitive. * The defaultRecipient field enables you to specify which recipient the
// generated tabs from a PDF form are mapped to. You can also set PDF form generated tabs to a
// recipient other than the DefaultRecipient by specifying the mapping of the tab label that is
// created to one of the template recipients. * You can use tabLabel wild carding to map a series
// of tabs from the PDF form. To use this you must end a tab label with \"\\*\" and then
// the system matches tabs that start with the label. * If no DefaultRecipient is specified, tabs
// must be explicitly mapped to recipients in order to be generated from the form. Unmapped form
// objects will not be generated into their DocuSign equivalents. (In the case of
// Signature/Initials, the tabs will be disregarded entirely; in the case of pdf text fields, the
// field data will be flattened on the Envelope document, but there will not be a corresponding
// DocuSign data tab.) ### Including the Document Content for Composite Templates Document
// content can be supplied inline, using the `documentBase64` or can be included in a
// multi-part HTTP message. If a multi-part message is used and there are multiple Composite
// Templates, the document content-disposition can include the `compositeTemplateId` to
// which the document should be added. Using the `compositeTemplateId` sets which
// documents are associated with particular composite templates. An example of this usage is:
// ``` --5cd3320a-5aac-4453-b3a4-cbb52a4cba5d Content-Type: application/pdf
// Content-Disposition: file; filename=\"eula.pdf\"; documentId=1;
// compositeTemplateId=\"1\" Content-Transfer-Encoding: base64
// ``` ### PDF Form Field Transformation Only the following PDF Form FieldTypes
// will be transformed to DocuSign tabs: CheckBox, DateTime, ListBox, Numeric, Password, Radio,
// Signature, and Text Field Properties that will be transformed: Read Only, Required, Max
// Length, Positions, and Initial Data. When transforming a *PDF Form Digital Signature Field,*
// the following rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be
// ------- | -------- DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or
// eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials
// DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials Any other PDF Form
// Digital Signature Field will be transformed to a DocuSign Signature tab When transforming *PDF
// Form Text Fields,* the following rules are used: If the PDF Field Name Contains | Then the
// DocuSign Tab Will be ------- | -------- DocuSignSignHere or eSignSignHere | Signature
// DocuSignSignHereOptional or eSignSignHereOptional | Optional Signature DocuSignInitialHere or
// eSignInitialHere | Initials DocuSignInitialHereOptional or eSignInitialHereOptional | Optional
// Initials DocuSignEnvelopeID or eSignEnvelopeID | EnvelopeID DocuSignCompany or eSignCompany |
// Company DocuSignDateSigned or eSignDateSigned | Date Signed DocuSignTitle or eSignTitle | Title
// DocuSignFullName or eSignFullName | Full Name DocuSignSignerAttachmentOptional or
// eSignSignerAttachmentOptional | Optional Signer Attachment Any other PDF Form Text Field will
// be transformed to a DocuSign data (text) tab. PDF Form Field Names that include
// \"DocuSignIgnoreTransform\" or \"eSignIgnoreTransform\" will not be
// transformed. PDF Form Date fields will be transformed to Date Signed fields if their name
// includes DocuSignDateSigned or eSignDateSigned. ## Template Email Subject Merge Fields This
// feature enables you to insert recipient name and email address merge fields into the email
// subject line when creating or sending from a template. The merge fields, based on the
// recipient's `roleName`, are added to the `emailSubject` when the
// template is created or when the template is used to create an envelope. After a template sender
// adds the name and email information for the recipient and sends the envelope, the recipient
// information is automatically merged into the appropriate fields in the email subject line.
// Both the sender and the recipients will see the information in the email subject line for any
// emails associated with the template. This provides an easy way for senders to organize their
// envelope emails without having to open an envelope to check the recipient. If merging the
// recipient information into the subject line causes the subject line to exceed 100 characters,
// then any characters over the 100 character limit are not included in the subject line. For
// cases where the recipient name or email is expected to be long, you should consider placing the
// merge field at the start of the email subject. * To add a recipient's name in the subject
// line add the following text in the `emailSubject` when creating the template or when
// sending an envelope from a template: [[<roleName>_UserName]] Example:
// `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this
// NDA\",` * To add a recipient's email address in the subject line add the
// following text in the emailSubject when creating the template or when sending an envelope from
// a template: [[<roleName>_Email]] Example:
// `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",`
// In both cases the <roleName> is the recipient's `roleName` in the template.
// For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is
// entering the name and email information for the recipient included in the email subject, then
// [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject. ##
// Branding an envelope The following rules are used to determine the `brandId` used in
// an envelope: * If a `brandId` is specified in the envelope/template and that brandId
// is available to the account, that brand is used in the envelope. * If more than one template is
// used in an envelope and more than one `brandId` is specified, the first
// `brandId` specified is used throughout the envelope. * In cases where no brand is
// specified and the sender belongs to a Group; if there is only one brand associated with the
// Group, then that brand is used in the envelope. Otherwise, the account's default signing
// brand is used. * For envelopes that do not meet any of the previous criteria, the account's
// default signing brand is used for the envelope. ## BCC Email address feature The BCC Email
// address feature is designed to provide a copy of all email communications for external
// archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive
// feature, including the BCC Email Override option, include additional signer authentication
// options. To send a copy of the envelope to a recipient who does not need to sign, don't use
// the BCC Email field. Use a Carbon Copy or Certified Delivery Recipient type. ## Merge
// Recipient Roles for Draft Envelopes When an envelope with multiple templates is sent, the
// recipients from the templates are merged according to the template roles, and empty recipients
// are removed. When creating an envelope with multiple templates, but not sending it (keeping it
// in a created state), duplicate recipients are not merged, which could cause leave duplicate
// recipients in the envelope. To prevent this, the query parameter
// `merge_roles_on_draft` should be added when posting a draft envelope
// (status=created) with multiple templates. Doing this will merge template roles and remove
// empty recipients. ###### Note: DocuSign recommends that the `merge_roles_on_draft`
// query parameter be used anytime you are creating an envelope with multiple templates and
// keeping it in draft (created) status.
///
/** CreateEnvelopeOptions Class. */
public class CreateEnvelopeOptions {
private String cdseMode = null;
private String changeRoutingOrder = null;
private String completedDocumentsOnly = null;
private String mergeRolesOnDraft = null;
private String tabLabelExactMatches = null;
/** setCdseMode method. */
public void setCdseMode(String cdseMode) {
this.cdseMode = cdseMode;
}
/**
* getCdseMode method.
*
* @return String
*/
public String getCdseMode() {
return this.cdseMode;
}
/** setChangeRoutingOrder method. */
public void setChangeRoutingOrder(String changeRoutingOrder) {
this.changeRoutingOrder = changeRoutingOrder;
}
/**
* getChangeRoutingOrder method.
*
* @return String
*/
public String getChangeRoutingOrder() {
return this.changeRoutingOrder;
}
/** setCompletedDocumentsOnly method. */
public void setCompletedDocumentsOnly(String completedDocumentsOnly) {
this.completedDocumentsOnly = completedDocumentsOnly;
}
/**
* getCompletedDocumentsOnly method.
*
* @return String
*/
public String getCompletedDocumentsOnly() {
return this.completedDocumentsOnly;
}
/** setMergeRolesOnDraft method. */
public void setMergeRolesOnDraft(String mergeRolesOnDraft) {
this.mergeRolesOnDraft = mergeRolesOnDraft;
}
/**
* getMergeRolesOnDraft method.
*
* @return String
*/
public String getMergeRolesOnDraft() {
return this.mergeRolesOnDraft;
}
/** setTabLabelExactMatches method. */
public void setTabLabelExactMatches(String tabLabelExactMatches) {
this.tabLabelExactMatches = tabLabelExactMatches;
}
/**
* getTabLabelExactMatches method.
*
* @return String
*/
public String getTabLabelExactMatches() {
return this.tabLabelExactMatches;
}
}
/**
* Creates an envelope.. Creates an envelope. Using this function you can: * Create an envelope
* and send it. * Create an envelope from an existing template and send it. In either case, you
* can choose to save the envelope as a draft envelope instead of sending it by setting the
* request's `status` property to `created` instead of `sent`.
* ## Sending Envelopes Documents can be included with the Envelopes::create call itself or a
* template can include documents. Documents can be added by using a multi-part/form request or by
* using the `documentBase64` field of the [`document`
* object](#/definitions/document) ### Recipient Types An [`envelopeDefinition`
* object](#/definitions/envelopeDefinition) is used as the method's body. Envelope recipients
* can be defined in the envelope or in templates. The `envelopeDefinition` object's
* `recipients` field is an [`EnvelopeRecipients` resource
* object](#/definitions/EnvelopeRecipients). It includes arrays of the seven types of recipients
* defined by DocuSign: Recipient type | Object definition -------------- | -----------------
* agent (can add name and email information for later recipients/signers) |
* [`agent`](#/definitions/agent) carbon copy (receives a copy of the documents) |
* [`carbonCopy`](#/definitions/carbonCopy) certified delivery (receives a copy of the
* documents and must acknowledge receipt) |
* [`certifiedDelivery`](#/definitions/certifiedDelivery) editor (can change recipients
* and document fields for later recipients/signers) | [`editor`](#/definitions/editor)
* in-person signer (\"hosts\" someone who signs in-person) |
* [`inPersonSigner`](#/definitions/inPersonSigner) intermediary (can add name and email
* information for some later recipients/signers.) |
* [`intermediary`](#/definitions/intermediary) signer (signs and/or updates document
* fields) | [`signer`](#/definitions/signer) Additional information about the different
* types of recipients is available from the [`EnvelopeRecipients` resource
* page](../../EnvelopeRecipients) and from the [Developer
* Center](https://www.docusign.com/developer-center/explore/features/recipients) ### Tabs Tabs
* (also referred to as `tags` and as `fields` in the web sending user
* interface), can be defined in the `envelopeDefinition`, in templates, by transforming
* PDF Form Fields, or by using Composite Templates (see below). Defining tabs: the
* `inPersonSigner`, and `signer` recipient objects include a `tabs`
* field. It is an [`EnvelopeTabs` resource object](#/definitions/EnvelopeTabs). It
* includes arrays of the 24 different tab types available. See the [`EnvelopeTabs`
* resource](../../EnvelopeTabs) for more information. ## Using Templates Envelopes use specific
* people or groups as recipients. Templates can specify a role, eg `account_manager.`
* When a template is used in an envelope, the roles must be replaced with specific people or
* groups. When you create an envelope using a `templateId`, the different recipient
* type objects within the [`EnvelopeRecipients`
* object](#/definitions/EnvelopeRecipients) are used to assign recipients to the template's
* roles via the `roleName` property. The recipient objects can also override settings
* that were specified in the template, and set values for tab fields that were defined in the
* template. ### Message Lock When a template is added or applied to an envelope and the template
* has a locked email subject and message, that subject and message are used for the envelope and
* cannot be changed even if another locked template is subsequently added or applied to the
* envelope. The field `messageLock` is used to lock the email subject and message. If
* an email subject or message is entered before adding or applying a template with
* `messageLock` **true**, the email subject and message is overwritten with the locked
* email subject and message from the template. ## Envelope Status The status of sent envelopes
* can be determined through the DocuSign webhook system or by polling. Webhooks are highly
* recommended: they provide your application with the quickest updates when an envelope's
* status changes. DocuSign limits polling to once every 15 minutes or less frequently. When a
* webhook is used, DocuSign calls your application, via the URL you provide, with a notification
* XML message. See the [Webhook
* recipe](https://www.docusign.com/developer-center/recipes/webhook-status) for examples and live
* demos of using webhooks. ## Webhook Options The two webhook options, *eventNotification* and
* *Connect* use the same notification mechanism and message formats. eventNotification is used to
* create a webhook for a specific envelope sent via the API. Connect webhooks can be used for any
* envelope sent from an account, from any user, from any client. ### eventNotification Webhooks
* The Envelopes::create method includes an optional [eventNotification
* object](#definition-eventNotification) that adds a webhook to the envelope. eventNotification
* webhooks are available for all DocuSign accounts with API access. ### Connect Webhooks Connect
* can be used to create a webhook for all envelopes sent by all users in an account, either
* through the API or via other DocuSign clients (web, mobile, etc). Connect configurations are
* independent of specific envelopes. A Connect configuration includes a filter that may be used
* to limit the webhook to specific users, envelope statuses, etc. Connect configurations may be
* created and managed using the [ConnectConfigurations
* resource](../../Connect/ConnectConfigurations). Configurations can also be created and managed
* from the Administration tool accessed by selecting \"Go to Admin\" from the menu next
* to your picture on the DocuSign web app. See the Integrations/Connect section of the Admin
* tool. For repeatability, and to minimize support questions, creating Connect configurations via
* the API is recommended, especially for ISVs. Connect is available for some DocuSign account
* types. Please contact DocuSign Sales for more information. ## Composite Templates The Composite
* Templates feature, like [compositing in film
* production](https://en.wikipedia.org/wiki/Compositing), enables you to *overlay* document,
* recipient, and tab definitions from multiple sources, including PDF Form Field definitions,
* templates defined on the server, and more. Each Composite Template consists of optional
* elements: server templates, inline templates, PDF Metadata templates, and documents. * The
* Composite Template ID is an optional element used to identify the composite template. It is
* used as a reference when adding document object information via a multi-part HTTP message. If
* used, the document content-disposition must include the `compositeTemplateId` to
* which the document should be added. If `compositeTemplateId` is not specified in the
* content-disposition, the document is applied based on the `documentId` only. If no
* document object is specified, the composite template inherits the first document. * Server
* Templates are server-side templates stored on the DocuSign platform. If supplied, they are
* overlaid into the envelope in the order of their Sequence value. * Inline Templates provide a
* container to add documents, recipients, tabs, and custom fields. If inline templates are
* supplied, they are overlaid into the envelope in the order of their Sequence value. * Document
* objects are optional structures that provide a container to pass in a document or form. If this
* object is not included, the composite template inherits the *first* document it finds from a
* server template or inline template, starting with the lowest sequence value. PDF Form objects
* are only transformed from the document object. DocuSign does not derive PDF form properties
* from server templates or inline templates. To instruct DocuSign to transform fields from the
* PDF form, set `transformPdfFields` to \"true\" for the document. See the
* Transform PDF Fields section for more information about process. * PDF Metadata Templates
* provide a container to embed design-time template information into a PDF document. DocuSign
* uses this information when processing the Envelope. This convention allows the document to
* carry the signing instructions with it, so that less information needs to be provided at
* run-time through an inline template or synchronized with an external structure like a server
* template. PDF Metadata templates are stored in the Metadata layer of a PDF in accordance with
* Acrobat's XMP specification. DocuSign will only find PDF Metadata templates inside
* documents passed in the Document object (see below). If supplied, the PDF metadata template
* will be overlaid into the envelope in the order of its Sequence value. ### Compositing the
* definitions Each Composite Template adds a new document and templates overlay into the
* envelope. For each Composite Template these rules are applied: * Templates are overlaid in the
* order of their Sequence value. * If Document is not passed into the Composite Template's
* `document` field, the *first* template's document (based on the template's
* Sequence value) is used. * Last in wins in all cases except for the document (i.e. envelope
* information, recipient information, secure field information). There is no special casing. For
* example, if you want higher security on a tab, then that needs to be specified in a later
* template (by sequence number) then where the tab is included. If you want higher security on a
* role recipient, then it needs to be in a later template then where that role recipient is
* specified. * Recipient matching is based on Recipient Role and Routing Order. If there are
* matches, the recipient information is merged together. A final pass is done on all Composite
* Templates, after all template overlays have been applied, to collapse recipients with the same
* email, username and routing order. This prevents having the same recipients at the same routing
* order. * If you specify in a template that a recipient is locked, once that recipient is
* overlaid the recipient attributes can no longer be changed. The only items that can be changed
* for the recipient in this case are the email, username, access code and
* IDCheckInformationInput. * Tab matching is based on Tab Labels, Tab Types and Documents. If a
* Tab Label matches but the Document is not supplied, the Tab is overlaid for all the Documents.
* For example, if you have a simple inline template with only one tab in it with a label and a
* value, the Signature, Initial, Company, Envelope ID, User Name tabs will only be matched and
* collapsed if they fall in the exact same X and Y locations. * roleName and tabLabel matching is
* case sensitive. * The defaultRecipient field enables you to specify which recipient the
* generated tabs from a PDF form are mapped to. You can also set PDF form generated tabs to a
* recipient other than the DefaultRecipient by specifying the mapping of the tab label that is
* created to one of the template recipients. * You can use tabLabel wild carding to map a series
* of tabs from the PDF form. To use this you must end a tab label with \"\\*\" and then
* the system matches tabs that start with the label. * If no DefaultRecipient is specified, tabs
* must be explicitly mapped to recipients in order to be generated from the form. Unmapped form
* objects will not be generated into their DocuSign equivalents. (In the case of
* Signature/Initials, the tabs will be disregarded entirely; in the case of pdf text fields, the
* field data will be flattened on the Envelope document, but there will not be a corresponding
* DocuSign data tab.) ### Including the Document Content for Composite Templates Document content
* can be supplied inline, using the `documentBase64` or can be included in a multi-part
* HTTP message. If a multi-part message is used and there are multiple Composite Templates, the
* document content-disposition can include the `compositeTemplateId` to which the
* document should be added. Using the `compositeTemplateId` sets which documents are
* associated with particular composite templates. An example of this usage is: ```
* --5cd3320a-5aac-4453-b3a4-cbb52a4cba5d Content-Type: application/pdf Content-Disposition: file;
* filename=\"eula.pdf\"; documentId=1;
* compositeTemplateId=\"1\" Content-Transfer-Encoding: base64 ```
* ### PDF Form Field Transformation Only the following PDF Form FieldTypes will be transformed to
* DocuSign tabs: CheckBox, DateTime, ListBox, Numeric, Password, Radio, Signature, and Text Field
* Properties that will be transformed: Read Only, Required, Max Length, Positions, and Initial
* Data. When transforming a *PDF Form Digital Signature Field,* the following rules are used: If
* the PDF Field Name Contains | Then the DocuSign Tab Will be ------- | -------- DocuSignSignHere
* or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional
* Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or
* eSignInitialHereOptional | Optional Initials Any other PDF Form Digital Signature Field will be
* transformed to a DocuSign Signature tab When transforming *PDF Form Text Fields,* the following
* rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be ------- |
* -------- DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or
* eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials
* DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials DocuSignEnvelopeID
* or eSignEnvelopeID | EnvelopeID DocuSignCompany or eSignCompany | Company DocuSignDateSigned or
* eSignDateSigned | Date Signed DocuSignTitle or eSignTitle | Title DocuSignFullName or
* eSignFullName | Full Name DocuSignSignerAttachmentOptional or eSignSignerAttachmentOptional |
* Optional Signer Attachment Any other PDF Form Text Field will be transformed to a DocuSign data
* (text) tab. PDF Form Field Names that include \"DocuSignIgnoreTransform\" or
* \"eSignIgnoreTransform\" will not be transformed. PDF Form Date fields will be
* transformed to Date Signed fields if their name includes DocuSignDateSigned or eSignDateSigned.
* ## Template Email Subject Merge Fields This feature enables you to insert recipient name and
* email address merge fields into the email subject line when creating or sending from a
* template. The merge fields, based on the recipient's `roleName`, are added to the
* `emailSubject` when the template is created or when the template is used to create an
* envelope. After a template sender adds the name and email information for the recipient and
* sends the envelope, the recipient information is automatically merged into the appropriate
* fields in the email subject line. Both the sender and the recipients will see the information
* in the email subject line for any emails associated with the template. This provides an easy
* way for senders to organize their envelope emails without having to open an envelope to check
* the recipient. If merging the recipient information into the subject line causes the subject
* line to exceed 100 characters, then any characters over the 100 character limit are not
* included in the subject line. For cases where the recipient name or email is expected to be
* long, you should consider placing the merge field at the start of the email subject. * To add a
* recipient's name in the subject line add the following text in the `emailSubject`
* when creating the template or when sending an envelope from a template:
* [[<roleName>_UserName]] Example: `\"emailSubject\":\"[[Signer
* 1_UserName]], Please sign this NDA\",` * To add a recipient's email address in
* the subject line add the following text in the emailSubject when creating the template or when
* sending an envelope from a template: [[<roleName>_Email]] Example:
* `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",`
* In both cases the <roleName> is the recipient's `roleName` in the template.
* For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is
* entering the name and email information for the recipient included in the email subject, then
* [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject. ##
* Branding an envelope The following rules are used to determine the `brandId` used in
* an envelope: * If a `brandId` is specified in the envelope/template and that brandId
* is available to the account, that brand is used in the envelope. * If more than one template is
* used in an envelope and more than one `brandId` is specified, the first
* `brandId` specified is used throughout the envelope. * In cases where no brand is
* specified and the sender belongs to a Group; if there is only one brand associated with the
* Group, then that brand is used in the envelope. Otherwise, the account's default signing
* brand is used. * For envelopes that do not meet any of the previous criteria, the account's
* default signing brand is used for the envelope. ## BCC Email address feature The BCC Email
* address feature is designed to provide a copy of all email communications for external
* archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive
* feature, including the BCC Email Override option, include additional signer authentication
* options. To send a copy of the envelope to a recipient who does not need to sign, don't use
* the BCC Email field. Use a Carbon Copy or Certified Delivery Recipient type. ## Merge Recipient
* Roles for Draft Envelopes When an envelope with multiple templates is sent, the recipients from
* the templates are merged according to the template roles, and empty recipients are removed.
* When creating an envelope with multiple templates, but not sending it (keeping it in a created
* state), duplicate recipients are not merged, which could cause leave duplicate recipients in
* the envelope. To prevent this, the query parameter `merge_roles_on_draft` should be
* added when posting a draft envelope (status=created) with multiple templates. Doing this
* will merge template roles and remove empty recipients. ###### Note: DocuSign recommends that
* the `merge_roles_on_draft` query parameter be used anytime you are creating an
* envelope with multiple templates and keeping it in draft (created) status.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeDefinition (optional)
* @return EnvelopeSummary
*/
public EnvelopeSummary createEnvelope(String accountId, EnvelopeDefinition envelopeDefinition)
throws ApiException {
return createEnvelope(accountId, envelopeDefinition, null);
}
/**
* Creates an envelope.. Creates an envelope. Using this function you can: * Create an envelope
* and send it. * Create an envelope from an existing template and send it. In either case, you
* can choose to save the envelope as a draft envelope instead of sending it by setting the
* request's `status` property to `created` instead of `sent`.
* ## Sending Envelopes Documents can be included with the Envelopes::create call itself or a
* template can include documents. Documents can be added by using a multi-part/form request or by
* using the `documentBase64` field of the [`document`
* object](#/definitions/document) ### Recipient Types An [`envelopeDefinition`
* object](#/definitions/envelopeDefinition) is used as the method's body. Envelope recipients
* can be defined in the envelope or in templates. The `envelopeDefinition` object's
* `recipients` field is an [`EnvelopeRecipients` resource
* object](#/definitions/EnvelopeRecipients). It includes arrays of the seven types of recipients
* defined by DocuSign: Recipient type | Object definition -------------- | -----------------
* agent (can add name and email information for later recipients/signers) |
* [`agent`](#/definitions/agent) carbon copy (receives a copy of the documents) |
* [`carbonCopy`](#/definitions/carbonCopy) certified delivery (receives a copy of the
* documents and must acknowledge receipt) |
* [`certifiedDelivery`](#/definitions/certifiedDelivery) editor (can change recipients
* and document fields for later recipients/signers) | [`editor`](#/definitions/editor)
* in-person signer (\"hosts\" someone who signs in-person) |
* [`inPersonSigner`](#/definitions/inPersonSigner) intermediary (can add name and email
* information for some later recipients/signers.) |
* [`intermediary`](#/definitions/intermediary) signer (signs and/or updates document
* fields) | [`signer`](#/definitions/signer) Additional information about the different
* types of recipients is available from the [`EnvelopeRecipients` resource
* page](../../EnvelopeRecipients) and from the [Developer
* Center](https://www.docusign.com/developer-center/explore/features/recipients) ### Tabs Tabs
* (also referred to as `tags` and as `fields` in the web sending user
* interface), can be defined in the `envelopeDefinition`, in templates, by transforming
* PDF Form Fields, or by using Composite Templates (see below). Defining tabs: the
* `inPersonSigner`, and `signer` recipient objects include a `tabs`
* field. It is an [`EnvelopeTabs` resource object](#/definitions/EnvelopeTabs). It
* includes arrays of the 24 different tab types available. See the [`EnvelopeTabs`
* resource](../../EnvelopeTabs) for more information. ## Using Templates Envelopes use specific
* people or groups as recipients. Templates can specify a role, eg `account_manager.`
* When a template is used in an envelope, the roles must be replaced with specific people or
* groups. When you create an envelope using a `templateId`, the different recipient
* type objects within the [`EnvelopeRecipients`
* object](#/definitions/EnvelopeRecipients) are used to assign recipients to the template's
* roles via the `roleName` property. The recipient objects can also override settings
* that were specified in the template, and set values for tab fields that were defined in the
* template. ### Message Lock When a template is added or applied to an envelope and the template
* has a locked email subject and message, that subject and message are used for the envelope and
* cannot be changed even if another locked template is subsequently added or applied to the
* envelope. The field `messageLock` is used to lock the email subject and message. If
* an email subject or message is entered before adding or applying a template with
* `messageLock` **true**, the email subject and message is overwritten with the locked
* email subject and message from the template. ## Envelope Status The status of sent envelopes
* can be determined through the DocuSign webhook system or by polling. Webhooks are highly
* recommended: they provide your application with the quickest updates when an envelope's
* status changes. DocuSign limits polling to once every 15 minutes or less frequently. When a
* webhook is used, DocuSign calls your application, via the URL you provide, with a notification
* XML message. See the [Webhook
* recipe](https://www.docusign.com/developer-center/recipes/webhook-status) for examples and live
* demos of using webhooks. ## Webhook Options The two webhook options, *eventNotification* and
* *Connect* use the same notification mechanism and message formats. eventNotification is used to
* create a webhook for a specific envelope sent via the API. Connect webhooks can be used for any
* envelope sent from an account, from any user, from any client. ### eventNotification Webhooks
* The Envelopes::create method includes an optional [eventNotification
* object](#definition-eventNotification) that adds a webhook to the envelope. eventNotification
* webhooks are available for all DocuSign accounts with API access. ### Connect Webhooks Connect
* can be used to create a webhook for all envelopes sent by all users in an account, either
* through the API or via other DocuSign clients (web, mobile, etc). Connect configurations are
* independent of specific envelopes. A Connect configuration includes a filter that may be used
* to limit the webhook to specific users, envelope statuses, etc. Connect configurations may be
* created and managed using the [ConnectConfigurations
* resource](../../Connect/ConnectConfigurations). Configurations can also be created and managed
* from the Administration tool accessed by selecting \"Go to Admin\" from the menu next
* to your picture on the DocuSign web app. See the Integrations/Connect section of the Admin
* tool. For repeatability, and to minimize support questions, creating Connect configurations via
* the API is recommended, especially for ISVs. Connect is available for some DocuSign account
* types. Please contact DocuSign Sales for more information. ## Composite Templates The Composite
* Templates feature, like [compositing in film
* production](https://en.wikipedia.org/wiki/Compositing), enables you to *overlay* document,
* recipient, and tab definitions from multiple sources, including PDF Form Field definitions,
* templates defined on the server, and more. Each Composite Template consists of optional
* elements: server templates, inline templates, PDF Metadata templates, and documents. * The
* Composite Template ID is an optional element used to identify the composite template. It is
* used as a reference when adding document object information via a multi-part HTTP message. If
* used, the document content-disposition must include the `compositeTemplateId` to
* which the document should be added. If `compositeTemplateId` is not specified in the
* content-disposition, the document is applied based on the `documentId` only. If no
* document object is specified, the composite template inherits the first document. * Server
* Templates are server-side templates stored on the DocuSign platform. If supplied, they are
* overlaid into the envelope in the order of their Sequence value. * Inline Templates provide a
* container to add documents, recipients, tabs, and custom fields. If inline templates are
* supplied, they are overlaid into the envelope in the order of their Sequence value. * Document
* objects are optional structures that provide a container to pass in a document or form. If this
* object is not included, the composite template inherits the *first* document it finds from a
* server template or inline template, starting with the lowest sequence value. PDF Form objects
* are only transformed from the document object. DocuSign does not derive PDF form properties
* from server templates or inline templates. To instruct DocuSign to transform fields from the
* PDF form, set `transformPdfFields` to \"true\" for the document. See the
* Transform PDF Fields section for more information about process. * PDF Metadata Templates
* provide a container to embed design-time template information into a PDF document. DocuSign
* uses this information when processing the Envelope. This convention allows the document to
* carry the signing instructions with it, so that less information needs to be provided at
* run-time through an inline template or synchronized with an external structure like a server
* template. PDF Metadata templates are stored in the Metadata layer of a PDF in accordance with
* Acrobat's XMP specification. DocuSign will only find PDF Metadata templates inside
* documents passed in the Document object (see below). If supplied, the PDF metadata template
* will be overlaid into the envelope in the order of its Sequence value. ### Compositing the
* definitions Each Composite Template adds a new document and templates overlay into the
* envelope. For each Composite Template these rules are applied: * Templates are overlaid in the
* order of their Sequence value. * If Document is not passed into the Composite Template's
* `document` field, the *first* template's document (based on the template's
* Sequence value) is used. * Last in wins in all cases except for the document (i.e. envelope
* information, recipient information, secure field information). There is no special casing. For
* example, if you want higher security on a tab, then that needs to be specified in a later
* template (by sequence number) then where the tab is included. If you want higher security on a
* role recipient, then it needs to be in a later template then where that role recipient is
* specified. * Recipient matching is based on Recipient Role and Routing Order. If there are
* matches, the recipient information is merged together. A final pass is done on all Composite
* Templates, after all template overlays have been applied, to collapse recipients with the same
* email, username and routing order. This prevents having the same recipients at the same routing
* order. * If you specify in a template that a recipient is locked, once that recipient is
* overlaid the recipient attributes can no longer be changed. The only items that can be changed
* for the recipient in this case are the email, username, access code and
* IDCheckInformationInput. * Tab matching is based on Tab Labels, Tab Types and Documents. If a
* Tab Label matches but the Document is not supplied, the Tab is overlaid for all the Documents.
* For example, if you have a simple inline template with only one tab in it with a label and a
* value, the Signature, Initial, Company, Envelope ID, User Name tabs will only be matched and
* collapsed if they fall in the exact same X and Y locations. * roleName and tabLabel matching is
* case sensitive. * The defaultRecipient field enables you to specify which recipient the
* generated tabs from a PDF form are mapped to. You can also set PDF form generated tabs to a
* recipient other than the DefaultRecipient by specifying the mapping of the tab label that is
* created to one of the template recipients. * You can use tabLabel wild carding to map a series
* of tabs from the PDF form. To use this you must end a tab label with \"\\*\" and then
* the system matches tabs that start with the label. * If no DefaultRecipient is specified, tabs
* must be explicitly mapped to recipients in order to be generated from the form. Unmapped form
* objects will not be generated into their DocuSign equivalents. (In the case of
* Signature/Initials, the tabs will be disregarded entirely; in the case of pdf text fields, the
* field data will be flattened on the Envelope document, but there will not be a corresponding
* DocuSign data tab.) ### Including the Document Content for Composite Templates Document content
* can be supplied inline, using the `documentBase64` or can be included in a multi-part
* HTTP message. If a multi-part message is used and there are multiple Composite Templates, the
* document content-disposition can include the `compositeTemplateId` to which the
* document should be added. Using the `compositeTemplateId` sets which documents are
* associated with particular composite templates. An example of this usage is: ```
* --5cd3320a-5aac-4453-b3a4-cbb52a4cba5d Content-Type: application/pdf Content-Disposition: file;
* filename=\"eula.pdf\"; documentId=1;
* compositeTemplateId=\"1\" Content-Transfer-Encoding: base64 ```
* ### PDF Form Field Transformation Only the following PDF Form FieldTypes will be transformed to
* DocuSign tabs: CheckBox, DateTime, ListBox, Numeric, Password, Radio, Signature, and Text Field
* Properties that will be transformed: Read Only, Required, Max Length, Positions, and Initial
* Data. When transforming a *PDF Form Digital Signature Field,* the following rules are used: If
* the PDF Field Name Contains | Then the DocuSign Tab Will be ------- | -------- DocuSignSignHere
* or eSignSignHere | Signature DocuSignSignHereOptional or eSignSignHereOptional | Optional
* Signature DocuSignInitialHere or eSignInitialHere | Initials DocuSignInitialHereOptional or
* eSignInitialHereOptional | Optional Initials Any other PDF Form Digital Signature Field will be
* transformed to a DocuSign Signature tab When transforming *PDF Form Text Fields,* the following
* rules are used: If the PDF Field Name Contains | Then the DocuSign Tab Will be ------- |
* -------- DocuSignSignHere or eSignSignHere | Signature DocuSignSignHereOptional or
* eSignSignHereOptional | Optional Signature DocuSignInitialHere or eSignInitialHere | Initials
* DocuSignInitialHereOptional or eSignInitialHereOptional | Optional Initials DocuSignEnvelopeID
* or eSignEnvelopeID | EnvelopeID DocuSignCompany or eSignCompany | Company DocuSignDateSigned or
* eSignDateSigned | Date Signed DocuSignTitle or eSignTitle | Title DocuSignFullName or
* eSignFullName | Full Name DocuSignSignerAttachmentOptional or eSignSignerAttachmentOptional |
* Optional Signer Attachment Any other PDF Form Text Field will be transformed to a DocuSign data
* (text) tab. PDF Form Field Names that include \"DocuSignIgnoreTransform\" or
* \"eSignIgnoreTransform\" will not be transformed. PDF Form Date fields will be
* transformed to Date Signed fields if their name includes DocuSignDateSigned or eSignDateSigned.
* ## Template Email Subject Merge Fields This feature enables you to insert recipient name and
* email address merge fields into the email subject line when creating or sending from a
* template. The merge fields, based on the recipient's `roleName`, are added to the
* `emailSubject` when the template is created or when the template is used to create an
* envelope. After a template sender adds the name and email information for the recipient and
* sends the envelope, the recipient information is automatically merged into the appropriate
* fields in the email subject line. Both the sender and the recipients will see the information
* in the email subject line for any emails associated with the template. This provides an easy
* way for senders to organize their envelope emails without having to open an envelope to check
* the recipient. If merging the recipient information into the subject line causes the subject
* line to exceed 100 characters, then any characters over the 100 character limit are not
* included in the subject line. For cases where the recipient name or email is expected to be
* long, you should consider placing the merge field at the start of the email subject. * To add a
* recipient's name in the subject line add the following text in the `emailSubject`
* when creating the template or when sending an envelope from a template:
* [[<roleName>_UserName]] Example: `\"emailSubject\":\"[[Signer
* 1_UserName]], Please sign this NDA\",` * To add a recipient's email address in
* the subject line add the following text in the emailSubject when creating the template or when
* sending an envelope from a template: [[<roleName>_Email]] Example:
* `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",`
* In both cases the <roleName> is the recipient's `roleName` in the template.
* For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is
* entering the name and email information for the recipient included in the email subject, then
* [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject. ##
* Branding an envelope The following rules are used to determine the `brandId` used in
* an envelope: * If a `brandId` is specified in the envelope/template and that brandId
* is available to the account, that brand is used in the envelope. * If more than one template is
* used in an envelope and more than one `brandId` is specified, the first
* `brandId` specified is used throughout the envelope. * In cases where no brand is
* specified and the sender belongs to a Group; if there is only one brand associated with the
* Group, then that brand is used in the envelope. Otherwise, the account's default signing
* brand is used. * For envelopes that do not meet any of the previous criteria, the account's
* default signing brand is used for the envelope. ## BCC Email address feature The BCC Email
* address feature is designed to provide a copy of all email communications for external
* archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive
* feature, including the BCC Email Override option, include additional signer authentication
* options. To send a copy of the envelope to a recipient who does not need to sign, don't use
* the BCC Email field. Use a Carbon Copy or Certified Delivery Recipient type. ## Merge Recipient
* Roles for Draft Envelopes When an envelope with multiple templates is sent, the recipients from
* the templates are merged according to the template roles, and empty recipients are removed.
* When creating an envelope with multiple templates, but not sending it (keeping it in a created
* state), duplicate recipients are not merged, which could cause leave duplicate recipients in
* the envelope. To prevent this, the query parameter `merge_roles_on_draft` should be
* added when posting a draft envelope (status=created) with multiple templates. Doing this
* will merge template roles and remove empty recipients. ###### Note: DocuSign recommends that
* the `merge_roles_on_draft` query parameter be used anytime you are creating an
* envelope with multiple templates and keeping it in draft (created) status.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeDefinition (optional)
* @param options for modifying the method behavior.
* @return EnvelopeSummary
* @throws ApiException if fails to make API call
*/
public EnvelopeSummary createEnvelope(
String accountId,
EnvelopeDefinition envelopeDefinition,
EnvelopesApi.CreateEnvelopeOptions options)
throws ApiException {
Object localVarPostBody = envelopeDefinition;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createEnvelope");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPair("cdse_mode", options.cdseMode));
}
if (options != null) {
localVarQueryParams.addAll(
apiClient.parameterToPair("change_routing_order", options.changeRoutingOrder));
}
if (options != null) {
localVarQueryParams.addAll(
apiClient.parameterToPair("completed_documents_only", options.completedDocumentsOnly));
}
if (options != null) {
localVarQueryParams.addAll(
apiClient.parameterToPair("merge_roles_on_draft", options.mergeRolesOnDraft));
}
if (options != null) {
localVarQueryParams.addAll(
apiClient.parameterToPair("tab_label_exact_matches", options.tabLabelExactMatches));
}
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Posts a list of comments for authorized user.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param commentsPublish (optional)
* @return CommentHistoryResult
* @throws ApiException if fails to make API call
*/
public CommentHistoryResult createEnvelopeComments(
String accountId, String envelopeId, CommentsPublish commentsPublish) throws ApiException {
Object localVarPostBody = commentsPublish;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createEnvelopeComments");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400, "Missing the required parameter 'envelopeId' when calling createEnvelopeComments");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/comments"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll(
"\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType =
new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Provides a URL to start a recipient view of the Envelope UI.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param recipientPreviewRequest (optional)
* @return ViewUrl
* @throws ApiException if fails to make API call
*/
public ViewUrl createEnvelopeRecipientPreview(
String accountId, String envelopeId, RecipientPreviewRequest recipientPreviewRequest)
throws ApiException {
Object localVarPostBody = recipientPreviewRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400,
"Missing the required parameter 'accountId' when calling createEnvelopeRecipientPreview");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400,
"Missing the required parameter 'envelopeId' when calling createEnvelopeRecipientPreview");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient_preview"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll(
"\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Provides a URL to start a shared recipient view of the Envelope UI.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param recipientViewRequest (optional)
* @return ViewUrl
* @throws ApiException if fails to make API call
*/
public ViewUrl createEnvelopeRecipientSharedView(
String accountId, String envelopeId, RecipientViewRequest recipientViewRequest)
throws ApiException {
Object localVarPostBody = recipientViewRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400,
"Missing the required parameter 'accountId' when calling createEnvelopeRecipientSharedView");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400,
"Missing the required parameter 'envelopeId' when calling createEnvelopeRecipientSharedView");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/shared"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll(
"\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Add envelope transfer rules to an account..
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeTransferRuleRequest (optional)
* @return EnvelopeTransferRuleInformation
* @throws ApiException if fails to make API call
*/
public EnvelopeTransferRuleInformation createEnvelopeTransferRules(
String accountId, EnvelopeTransferRuleRequest envelopeTransferRuleRequest)
throws ApiException {
Object localVarPostBody = envelopeTransferRuleRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400,
"Missing the required parameter 'accountId' when calling createEnvelopeTransferRules");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/transfer_rules"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType =
new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Lock an envelope.. Locks the specified envelope, and sets the time until the lock expires, to
* prevent other users or recipients from accessing and changing the envelope. ###### Note: Users
* must have envelope locking capability enabled to use this function (userSetting
* `canLockEnvelopes` must be set to true for the user).
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param lockRequest (optional)
* @return LockInformation
* @throws ApiException if fails to make API call
*/
public LockInformation createLock(String accountId, String envelopeId, LockRequest lockRequest)
throws ApiException {
Object localVarPostBody = lockRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createLock");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400, "Missing the required parameter 'envelopeId' when calling createLock");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll(
"\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
///
/// Adds one or more recipients to an envelope. Adds one or more recipients to an envelope. For
// an in process envelope, one that has been sent and has not been completed or voided, an email
// is sent to a new recipient when they are reached in the routing order. If the new
// recipient's routing order is before or the same as the envelope's next recipient, an
// email is only sent if the optional `resend_envelope` query string is set to **true**.
///
/** CreateRecipientOptions Class. */
public class CreateRecipientOptions {
private String resendEnvelope = null;
/** setResendEnvelope method. */
public void setResendEnvelope(String resendEnvelope) {
this.resendEnvelope = resendEnvelope;
}
/**
* getResendEnvelope method.
*
* @return String
*/
public String getResendEnvelope() {
return this.resendEnvelope;
}
}
/**
* Adds one or more recipients to an envelope.. Adds one or more recipients to an envelope. For an
* in process envelope, one that has been sent and has not been completed or voided, an email is
* sent to a new recipient when they are reached in the routing order. If the new recipient's
* routing order is before or the same as the envelope's next recipient, an email is only sent
* if the optional `resend_envelope` query string is set to **true**.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param recipients (optional)
* @return Recipients
*/
public Recipients createRecipient(String accountId, String envelopeId, Recipients recipients)
throws ApiException {
return createRecipient(accountId, envelopeId, recipients, null);
}
/**
* Adds one or more recipients to an envelope.. Adds one or more recipients to an envelope. For an
* in process envelope, one that has been sent and has not been completed or voided, an email is
* sent to a new recipient when they are reached in the routing order. If the new recipient's
* routing order is before or the same as the envelope's next recipient, an email is only sent
* if the optional `resend_envelope` query string is set to **true**.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param recipients (optional)
* @param options for modifying the method behavior.
* @return Recipients
* @throws ApiException if fails to make API call
*/
public Recipients createRecipient(
String accountId,
String envelopeId,
Recipients recipients,
EnvelopesApi.CreateRecipientOptions options)
throws ApiException {
Object localVarPostBody = recipients;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createRecipient");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400, "Missing the required parameter 'envelopeId' when calling createRecipient");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll(
"\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
if (options != null) {
localVarQueryParams.addAll(
apiClient.parameterToPair("resend_envelope", options.resendEnvelope));
}
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Provides a link to access the Identity manual review related to a recipient..
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param recipientId The ID of the recipient being accessed. (required)
* @return ViewUrl
* @throws ApiException if fails to make API call
*/
public ViewUrl createRecipientManualReviewView(
String accountId, String envelopeId, String recipientId) throws ApiException {
Object localVarPostBody = "{}";
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400,
"Missing the required parameter 'accountId' when calling createRecipientManualReviewView");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400,
"Missing the required parameter 'envelopeId' when calling createRecipientManualReviewView");
}
// verify the required parameter 'recipientId' is set
if (recipientId == null) {
throw new ApiException(
400,
"Missing the required parameter 'recipientId' when calling createRecipientManualReviewView");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/views/identity_manual_review"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()))
.replaceAll(
"\\{" + "recipientId" + "\\}", apiClient.escapeString(recipientId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Returns a link to access to the identity events stored in the proof service related to this
* recipient..
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param recipientId The ID of the recipient being accessed. (required)
* @return ProofServiceViewLink
* @throws ApiException if fails to make API call
*/
public ProofServiceViewLink createRecipientProofFileLink(
String accountId, String envelopeId, String recipientId) throws ApiException {
Object localVarPostBody = "{}";
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400,
"Missing the required parameter 'accountId' when calling createRecipientProofFileLink");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400,
"Missing the required parameter 'envelopeId' when calling createRecipientProofFileLink");
}
// verify the required parameter 'recipientId' is set
if (recipientId == null) {
throw new ApiException(
400,
"Missing the required parameter 'recipientId' when calling createRecipientProofFileLink");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/identity_proof"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()))
.replaceAll(
"\\{" + "recipientId" + "\\}", apiClient.escapeString(recipientId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType =
new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Returns a resource token to get access to the identity events stored in the proof service
* related to this recipient..
*
* @param tokenScopes (required)
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param recipientId The ID of the recipient being accessed. (required)
* @return ProofServiceResourceToken
* @throws ApiException if fails to make API call
*/
public ProofServiceResourceToken createRecipientProofFileResourceToken(
String tokenScopes, String accountId, String envelopeId, String recipientId)
throws ApiException {
Object localVarPostBody = "{}";
// verify the required parameter 'tokenScopes' is set
if (tokenScopes == null) {
throw new ApiException(
400,
"Missing the required parameter 'tokenScopes' when calling createRecipientProofFileResourceToken");
}
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400,
"Missing the required parameter 'accountId' when calling createRecipientProofFileResourceToken");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400,
"Missing the required parameter 'envelopeId' when calling createRecipientProofFileResourceToken");
}
// verify the required parameter 'recipientId' is set
if (recipientId == null) {
throw new ApiException(
400,
"Missing the required parameter 'recipientId' when calling createRecipientProofFileResourceToken");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/identity_proof_token"
.replaceAll(
"\\{" + "token_scopes" + "\\}", apiClient.escapeString(tokenScopes.toString()))
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()))
.replaceAll(
"\\{" + "recipientId" + "\\}", apiClient.escapeString(recipientId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType =
new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Returns a URL to the recipient view UI.. Returns a URL that allows you to embed the recipient
* view of the DocuSign UI in your applications. This call cannot be used to view draft envelopes,
* since those envelopes have not been sent. Important: iFrames should not be used for embedded
* operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends
* using a WebView. An entry is added into the Security Level section of the DocuSign Certificate
* of Completion that reflects the `securityDomain` and `authenticationMethod`
* properties used to verify the user identity.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param recipientViewRequest (optional)
* @return ViewUrl
* @throws ApiException if fails to make API call
*/
public ViewUrl createRecipientView(
String accountId, String envelopeId, RecipientViewRequest recipientViewRequest)
throws ApiException {
Object localVarPostBody = recipientViewRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createRecipientView");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400, "Missing the required parameter 'envelopeId' when calling createRecipientView");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll(
"\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Get Responsive HTML Preview for all documents in an envelope..
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param documentHtmlDefinition (optional)
* @return DocumentHtmlDefinitions
* @throws ApiException if fails to make API call
*/
public DocumentHtmlDefinitions createResponsiveHtmlPreview(
String accountId, String envelopeId, DocumentHtmlDefinition documentHtmlDefinition)
throws ApiException {
Object localVarPostBody = documentHtmlDefinition;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400,
"Missing the required parameter 'accountId' when calling createResponsiveHtmlPreview");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400,
"Missing the required parameter 'envelopeId' when calling createResponsiveHtmlPreview");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/responsive_html_preview"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll(
"\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType =
new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Returns a URL to the sender view UI.. Returns a URL that allows you to embed the sender view of
* the DocuSign UI in your applications. This is a one-time use login token that allows the user
* to be placed into the DocuSign sending view. Upon sending completion, the user is returned to
* the return URL provided by the API application. Important: iFrames should not be used for
* embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign
* recommends using a WebView.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param returnUrlRequest (optional)
* @return ViewUrl
* @throws ApiException if fails to make API call
*/
public ViewUrl createSenderView(
String accountId, String envelopeId, ReturnUrlRequest returnUrlRequest) throws ApiException {
Object localVarPostBody = returnUrlRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createSenderView");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400, "Missing the required parameter 'envelopeId' when calling createSenderView");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/sender"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll(
"\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Adds tabs for a recipient.. Adds one or more tabs for a recipient.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param recipientId The ID of the recipient being accessed. (required)
* @param tabs (optional)
* @return Tabs
* @throws ApiException if fails to make API call
*/
public Tabs createTabs(String accountId, String envelopeId, String recipientId, Tabs tabs)
throws ApiException {
Object localVarPostBody = tabs;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createTabs");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400, "Missing the required parameter 'envelopeId' when calling createTabs");
}
// verify the required parameter 'recipientId' is set
if (recipientId == null) {
throw new ApiException(
400, "Missing the required parameter 'recipientId' when calling createTabs");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()))
.replaceAll(
"\\{" + "recipientId" + "\\}", apiClient.escapeString(recipientId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"docusignAccessCode"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}
/**
* Delete one or more attachments from a DRAFT envelope..
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeId The envelopeId Guid of the envelope being accessed. (required)
* @param envelopeAttachmentsRequest (optional)
* @return EnvelopeAttachmentsResult
* @throws ApiException if fails to make API call
*/
public EnvelopeAttachmentsResult deleteAttachments(
String accountId, String envelopeId, EnvelopeAttachmentsRequest envelopeAttachmentsRequest)
throws ApiException {
Object localVarPostBody = envelopeAttachmentsRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling deleteAttachments");
}
// verify the required parameter 'envelopeId' is set
if (envelopeId == null) {
throw new ApiException(
400, "Missing the required parameter 'envelopeId' when calling deleteAttachments");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll(
"\\{" + "envelopeId" + "\\}", apiClient.escapeString(envelopeId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList