All URIs are relative to https://api.hellosign.com/v3
| Method | HTTP request | Description |
|---|---|---|
| templateAddUser | POST /template/add_user/{template_id} | Add User to Template |
| templateCreate | POST /template/create | Create Template |
| templateCreateEmbeddedDraft | POST /template/create_embedded_draft | Create Embedded Template Draft |
| templateDelete | POST /template/delete/{template_id} | Delete Template |
| templateFiles | GET /template/files/{template_id} | Get Template Files |
| templateFilesAsDataUri | GET /template/files_as_data_uri/{template_id} | Get Template Files as Data Uri |
| templateFilesAsFileUrl | GET /template/files_as_file_url/{template_id} | Get Template Files as File Url |
| templateGet | GET /template/{template_id} | Get Template |
| templateList | GET /template/list | List Templates |
| templateRemoveUser | POST /template/remove_user/{template_id} | Remove User from Template |
| templateUpdateFiles | POST /template/update_files/{template_id} | Update Template Files |
TemplateGetResponse templateAddUser(templateId, templateAddUserRequest)
Add User to Template
Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.
package com.dropbox.sign_sandbox;
import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;
import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class TemplateAddUserExample
{
public static void main(String[] args)
{
var config = Configuration.getDefaultApiClient();
((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
// ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");
var templateAddUserRequest = new TemplateAddUserRequest();
templateAddUserRequest.emailAddress("george@dropboxsign.com");
try
{
var response = new TemplateApi(config).templateAddUser(
"f57db65d3f933b5316d398057a36176831451a35", // templateId
templateAddUserRequest
);
System.out.println(response);
} catch (ApiException e) {
System.err.println("Exception when calling TemplateApi#templateAddUser");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| templateId | String | The id of the Template to give the Account access to. | |
| templateAddUserRequest | TemplateAddUserRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | * X-RateLimit-Limit - * X-RateLimit-Remaining - * X-Ratelimit-Reset - |
| 4XX | failed_operation | - |
TemplateCreateResponse templateCreate(templateCreateRequest)
Create Template
Creates a template that can then be used.
package com.dropbox.sign_sandbox;
import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;
import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class TemplateCreateExample
{
public static void main(String[] args)
{
var config = Configuration.getDefaultApiClient();
((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
// ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");
var fieldOptions = new SubFieldOptions();
fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY);
var signerRoles1 = new SubTemplateRole();
signerRoles1.name("Client");
signerRoles1.order(0);
var signerRoles2 = new SubTemplateRole();
signerRoles2.name("Witness");
signerRoles2.order(1);
var signerRoles = new ArrayList<SubTemplateRole>(List.of (
signerRoles1,
signerRoles2
));
var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText();
formFieldsPerDocument1.documentIndex(0);
formFieldsPerDocument1.apiId("uniqueIdHere_1");
formFieldsPerDocument1.type("text");
formFieldsPerDocument1.required(true);
formFieldsPerDocument1.signer("1");
formFieldsPerDocument1.width(100);
formFieldsPerDocument1.height(16);
formFieldsPerDocument1.x(112);
formFieldsPerDocument1.y(328);
formFieldsPerDocument1.name("");
formFieldsPerDocument1.page(1);
formFieldsPerDocument1.placeholder("");
formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY);
var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature();
formFieldsPerDocument2.documentIndex(0);
formFieldsPerDocument2.apiId("uniqueIdHere_2");
formFieldsPerDocument2.type("signature");
formFieldsPerDocument2.required(true);
formFieldsPerDocument2.signer("0");
formFieldsPerDocument2.width(120);
formFieldsPerDocument2.height(30);
formFieldsPerDocument2.x(530);
formFieldsPerDocument2.y(415);
formFieldsPerDocument2.name("");
formFieldsPerDocument2.page(1);
var formFieldsPerDocument = new ArrayList<SubFormFieldsPerDocumentBase>(List.of (
formFieldsPerDocument1,
formFieldsPerDocument2
));
var mergeFields1 = new SubMergeField();
mergeFields1.name("Full Name");
mergeFields1.type(SubMergeField.TypeEnum.TEXT);
var mergeFields2 = new SubMergeField();
mergeFields2.name("Is Registered?");
mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX);
var mergeFields = new ArrayList<SubMergeField>(List.of (
mergeFields1,
mergeFields2
));
var templateCreateRequest = new TemplateCreateRequest();
templateCreateRequest.clientId("37dee8d8440c66d54cfa05d92c160882");
templateCreateRequest.message("For your approval");
templateCreateRequest.subject("Please sign this document");
templateCreateRequest.testMode(true);
templateCreateRequest.title("Test Template");
templateCreateRequest.ccRoles(List.of (
"Manager"
));
templateCreateRequest.files(List.of (
new File("./example_signature_request.pdf")
));
templateCreateRequest.fieldOptions(fieldOptions);
templateCreateRequest.signerRoles(signerRoles);
templateCreateRequest.formFieldsPerDocument(formFieldsPerDocument);
templateCreateRequest.mergeFields(mergeFields);
try
{
var response = new TemplateApi(config).templateCreate(
templateCreateRequest
);
System.out.println(response);
} catch (ApiException e) {
System.err.println("Exception when calling TemplateApi#templateCreate");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| templateCreateRequest | TemplateCreateRequest |
- Content-Type: application/json, multipart/form-data
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | * X-RateLimit-Limit - * X-RateLimit-Remaining - * X-Ratelimit-Reset - |
| 4XX | failed_operation | - |
TemplateCreateEmbeddedDraftResponse templateCreateEmbeddedDraft(templateCreateEmbeddedDraftRequest)
Create Embedded Template Draft
The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template 'edit' stage.
package com.dropbox.sign_sandbox;
import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;
import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class TemplateCreateEmbeddedDraftExample
{
public static void main(String[] args)
{
var config = Configuration.getDefaultApiClient();
((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
// ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");
var fieldOptions = new SubFieldOptions();
fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY);
var mergeFields1 = new SubMergeField();
mergeFields1.name("Full Name");
mergeFields1.type(SubMergeField.TypeEnum.TEXT);
var mergeFields2 = new SubMergeField();
mergeFields2.name("Is Registered?");
mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX);
var mergeFields = new ArrayList<SubMergeField>(List.of (
mergeFields1,
mergeFields2
));
var signerRoles1 = new SubTemplateRole();
signerRoles1.name("Client");
signerRoles1.order(0);
var signerRoles2 = new SubTemplateRole();
signerRoles2.name("Witness");
signerRoles2.order(1);
var signerRoles = new ArrayList<SubTemplateRole>(List.of (
signerRoles1,
signerRoles2
));
var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest();
templateCreateEmbeddedDraftRequest.clientId("37dee8d8440c66d54cfa05d92c160882");
templateCreateEmbeddedDraftRequest.message("For your approval");
templateCreateEmbeddedDraftRequest.subject("Please sign this document");
templateCreateEmbeddedDraftRequest.testMode(true);
templateCreateEmbeddedDraftRequest.title("Test Template");
templateCreateEmbeddedDraftRequest.ccRoles(List.of (
"Manager"
));
templateCreateEmbeddedDraftRequest.files(List.of (
new File("./example_signature_request.pdf")
));
templateCreateEmbeddedDraftRequest.fieldOptions(fieldOptions);
templateCreateEmbeddedDraftRequest.mergeFields(mergeFields);
templateCreateEmbeddedDraftRequest.signerRoles(signerRoles);
try
{
var response = new TemplateApi(config).templateCreateEmbeddedDraft(
templateCreateEmbeddedDraftRequest
);
System.out.println(response);
} catch (ApiException e) {
System.err.println("Exception when calling TemplateApi#templateCreateEmbeddedDraft");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| templateCreateEmbeddedDraftRequest | TemplateCreateEmbeddedDraftRequest |
TemplateCreateEmbeddedDraftResponse
- Content-Type: application/json, multipart/form-data
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | * X-RateLimit-Limit - * X-RateLimit-Remaining - * X-Ratelimit-Reset - |
| 4XX | failed_operation | - |
templateDelete(templateId)
Delete Template
Completely deletes the template specified from the account.
package com.dropbox.sign_sandbox;
import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;
import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class TemplateDeleteExample
{
public static void main(String[] args)
{
var config = Configuration.getDefaultApiClient();
((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
// ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");
try
{
new TemplateApi(config).templateDelete(
"f57db65d3f933b5316d398057a36176831451a35" // templateId
);
} catch (ApiException e) {
System.err.println("Exception when calling TemplateApi#templateDelete");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| templateId | String | The id of the Template to delete. |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | * X-RateLimit-Limit - * X-RateLimit-Remaining - * X-Ratelimit-Reset - |
| 4XX | failed_operation | - |
File templateFiles(templateId, fileType)
Get Template Files
Obtain a copy of the current documents specified by the template_id parameter. Returns a PDF or ZIP file.
If the files are currently being prepared, a status code of 409 will be returned instead. In this case please wait for the template_created callback event.
package com.dropbox.sign_sandbox;
import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;
import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class TemplateFilesExample
{
public static void main(String[] args)
{
var config = Configuration.getDefaultApiClient();
((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
// ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");
try
{
var response = new TemplateApi(config).templateFiles(
"f57db65d3f933b5316d398057a36176831451a35", // templateId
null // fileType
);
response.renameTo(new File("./file_response"));
} catch (ApiException e) {
System.err.println("Exception when calling TemplateApi#templateFiles");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| templateId | String | The id of the template files to retrieve. | |
| fileType | String | Set to pdf for a single merged document or zip for a collection of individual documents. |
[optional] [enum: pdf, zip] |
- Content-Type: Not defined
- Accept: application/pdf, application/zip, application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | * X-RateLimit-Limit - * X-RateLimit-Remaining - * X-Ratelimit-Reset - |
| 4XX | failed_operation | - |
FileResponseDataUri templateFilesAsDataUri(templateId)
Get Template Files as Data Uri
Obtain a copy of the current documents specified by the template_id parameter. Returns a JSON object with a data_uri representing the base64 encoded file (PDFs only).
If the files are currently being prepared, a status code of 409 will be returned instead. In this case please wait for the template_created callback event.
package com.dropbox.sign_sandbox;
import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;
import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class TemplateFilesAsDataUriExample
{
public static void main(String[] args)
{
var config = Configuration.getDefaultApiClient();
((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
// ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");
try
{
var response = new TemplateApi(config).templateFilesAsDataUri(
"f57db65d3f933b5316d398057a36176831451a35" // templateId
);
System.out.println(response);
} catch (ApiException e) {
System.err.println("Exception when calling TemplateApi#templateFilesAsDataUri");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| templateId | String | The id of the template files to retrieve. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | * X-RateLimit-Limit - * X-RateLimit-Remaining - * X-Ratelimit-Reset - |
| 4XX | failed_operation | - |
FileResponse templateFilesAsFileUrl(templateId, forceDownload)
Get Template Files as File Url
Obtain a copy of the current documents specified by the template_id parameter. Returns a JSON object with a url to the file (PDFs only).
If the files are currently being prepared, a status code of 409 will be returned instead. In this case please wait for the template_created callback event.
package com.dropbox.sign_sandbox;
import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;
import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class TemplateFilesAsFileUrlExample
{
public static void main(String[] args)
{
var config = Configuration.getDefaultApiClient();
((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
// ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");
try
{
var response = new TemplateApi(config).templateFilesAsFileUrl(
"f57db65d3f933b5316d398057a36176831451a35", // templateId
1 // forceDownload
);
System.out.println(response);
} catch (ApiException e) {
System.err.println("Exception when calling TemplateApi#templateFilesAsFileUrl");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| templateId | String | The id of the template files to retrieve. | |
| forceDownload | Integer | By default when opening the file_url a browser will download the PDF and save it locally. When set to 0 the PDF file will be displayed in the browser. |
[optional] [default to 1] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | * X-RateLimit-Limit - * X-RateLimit-Remaining - * X-Ratelimit-Reset - |
| 4XX | failed_operation | - |
TemplateGetResponse templateGet(templateId)
Get Template
Returns the Template specified by the template_id parameter.
package com.dropbox.sign_sandbox;
import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;
import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class TemplateGetExample
{
public static void main(String[] args)
{
var config = Configuration.getDefaultApiClient();
((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
// ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");
try
{
var response = new TemplateApi(config).templateGet(
"f57db65d3f933b5316d398057a36176831451a35" // templateId
);
System.out.println(response);
} catch (ApiException e) {
System.err.println("Exception when calling TemplateApi#templateGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| templateId | String | The id of the Template to retrieve. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | * X-RateLimit-Limit - * X-RateLimit-Remaining - * X-Ratelimit-Reset - |
| 4XX | failed_operation | - |
TemplateListResponse templateList(accountId, page, pageSize, query)
List Templates
Returns a list of the Templates that are accessible by you.
Take a look at our search guide to learn more about querying templates.
package com.dropbox.sign_sandbox;
import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;
import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class TemplateListExample
{
public static void main(String[] args)
{
var config = Configuration.getDefaultApiClient();
((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
// ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");
try
{
var response = new TemplateApi(config).templateList(
null, // accountId
1, // page
20, // pageSize
null // query
);
System.out.println(response);
} catch (ApiException e) {
System.err.println("Exception when calling TemplateApi#templateList");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | Which account to return Templates for. Must be a team member. Use all to indicate all team members. Defaults to your account. |
[optional] |
| page | Integer | Which page number of the Template List to return. Defaults to 1. |
[optional] [default to 1] |
| pageSize | Integer | Number of objects to be returned per page. Must be between 1 and 100. Default is 20. |
[optional] [default to 20] |
| query | String | String that includes search terms and/or fields to be used to filter the Template objects. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | * X-RateLimit-Limit - * X-RateLimit-Remaining - * X-Ratelimit-Reset - |
| 4XX | failed_operation | - |
TemplateGetResponse templateRemoveUser(templateId, templateRemoveUserRequest)
Remove User from Template
Removes the specified Account's access to the specified Template.
package com.dropbox.sign_sandbox;
import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;
import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class TemplateRemoveUserExample
{
public static void main(String[] args)
{
var config = Configuration.getDefaultApiClient();
((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
// ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");
var templateRemoveUserRequest = new TemplateRemoveUserRequest();
templateRemoveUserRequest.emailAddress("george@dropboxsign.com");
try
{
var response = new TemplateApi(config).templateRemoveUser(
"f57db65d3f933b5316d398057a36176831451a35", // templateId
templateRemoveUserRequest
);
System.out.println(response);
} catch (ApiException e) {
System.err.println("Exception when calling TemplateApi#templateRemoveUser");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| templateId | String | The id of the Template to remove the Account's access to. | |
| templateRemoveUserRequest | TemplateRemoveUserRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | * X-RateLimit-Limit - * X-RateLimit-Remaining - * X-Ratelimit-Reset - |
| 4XX | failed_operation | - |
TemplateUpdateFilesResponse templateUpdateFiles(templateId, templateUpdateFilesRequest)
Update Template Files
Overlays a new file with the overlay of an existing template. The new file(s) must:
- have the same or higher page count
- the same orientation as the file(s) being replaced.
This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota.
Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks.
It is recommended that a callback be implemented to listen for the callback event. A template_created event will be sent when the files are updated or a template_error event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary.
If the page orientation or page count is different from the original template document, we will notify you with a template_error callback event.
package com.dropbox.sign_sandbox;
import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;
import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class TemplateUpdateFilesExample
{
public static void main(String[] args)
{
var config = Configuration.getDefaultApiClient();
((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
// ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");
var templateUpdateFilesRequest = new TemplateUpdateFilesRequest();
templateUpdateFilesRequest.files(List.of (
new File("./example_signature_request.pdf")
));
try
{
var response = new TemplateApi(config).templateUpdateFiles(
"f57db65d3f933b5316d398057a36176831451a35", // templateId
templateUpdateFilesRequest
);
System.out.println(response);
} catch (ApiException e) {
System.err.println("Exception when calling TemplateApi#templateUpdateFiles");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| templateId | String | The ID of the template whose files to update. | |
| templateUpdateFilesRequest | TemplateUpdateFilesRequest |
- Content-Type: application/json, multipart/form-data
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | * X-RateLimit-Limit - * X-RateLimit-Remaining - * X-Ratelimit-Reset - |
| 4XX | failed_operation | - |