Common API Tasks🐈: Request a signature from an in-person signer

Common API Tasks: Request a signature from an in-person signer

Welcome to a spectacular new edition of the CAT🐈 (Common API Tasks) blog series. The CAT blogs provide all you need to complete small, specific, SDK-supported tasks using one of our APIs. You can find all articles in this series on the DocuSign Developer Blog. 

In this edition I’m going to discuss DocuSign support for in-person signers and how you can use this feature in your integrations. First, let’s review what an in-person signer is, and what it is good for. In many real-life situations, the signer of the envelope is not the same person that uses a device and is able to immediately start a signing session. For example, say you’re going snorkeling, and you need to sign a waiver. You’re standing there in the dive shop ready to plunge into the ocean, so understandably you don’t have your laptop or even your phone on you. The store manager does, but she is not the one that needs to sign. She will act as your host for this transaction: she will receive the envelope and then give you her tablet so you can sign on her tablet. Note the terminology, because it’s important. One person is the host, and the host must be available to receive the envelope via either remote signing (email) or embedded signing. The host’s email address must be provided in any case. The signer is a different person: for the signer, you only need to provide their name. You can provide their email address, too, if you know it; but it’s optional.

Let’s do our usual round of code snippets. These only show the code necessary to create the Recipients object. To send a valid envelope, you will still need to have one or more documents, as well as tabs and a subject line.  (see How to request a signature by email for code examples)

C#

InPersonSigner inPersonSigner = new InPersonSigner
{
  HostEmail = "host@domain.com",
  HostName = "Heather Host",
  Email = "signer@domain.com", // Optional
  Name = "Sue Signer",
  RecipientId = "1",
  ClientUserId = "1001", // Optional; specifying a ClientUserId means no email message will be sent to the host
  RoutingOrder = "1",
};

Recipients recipients = new Recipients
{
  InPersonSigners = new List<InPersonSigner> { inPersonSigner }
};

Java

InPersonSigner inPersonSigner = new InPersonSigner();
inPersonSigner.setHostEmail("host@domain.com");
inPersonSigner.setHostName("Heather Host");
inPersonSigner.setEmail("signer@domain.com"); // Optional
inPersonSigner.setName("Sue Signer");
inPersonSigner.setRecipientId("1");
inPersonSigner.setClientUserId("1001"); // Optional; specifying a ClientUserId means no email message will be sent to the host
inPersonSigner.setRoutingOrder("1");

Recipients recipients = new Recipients();
recipients.setInPersonSigners(Arrays.asList(inPersonSigner));

Node.js

let inPersonSigner = docusign.InPersonSigner.constructFromObject({
hostEmail : 'host@domain.com',
hostName : 'Heather Host',
email : 'signer@domain.com', // Optional
name : 'Sue Signer',
recipientId : '1',
clientUserId : '1001', // Optional; specifying a clientUserId means no email message will be sent to the host
routingOrder : '1',
});

let recipients = docusign.Recipients.constructFromObject({
inPersonSigners: [inPersonSigner],
});

PHP

$in_person_signer = new Signer([
  'host_email' => 'host@domain.com',
  'host_name' => 'Heather Host',
  'email' => 'signer@domain.com', # Optional
  'name' => 'signer_name', 
  'recipient_id' => "1", 
  'client_user_id' => '1001', # Optional; specifying a client_user_id means no 
  'routing_order' => "1"
]);

$recipients = new Recipients(['in_person_signers' => [$in_person_signer]);

Python

in_person_signer = InPersonSigner(
    host_email="host@domain.com",
    host_name="Heather Host",
    email="signer@domain.com",  # Optional
    name="Sue Signer",
    recipient_id="1",
    client_user_id="1001",  # Optional; specifying a client_user_id means no email message will be sent to the host
    routing_order="1",
)

recipients = Recipients(in_person_signers=[in_person_signer])

Ruby

in_person_signer = DocuSign_eSign::in_person_signer.new
in_person_signer.host_email = 'host@domain.com'
in_person_signer.host_name = 'Heather Host'
in_person_signer.email = 'signer@domain.com' # Optional
in_person_signer.name = 'Sue Signer'
in_person_signer.recipient_id = '1'
in_person_signer.client_user_id = '1001' # Optional; specifying a client_user_id means no email message will be sent to the host
in_person_signer.routing_order = '1'

recipients = DocuSign_eSign::Recipients.new( inPersonSigners: [inPersonSigners] )

Additional resources

Inbar Gazit
Author
Inbar Gazit
Sr. Manager, Developer Content
Published