Signer Management

This guide covers how to manage your signers in your OneSpan Sign packages.

One of the most fundamental and basic operations in OneSpan Sign is that of inviting signers to sign documents. This guide will cover how to add, update, and remove a signer after creating a package.

The Code

To add a signer to an existing package, first create the Signer object.

Signer signer = SignerBuilder.newSignerWithEmail("signer@example.com")
				.withFirstName("John")
				.withLastName("Smith")
				.withCustomId("Signer1")
				.build();

Next, grab the PackageId returned to you during package creation and use the OneSpan Sign client to add your signer.

String signerId = eslClient.getPackageService().addSigner(packageId, signer);

Similarly, to update an existing signer, create a Signer object with the updates you want to make.

Signer updatedSigner = SignerBuilder.newSignerWithEmail("mary.doe@example.com")
				.withFirstName("Mary")
				.withLastName("Doe")
				.withCustomId("Signer1")
				.build();

Then, grab the PackageId you wish to change this signer in and use the OneSpan Sign client to update the signer.

eslClient.getPackageService().updateSigner(packageId, updatedSigner);

To delete a signer, simply call the removeSigner function with the packageId and signerId string.

eslClient.getPackageService().removeSigner(packageId, signerId);

Running Your Code

After running your code, if you login to OneSpan Sign and navigate to your package, you should be able to see your signer added to your package.

signer

Get The Code

One of the most fundamental and basic operations in OneSpan Sign is that of inviting signers to sign documents. This guide will cover how to add, update, and remove a signer after creating a package.

The Code

To add a signer to an existing package, first create the Signer object.

Signer signer = SignerBuilder.NewSignerWithEmail("signer@example.com")
				.WithFirstName("John")
				.WithLastName("Smith")
				.WithCustomId("Signer1")
				.Build();

Next, grab the PackageId returned to you during package creation and use the OneSpan Sign client to add your signer.

String signerId = eslClient.PackageService.AddSigner(packageId, signer);

Similarly, to update an existing signer, create a Signer object with the updates you want to make.

Signer updatedSigner = SignerBuilder.NewSignerWithEmail("mary.doe@example.com")
				.WithFirstName("Mary")
				.WithLastName("Doe")
				.WithCustomId("Signer1")
				.Build();

Then, grab the PackageId you wish to change this signer in and use the OneSpan Sign client to update the signer.

eslClient.PackageService.UpdateSigner(packageId, updatedSigner);

To delete a signer, simply call the RemoveSigner function with the packageId and signerId string.

eslClient.PackageService.RemoveSigner(packageId, signerId);

Running Your Code

After running your code, if you login to OneSpan Sign and navigate to your package, you should be able to see your signer added to your package.

signer

Get The Code

One of the most fundamental and basic operations in OneSpan Sign is that of inviting signers to sign documents. This guide will cover how to add, update, and remove a signer after creating a package.

The Code

Adding a signer to a package is done as shown below:

HTTP Request
POST /api/packages/{packageId}/roles

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

Request Payload

{
  "id": "Signer5",
  "type": "SIGNER",
  "signers": [
    {
      "email": "mail32@mailinator.com",
      "firstName": "John",
      "lastName": "Smith",
      "id": "Signer5"
    }
  ],
  "name": "Signer5"
}

For a complete description of each field, take a look at the JSON Properties section below.

Response Payload

{
    "id": "Signer5",
    "data": null,
    "specialTypes": [],
    "emailMessage": null,
    "attachmentRequirements": [],
    "locked": false,
    "reassign": false,
    "index": 0,
    "signers": [
        {
            "group": null,
            "language": "en",
            "signature": null,
            "id": "Signer5",
            "delivery": {
                "provider": false,
                "email": false,
                "download": false
            },
            "auth": {
                "scheme": "NONE",
                "challenges": []
            },
            "knowledgeBasedAuthentication": null,
            "data": null,
            "title": "",
            "company": "",
            "email": "mail32@mailinator.com",
            "firstName": "John",
            "lastName": "Smith",
            "external": null,
            "updated": "2017-11-16T16:53:01Z",
            "phone": "",
            "professionalIdentityFields": [],
            "userCustomFields": [],
            "address": null,
            "created": "2017-11-16T16:53:01Z",
            "name": "",
            "specialTypes": []
        }
    ],
    "name": "Signer5",
    "type": "SIGNER"
}

To update an existing role/signer, create a payload with the updates you want to make and do the following request using the role id you assigned in the previous request. If you did not assign a role id, a randomly generated id will be assigned by OneSpan Sign.

HTTP Request
PUT /api/packages/{packageId}/roles/{roleId}

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

Request Payload

{
  "type": "SIGNER",
  "signers": [
    {
      "email": "mary.doe@example.com",
      "firstName": "Mary",
      "lastName": "Doe"
    }
  ]
}

Response Payload

{
    "id": "Signer5",
    "data": null,
    "specialTypes": [],
    "emailMessage": null,
    "attachmentRequirements": [],
    "locked": false,
    "reassign": false,
    "index": 0,
    "signers": [
        {
            "group": null,
            "language": "en",
            "signature": null,
            "id": "Signer5",
            "delivery": {
                "provider": false,
                "email": false,
                "download": false
            },
            "auth": {
                "scheme": "NONE",
                "challenges": []
            },
            "knowledgeBasedAuthentication": null,
            "data": null,
            "title": "",
            "company": "",
            "email": "mary.doe@example.com",
            "firstName": "Mary",
            "lastName": "Doe",
            "external": null,
            "updated": "2017-11-16T16:53:01Z",
            "phone": "",
            "professionalIdentityFields": [],
            "userCustomFields": [],
            "address": null,
            "created": "2017-11-16T16:53:01Z",
            "name": "",
            "specialTypes": []
        }
    ],
    "name": "Signer5",
    "type": "SIGNER"
}

To remove a signer, you make a DELETE request to the following URI:

HTTP Request
DELETE /api/packages/{packageId}/roles/{signerId}

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

Running Your Code

After running your code, if you login to OneSpan Sign and navigate to your package, you should be able to see your signer added to your package.

signer

Get The Code

JSON Properties

Property Type Editable Required Default Sample Value(s)
id string Yes No n/a Signer5
reassign boolean Yes No false true / false
name string Yes No n/a Signer5
id string Yes No n/a Signer5
type string Yes No SIGNER SIGNER / SENDER
signers
email string Yes No n/a mail32@mailinator.com
firstName string Yes No n/a John
lastName string Yes No n/a Smith
id string Yes No n/a Signer5

One of the most fundamental and basic operations in OneSpan Sign is that of inviting signers to sign documents. This guide will cover how to add, update, and remove a signer after creating a package.

The Code

To add a signer to an existing package, first create the Signer object.

ESignLiveAPIObjects.Role role = new ESignLiveAPIObjects.Role();
role.id = 'signer1';
role.signers = sdk.createRolesSigner('John', 'Smith', 'signer@example.com', 'CEO', 'ABC Bank');
sdk.helper.createRole(packageId, role);

Next, grab the PackageId returned to you during package creation and use the OneSpan Sign client to add your signer.

ESignLiveAPIObjects.Role retrievedRole = sdk.getRole(packageId, 'signer1');

Similarly, to update an existing signer, you can modify attributes except Role ID to the signer you retrieved.

retrievedRole.signers.get(0).firstName = 'changed firstname';
retrievedRole.signers.get(0).lastName = 'changed lastname';
retrievedRole.signers.get(0).email = 'changed@example.com';

Then, grab the PackageId you wish to change this signer in and use the OneSpan Sign sdk to update the signer.

sdk.updateRole(packageId,'signer1',retrievedRole);

To delete a signer, simply call the deleteRole function with the package ID and role ID string.

sdk.helper.deleteRole(packageId, 'signer1');

Running Your Code

After running your code, if you login to OneSpan Sign and navigate to your package, you should be able to see your signer added to your package.

signer

Get The Code