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

This feature allows you to automatically sign all documents in a transaction for a specified signer. This is done by passing that signer's ID, or by adding the signer's email as a parameter. The following code will do this:

 eslClient.signDocuments(packageId, "signerId");

Results

After running your code, if you login to OneSpan Sign and navigate to your transaction, you will see a check mark next to your signer, indicating that all signatures for that signer have been completed.

1

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

This feature allows you to automatically sign all documents in a transaction for a specified signer. This is done by passing that signer's ID, or by adding the signer's email as a parameter. The following code will do this:

  eslClient.SignDocuments(packageId, "signerId");  

Results

After running your code, if you login to OneSpan Sign and navigate to your transaction, you will see a check mark next to your signer, indicating that all signatures for that signer have been completed.

1

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

This feature allows you to automatically sign all documents in a transaction for a specified signer.

After you have sent your package for signing, you will need to do the following:

Creating a Signer Authentication

The following code will do this:

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, see the Request Payload table below.

Response Payload

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

Creating a Session Token

Once you have created a signer authentication token you will need to create session token using this authentication token. This session token will be used in the cookie header of the call to sign all documents.

The following code will do this:

HTTP Request

GET /auth?signerAuthenticationToken={signerAuthenticationToken}

HTTP Headers

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

Creating a JSON Payload with your document IDs

Next, create a JSON payload containing the ids of the documents you want to sign. The following code will do this:

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

Signing all documents

Finally, you sign all the documents in your transaction 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 you created earlier.

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"   }   ]   } 

Results

After running your code, if you login to OneSpan Sign and navigate to your transaction, you will see a check mark next to your signer, indicating that all signatures for that signer have been completed.

1

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

This feature allows you to automatically sign all documents in a transaction for a specified signer. This is done by passing that signer's ID, or by adding the signer's email as a parameter. The following code will do this:

 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'); 

Results

After running your code, if you login to OneSpan Sign and navigate to your transaction, you will see a check mark next to your signer, indicating that all signatures for that signer have been completed.

Capture