Bulk Sign For a Signer

This guide shows you how to sign all documents in a transaction on behalf of a signer.

This feature enables you to sign all documents for a signer in a single call, instead of traversing documents successively, and signing each signature successively.

The Code

After you have sent your package for signing, you will need to retrieve your signer’s id using the PackageId object returned to you during package creation. When adding signers to your package, you can assign custom ids or you can retrieve the id generated by OneSpan Sign, as shown below.

String signerId = eslClient.getPackage(packageId).getSigner("john.smith@mailinator.com").getId();

Finally, you sign all signatures for a signer in a package using the OneSpan Sign client.

eslClient.signDocuments(packageId, signerId);

Running Your Code

Once you’ve run your code, login to OneSpan Sign and browse to your package. You should be able to see a check mark next to your signer, indicating that all signatures for the signer have been signed.

1

Get the Code

This feature enables you to sign all documents for a signer in a single call, instead of traversing documents successively, and signing each signature successively.

The Code

After you have sent your package for signing, you will need to retrieve your signer’s id using the PackageId object returned to you during package creation. When adding signers to your package, you can assign custom ids or you can retrieve the id generated by OneSpan Sign, as shown below.

string signerId = eslClient.GetPackage(packageId).GetSigner("john.smith@mailinator.com").Id;

Finally, you sign all signatures for a signer in a package using the OneSpan Sign client.

eslClient.SignDocuments(packageId, signerId);

Running Your Code

Once you’ve run your code, login to OneSpan Sign and browse to your package. You should be able to see a check mark next to your signer, indicating that all signatures for the signer have been signed.

1

Get the Code

This feature enables you to sign all documents for a signer in a single call, instead of traversing documents successively, and signing each signature successively.

The Code

After you have sent your package for signing, you will need to create a signer authentication by making the following request:

HTTP Request
POST /api/authenticationTokens/signer/multiUse

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

Request Payload

{
  "packageId": "packageId",
  "signerId": "signer1",
  "sessionFields": {
    "Bulk Signing on behalf of": "signer1"
  },
  "value": null
}

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

Response Payload

{
  "packageId": "packageId",
  "signerId": "signer1",
  "sessionFields": {
    "Bulk Signing on behalf of": "signer1"
  },
  "value":"ZDNmMDNiNGUtNGYxOC00YWZiLTkwMmUtNWE5YmIwZTRjZDg1"
}

Then, you will need to create a session token using the signer authentication token you just created that will be used in the cookie header of the call to sign all documents.

HTTP Request
GET /auth?signerAuthenticationToken={signerAuthenticationToken}

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

Next, you will have create a JSON payload containing the ids of the documents you want to sign. Here’s an example of what you should have:

{
  "documents": [
    {
      "id": "default-consent"
    },
    {
      "id": "6489338764d20465"
    }
  ]
}

Finally, you sign all the documents in your package on behalf of a signer. In this step, you will need to remove the Authorization header and add a Cookie header using the session token created previously.

HTTP Request
POST /api/packages/{packageId}/documents/signed_documents

HTTP Headers
Accept: application/json
Content-Type: application/json
Cookie: ESIGNLIVE_SESSION_ID={sessionToken}

Request Payload

{
  "documents": [
    {
      "id": "default-consent"
    },
    {
      "id": "6489338764d20465"
    }
  ]
}

Running Your Code

Once you’ve run your code, login to OneSpan Sign and browse to your package. You should be able to see a check mark next to your signer, indicating that all signatures for the signer have been signed.

1

Get the Code

This feature enables you to sign all documents for a signer in a single call, instead of traversing documents, and signing each signature successively.
To notice, some of the code is an extension of the APEX SDK and can be gotten through the Code Share.

The Code

After you have sent your package for signing, you will need to retrieve your package ID returned to you. And you can assign Custom ID when adding signer to your package or simply use signer’s Email to specify the signer and then bulk sign for his/her.
The signDocuments() function is encapsulated like below:

public void signDocuments(String packageId, String signerId)

Finally, you can execute this function in Execute Anonymous Window from Developer Console and type in:

new TestBulkSignForSigner().signDocuments('packageId','signer@example.com');

Running Your Code

Once you’ve run your code, login to OneSpan Sign and browse to your package. You should be able to see a check mark next to your signer, indicating that all signatures for the signer have been signed.
Capture

Get the Code