Allow Signers to Sign in a Specific Order

In BoldSign, enabling the signing order option allows you to specify the sequence in which signers will receive the email and subsequently sign the document. This ensures that documents are handled in an organized and accountable manner.This guide will go through the process of how to enable signing order using BoldSign API. You can enable signers to sign in a specific order by setting EnableSigningOrder to true and configuring the SignerOrder property accordingly.

Here are example codes that can be used to achieve this:

curl -X 'POST' \
  'https://api.boldsign.com/v1/document/send' \
  -H 'accept: application/json' \
  -H 'X-API-KEY: {Your API Key}' \
  -H 'Content-Type: multipart/form-data' \
  -F 'Title="Sample Document"' \
  -F 'EnableSigningOrder=True' \
       -F 'Signers={
        "name": "David",
        "emailAddress": "[email protected]",
        "signerType": "Signer",
        "signerOrder": 1,
        "formFields": [
           {
                "id": "Signature1",
                "name": "Signature2",
                "fieldType": "Signature",
                "pageNumber": 1,
                "bounds": {
                  "x": 50,
                  "y": 50,
                  "width": 125,
                  "height": 25
                   },
      "isRequired": true
    }
  ],
  "locale": "EN"
}' \
  -F 'Signers={
  "name": "hanky",
  "emailAddress": "[email protected]",
  "signerType": "Signer",
  "signerOrder": 2,
  "formFields": [
           {
                "id": "Signature2",
                "name": "Signature2",
                "fieldType": "Signature",
                "pageNumber": 1,
                "bounds": {
                  "x": 100,
                  "y": 100,
                  "width": 125,
                  "height": 25
                   },
      "isRequired": true
    }

 
  ],
  "locale": "EN"
}' \
  -F 'Files=@{your file}' \

import boldsign

configuration = boldsign.Configuration(host = "https://api.boldsign.com", api_key = "YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:
    
    document_api = boldsign.DocumentApi(api_client)

    send_for_sign = boldsign.SendForSign(
        title = "Document SDK API",
        document_title = "SDK Document Test case",
        description = "Testing document from SDK integration test case",
        files = ["YOUR_FILE_PATH"],
        signers = [
            boldsign.DocumentSigner(
                name = "David",
                emailAddress = "[email protected]",
                signerOrder = 1,
                signerType = "Signer",
                formFields = [
                    boldsign.FormField(
                        name = "Sign",
                        fieldType = "Signature",
                        font = "Helvetica",
                        pageNumber = 1,
                        isRequired = True,
                        bounds = boldsign.Rectangle(x = 50, y = 50, width = 100, height = 150)
                    )
                ],
                privateMessage = "This is private message for signer"
            ),
            boldsign.DocumentSigner(
                name = "Hanky",
                emailAddress = "[email protected]",
                signerOrder = 2,
                signerType = "Signer",
                formFields = [
                    boldsign.FormField(
                        name = "Sign",
                        fieldType = "Signature",
                        font = "Helvetica",
                        pageNumber = 1,
                        isRequired = True,
                        bounds = boldsign.Rectangle(x = 50, y = 50, width = 100, height = 150)
                    )
                ],
                privateMessage = "This is private message for signer"
            )
        ],
        enableSigningOrder = True
    )

    document_created = document_api.send_document(send_for_sign)
<?php require_once "vendor/autoload.php";

use BoldSign\Configuration;
use BoldSign\Api\DocumentApi;
use BoldSign\Model\FormField;
use BoldSign\Model\Rectangle;
use BoldSign\Model\DocumentSigner;
use BoldSign\Model\SendForSign;

$config = new Configuration();
$config->setHost("https://api.boldsign.com");
$config->setApiKey('{Your API Key}');

$document_api = new DocumentApi($config);

$form_field = new FormField();
$form_field->setName('signature');
$form_field->setFieldType('Signature');
$form_field->setPageNumber(1);
$form_field->setIsRequired(true);
$bounds = new Rectangle();
$bounds->setX(50);
$bounds->setY(50);
$bounds->setWidth(100);
$bounds->setHeight(25);
$form_field->setBounds($bounds);

$signer1 = new DocumentSigner();
$signer1->setName('David');
$signer1->setEmailAddress('[email protected]');
$signer1->setSignerOrder(1);
$signer1->setSignerType('Signer');
$signer1->setFormFields([$form_field]);

$signer2 = new DocumentSigner();
$signer2->setName('Hanky');
$signer2->setEmailAddress('[email protected]');
$signer2->setSignerOrder(2);
$signer2->setSignerType('Signer');
$signer2->setFormFields([$form_field]);

$send_for_sign = new SendForSign();
$send_for_sign->setTitle('Sample document');
$send_for_sign->setMessage('Please sign this');
$send_for_sign->setFiles(['{Your file path}']);
$send_for_sign->setSigners([$signer1, $signer2]);
$send_for_sign->setEnableSigningOrder(true);

$document_created = $document_api->sendDocument($send_for_sign);

ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://api.boldsign.com");
client.setApiKey("{Your API Key}");
DocumentApi documentApi = new DocumentApi(client);

FormField formField = new FormField();
formField.setName("Signature");
formField.setFieldType(FormField.FieldTypeEnum.SIGNATURE);
formField.setPageNumber(1);
formField.setIsRequired(true);
Rectangle bounds = new Rectangle().x(50f).y(50f).width(100f).height(25f);
formField.setBounds(bounds);

DocumentSigner signer1 = new DocumentSigner();
signer1.setName("David");
signer1.setEmailAddress("[email protected]");
signer1.setSignerOrder(1);
signer1.setSignerType(DocumentSigner.SignerTypeEnum.SIGNER);
signer1.setFormFields(Arrays.asList(formField));

DocumentSigner signer2 = new DocumentSigner();
signer2.setName("Hanky");
signer2.setEmailAddress("[email protected]");
signer2.setSignerOrder(2);
signer2.setSignerType(DocumentSigner.SignerTypeEnum.SIGNER);
signer2.setFormFields(Arrays.asList(formField));

SendForSign sendForSign = new SendForSign();
sendForSign.setTitle("Sample document");
sendForSign.setMessage("Please sign this");
sendForSign.setFiles(Arrays.asList(new File("{Your file path}")));
sendForSign.setSigners(Arrays.asList(signer1, signer2));
sendForSign.setEnableSigningOrder(true);

documentApi.sendDocument(sendForSign);
import * as boldsign from "boldsign"; 
import * as fs from 'fs';

const documentApi = new boldsign.DocumentApi("https://api.boldsign.com");
documentApi.setApiKey("YOUR_API_KEY");

const formField = new boldsign.FormField();
formField.id = 'signature';
formField.name = 'signature';
formField.fieldType = boldsign.FormField.FieldTypeEnum.Signature;
formField.pageNumber = 1;
formField.bounds = new boldsign.Rectangle();
formField.bounds.x = 50;
formField.bounds.y = 50;
formField.bounds.width = 100;
formField.bounds.height = 25;
formField.isRequired = true;

const signer1 = new boldsign.DocumentSigner();
signer1.name = 'Hanky';
signer1.emailAddress = '[email protected]';
signer1.signerOrder = 1;
signer1.signerType = boldsign.DocumentSigner.SignerTypeEnum.Signer;
signer1.formFields = [formField];
signer1.locale = boldsign.DocumentSigner.LocaleEnum.En;

const signer2 = new boldsign.DocumentSigner();
signer2.name = 'Cilian';
signer2.emailAddress = '[email protected]';
signer2.signerOrder = 2;
signer2.signerType = boldsign.DocumentSigner.SignerTypeEnum.Signer;
signer2.formFields = [formField];
signer2.locale = boldsign.DocumentSigner.LocaleEnum.En;

const sendForSign = new boldsign.SendForSign();
sendForSign.title = 'Sample document';
sendForSign.message = 'Please sign this';
sendForSign.files = [fs.createReadStream('YOUR_FILE_PATH')];
sendForSign.signers = [signer1, signer2];
sendForSign.enableSigningOrder = true;

const result = documentApi.sendDocument(sendForSign);

In conclusion, by setting EnableSigningOrder to true and configuring the SignerOrder property accordingly, you can effectively enable signers to sign documents in a predetermined sequence.

After executing the above code, the document will be created, and an email will be sent to the first signer. Once the first signer completes the signing process, an email will be sent to the next signer based on the signer order.