Managing Signature Placeholders
  • 10 Oct 2024
  • 4 Minutes to read
  • Dark
    Light
  • PDF

Managing Signature Placeholders

  • Dark
    Light
  • PDF

Article summary

Java SDK.NET SDKREST APIAPEX SDK

Java SDK

To download the full code sample see our Code Share site.

A signature placeholder is useful if the identity of a signer will be determined at a later time. For example, when building a template. A placeholder can be assigned to a signature field just as if you were assigning a regular signer. However, all placeholders must be replaced by real signers before the transaction is distributed for signing. Because a signature placeholder has no email address, they are identified by an ID.

Adding a Signature Placeholder to a Template

To add a signature placeholder to a template, you must first create the Placeholder object. The following code will create a Placeholder object:

Placeholder placeholder = new Placeholder("Manager");

Once the Placeholder object has been created, use the OneSpan Sign TemplateService to add your signature placeholder to your template and pass the templateId and placeholder as parameters. The following code will do this:

 Placeholder addedPlaceholder = eslClient.getTemplateService().addPlaceholder(templateId, placeholder); 

Updating a Signature Placeholder

To update an existing signature placeholder use the following code:

addedPlaceholder.setName("Client");
Placeholder updatedPlaceholder = eslClient.getTemplateService().updatePlaceholder(templateId, addedPlaceholder);

Deleting a Signature Placeholder

Finally, deleting a signature placeholder is done using the PackageService. You will need to pass the templateId object, and placeholder id String as parameters.

eslClient.getPackageService().removeSigner(templateId, addedPlaceholder.getId());

.NET SDK

To download the full code sample see our Code Share site.

A signature placeholder is useful if the identity of a signer will be determined at a later time. For example, when building a template. A placeholder can be assigned to a signature field just as if you were assigning a regular signer. However, all placeholders must be replaced by real signers before the transaction is distributed for signing. Because a signature placeholder has no email address, they are identified by an ID.

Adding a Signature Placeholder to a Template

To add a signature placeholder to a template, you must first create the Placeholder object. The following code will create a Placeholder object:

 Placeholder placeholder = new Placeholder("Manager"); 

Once the Placeholder object has been created, use the OneSpan Sign TemplateService to add your signature placeholder to your template and pass the templateId and placeholder as parameters. The following code will do this:

 Placeholder addedPlaceholder = eslClient.TemplateService.AddPlaceholder(templateId, placeholder); 

Updating a Signature Placeholder

To update an existing signature placeholder use the following code:

addedPlaceholder.Name = "Client";
Placeholder updatedPlaceholder = eslClient.TemplateService.UpdatePlaceholder(templateId, addedPlaceholder);

Deleting a Signature Placeholder

Finally, deleting a signature placeholder is done using the PackageService. You will need to pass the templateId object, and placeholder id String as parameters.

eslClient.PackageService.RemoveSigner(templateId, addedPlaceholder.Id);

REST API

To download the full code sample see our Code Share site.

A signature placeholder is useful if the identity of a signer will be determined at a later time. For example, when building a template. A placeholder can be assigned to a signature field just as if you were assigning a regular signer. However, all placeholders must be replaced by real signers before the transaction is distributed for signing. Because a signature placeholder has no email address, they are identified by an ID.

Adding a Placeholder to a Template

To add a signature placeholder to a template, use the following code:

HTTP Request

POST /api/packages/{templateId}/roles

HTTP Headers

Accept: application/json   
Content-Type: application/json   
Authorization: Basic api_key 

Request Payload

 {   "id": "Manager",   "type": "SIGNER",   "index": 0,   "name": "Manager"   } 

For a complete description of each field, see the Request Payload table below.

Response Payload

{
    "id": "Manager",
    "type": "SIGNER",
    "index": 0,
    "name": "Manager"
}

Updating a Signature Placeholder

Updating a placeholder is also done in a similar fashion. You will need to build the JSON with the updates you wish to make:

HTTP Request

PUT /api/packages/{templateId}/roles/[roleId}

HTTP Headers

Accept: application/json   
Content-Type: application/json   
Authorization: Basic api_key 

Request Payload

{
    "id": "Manager",
    "type": "SIGNER",
    "index": 0,
    "name": "Manager"
}

Response Payload

{
    "id": "Manager",
    "data": null,
    "emailMessage": null,
    "attachmentRequirements": [],
    "locked": false,
    "reassign": false,
    "specialTypes": [],
    "type": "SIGNER",
    "index": 0,
    "signers": [],
    "name": "Manager"
}

Deleting a Signature Placeholder

Finally, to delete a placeholder:

HTTP Request

DELETE /api/packages/{templateId}/roles/{roleId}

HTTP Headers

Accept: application/json   
Content-Type: application/json   
Authorization: Basic api_key 

Request Payload Table

Property

Type

Editable

Required

Default

Sample Values

name

string

Yes

No

n/a

Manager

id

string

Yes

No

n/a

Manager

type

stringer

Yes

No

SIGNER

SIGNER / SENDER

name

string

Yes

No

n/a

Manager

APEX SDK

To download the full code sample see our Code Share site.

A signature placeholder is useful if the identity of a signer will be determined at a later time. For example, when building a template. A placeholder can be assigned to a signature field just as if you were assigning a regular signer. However, all placeholders must be replaced by real signers before the transaction is distributed for signing. Because a signature placeholder has no email address, they are identified by an ID.

Adding a Signature Placeholder to a Template

To add a placeholder in a template, you will first need to create your Role object. The following code will do this:

String placeholderId = 'placeholder1';
ESignLiveAPIObjects.Role placeholder1 = new ESignLiveAPIObjects.Role();
placeholder1.id = placeholderId;
placeholder1.name = placeholderId;

Once you have built your Placeholder object, use the sdk.helper to add your signature placeholder to your template and pass the templateId and placeholder as parameters. The following code will do this:

sdk.helper.createRole('E-_tmDsICwCkM2vqFuzVxF7NVQQ=', placeholder1);

Updating a Signature Placeholder

To update an existing signature placeholder use the following code:

sdk.helper.updateRole('E-_tmDsICwCkM2vqFuzVxF7NVQQ=','Manager', placeholder1); 

Deleting a Signature Placeholder

Finally, deleting a signature placeholder is also done using the sdk.helper. You will need to pass the templateId object, and placeholder id String as parameters.

sdk.helper.deleteRole('E-_tmDsICwCkM2vqFuzVxF7NVQQ=','Manager'); 


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Ozzy, our interactive help assistant