RecipientId get changed by docusign - docusignapi

I am creating envelope using DocuSign API. While creating envelope I am also passing list of signers and also set my own unique "RecipientId" (GUID) for each signers. But when envelope gets created and checking the list of recipients(signers) and found that recipient id gets changed all time. It is not "RecipientId" which I am passing.
Can you help me how can we set own "RecipientId" while creating envelope?
-- Create envelope request
{ "documents": [{
"documentBase64": "<Base64BytesHere>",
"documentId": "1",
"fileExtension": "pdf",
"name": "lite"
}],
"emailSubject": "test recipient 2",
"recipients": { "signers": [ { "email": "xxx.yyy#xxx.com",
"name": "xxx yyy",
"recipientId": "1"
} ]
},
"status": "sent"
}
-- Web hook Response see recipient Id --
<DocuSignEnvelopeInformation><EnvelopeStatus>
<RecipientStatuses>
<RecipientStatus>
<Type>Signer</Type>
<Email>xxx.yyy#abc.com</Email>
<UserName>xxx yyy</UserName>
<RoutingOrder>1</RoutingOrder>
<Sent>2017-08-29T02:13:33.853</Sent>
<DeclineReason xsi:nil="true"/>
<Status>Sent</Status>
<RecipientIPAddress/>
<CustomFields/>
<AccountStatus>Active</AccountStatus>
<RecipientId>011eac75-f2fa-4f57-94df-5aedaxxxxxxx</RecipientId>
</RecipientStatus>
</RecipientStatuses>
....
<DocuSignEnvelopeInformation><EnvelopeStatus>

Another way around this is to use recipient.customFields. It's an array of strings:
someEnvelopeSigner.customFields = [yourUUID, somethingElse]
In the webhook / event notification, it will come through in DocuSignEnvelopeInformation.EnvelopeStatus[0].RecipientStatuses[0].RecipientStatus[i].CustomFields and look something like (in JSONified form)
{
"CustomFields": [{
"CustomField": [
"6e45cb20-3953-11ea-b02d-dedef9da77b9",
"something else!"
]
}],
}

You can specify a unique recipientId for each recipient while creating an envelope.
Here is a sample CreateEnvelope request
POST /v2/accounts/{accountId}/envelopes
Json Payload.
{
"emailSubject": "Please sign the agreement",
"status": "sent",
"recipients": {
"signers": [
{
"email": "janedoe#acme.com",
"name": "jane doe",
"recipientId": 1,
"routingOrder": 1,
"tabs": {
"signHereTabs": [
{
"documentId": "1", "pageNumber": "1", "xPosition": "80", "yPosition": "80"
}
]
}
},
{
"email": "johnsmith#acme.com",
"name": "john smith",
"recipientId": 2,
"routingOrder": 2,
"tabs": {
"signHereTabs": [
{
"documentId": "1", "pageNumber": "1", "xPosition": "80", "yPosition": "180"
}
]
}
}
]
},
"documents": [
{
"documentId": "1",
"name": "Contract",
"fileExtension": "txt",
"documentBase64": "RG9jIFRXTyBUV08gVFdP"
}
]
}
Use the listEnvelopeRecipients api to retrieve the list of recipients in the envelope.
{
"signers": [
{
"creationReason": "sender",
"isBulkRecipient": "false",
"name": "jane doe",
"email": "janedoe#acme.com",
"recipientId": "1",
"recipientIdGuid": "98d60cc3-5f67-46e4-9fc0-ca6bb519f1c9",
"requireIdLookup": "false",
"userId": "585b8733-b1a9-4329-87e7-4f20bcde00c2",
"routingOrder": "1",
"status": "sent"
},
{
"creationReason": "sender",
"isBulkRecipient": "false",
"name": "john smith",
"email": "johnsmith#acme.com",
"recipientId": "2",
"recipientIdGuid": "726bd54d-89ed-41ba-a751-fdb129894b8b",
"requireIdLookup": "false",
"userId": "45abe022-ae12-4816-8c42-fd66d207807a",
"routingOrder": "2",
"status": "created"
}
],
"agents": [],
"editors": [],
"intermediaries": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"inPersonSigners": [],
"recipientCount": "2",
"currentRoutingOrder": "1"
}

Related

DocuSign: recipient signerAttachmentTabs inappropriately replicated

I'm trying to create an envelope using DocuSign REST API. The signature tabs are generated by converting the PDF signature fields, and a signerAttachment tab is added manually.
In the final envelope, there is (as expected) only one signHere tab, but three overlapping signerAttachment tabs, which must be acted upon (read: upload a file) before the envelope can be effectively signed.
Case details
The envelope has 2 documents, one of which has signature tabs generated by transforming PDF fields. There are two recipients, one signer and one "Carbon Copy". The signer, before completing the envelope, must upload an additional document, so I added a signerAttachmentTab.
The JSON sent to the API endpoint /restapi/v2.1/accounts/{accountId}/envelopes follows (null values omitted and sensitive information redacted):
{
"compositeTemplates": [
{
"compositeTemplateId": "0",
"document": {
"documentBase64": "(redacted)",
"documentId": "1",
"fileExtension": "pdf",
"name": "Summary",
"transformPdfFields": "true"
},
"inlineTemplates": [
{
"envelope": {
"emailBlurb": "Just a test for development. Ignore this message",
"emailSubject": "from unit-test 01"
},
"recipients": {
"carbonCopies": [
{
"email": "john.doe#company.com",
"name": "John Doe",
"recipientId": "00283187",
"roleName": "CCOPY",
"routingOrder": "1"
}
],
"signers": [
{
"email": "jane.dee#company.com",
"name": "Jane Dee",
"recipientId": "00283183",
"recipientSignatureProviders": [
{
"signatureProviderName": "(redacted)",
"signatureProviderOptions": {
"sms": "+000-000-000"
}
}
],
"roleName": "SIGNER",
"routingOrder": "1",
"tabs": {
"signerAttachmentTabs": [
{
"xposition": "10",
"yposition": "10",
"documentId": "3",
"name": "Attachment",
"pageNumber": "1",
"recipientId": "00283183",
"tabLabel": "Attach-document",
"tooltip": "SignerAttachment",
"xPosition": "10",
"yPosition": "10"
}
],
"signHereTabs": [
{
"anchorAllowWhiteSpaceInCharacters": "true",
"recipientId": "00283183",
"tabLabel": "firmatario_00283183\\*"
}
]
},
"userId": "00283183"
}
]
},
"sequence": "1"
}
]
},
{
"compositeTemplateId": "1",
"document": {
"documentBase64": "(redacted)",
"documentId": "2",
"fileExtension": "pdf",
"name": "sample0",
"transformPdfFields": "true"
},
"inlineTemplates": [
{
"customFields": {
},
"envelope": {
"emailBlurb": "Just a test for development. Ignore this message",
"emailSubject": "from unit-test 01"
},
"recipients": {
"carbonCopies": [
{
"email": "john.doe#company.com",
"name": "John Doe",
"recipientId": "00283187",
"roleName": "CCOPY",
"routingOrder": "1"
}
],
"signers": [
{
"email": "jane.dee#company.com",
"name": "Jane Dee",
"recipientId": "00283183",
"recipientSignatureProviders": [
{
"signatureProviderName": "(redacted)",
"signatureProviderOptions": {
"sms": "+000-000-000"
}
}
],
"roleName": "SIGNER",
"routingOrder": "1",
"tabs": {
"signerAttachmentTabs": [
{
"xposition": "10",
"yposition": "10",
"documentId": "3",
"name": "Attachment",
"pageNumber": "1",
"recipientId": "00283183",
"tabLabel": "Attach-document",
"tooltip": "SignerAttachment",
"xPosition": "10",
"yPosition": "10"
}
],
"signHereTabs": [
{
"anchorAllowWhiteSpaceInCharacters": "true",
"recipientId": "00283183",
"tabLabel": "firmatario_00283183\\*"
}
]
},
"userId": "00283183"
}
]
},
"sequence": "2"
}
]
},
{
"compositeTemplateId": "2",
"document": {
"documentBase64": "(redacted)",
"documentId": "3",
"fileExtension": "pdf",
"name": "sample1",
"transformPdfFields": "true"
},
"inlineTemplates": [
{
"envelope": {
"emailBlurb": "Just a test for development. Ignore this message",
"emailSubject": "from unit-test 01"
},
"recipients": {
"carbonCopies": [
{
"email": "john.doe#company.com",
"name": "John Doe",
"recipientId": "00283187",
"roleName": "CCOPY",
"routingOrder": "1"
}
],
"signers": [
{
"email": "jane.dee#company.com",
"name": "Jane Dee",
"recipientId": "00283183",
"recipientSignatureProviders": [
{
"signatureProviderName": "(redacted)",
"signatureProviderOptions": {
"sms": "+000-000-000"
}
}
],
"roleName": "SIGNER",
"routingOrder": "1",
"tabs": {
"signerAttachmentTabs": [
{
"xposition": "10",
"yposition": "10",
"documentId": "3",
"name": "Attachment",
"pageNumber": "1",
"recipientId": "00283183",
"tabLabel": "Attach-document",
"tooltip": "SignerAttachment",
"xPosition": "10",
"yPosition": "10"
}
],
"signHereTabs": [
{
"anchorAllowWhiteSpaceInCharacters": "true",
"recipientId": "00283183",
"tabLabel": "firmatario_00283183\\*"
}
]
},
"userId": "00283183"
}
]
},
"sequence": "3"
}
]
}
],
"notification": {
"expirations": {
"expireAfter": "2",
"expireEnabled": "true"
}
},
"status": "sent",
"transactionId": "55909b0d-b54f-454e-b966-e58ca5fb4e7e"
}
The envelope definition has been written following the guidelines by DocuSign, namely by inserting a composite template for each document and assigning the recipients to each one of them.
Now, I expect that, despite the same recipients being declared three times (one for each document), they will be merged in the final envelopes, as per this quote from the same page:
When you use multiple templates to create an envelope, two or more templates may define the same recipient (a recipient with the same role or even the same name as other recipients), creating duplicate recipients. You can automatically merge these duplicate recipients by making sure that each of these duplicate recipients has the same email, user name, and routing order. In this case, any duplicate recipients are merged together after all template overlays have been applied.
What I observe is that, in the final envelope, there is -- as expected -- only one signature field, but three overlapping signerAttachment field. Therefore, the signer has to upload the same file three times to complete the envelope.
A call to the endpoint /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs confirms the presence of three similar tabs:
{
"signHereTabs": [
{
"stampType": "signature",
"isSealSignTab": "false",
"name": "SignHere",
"tabLabel": "firmatario_00283183_Firma consulenza_001",
"scaleValue": "1",
"optional": "false",
"documentId": "3",
"recipientId": "1",
"pageNumber": "1",
"xPosition": "391",
"yPosition": "719",
"width": "0",
"height": "0",
"tabId": "2cee0f3e-a2bb-4aae-a5b4-82c66b177c0a",
"tabType": "signhere"
}
],
"signerAttachmentTabs": [
{
"name": "Attachment",
"tabLabel": "Attach-document",
"scaleValue": "1",
"optional": "false",
"documentId": "3",
"recipientId": "1",
"pageNumber": "1",
"xPosition": "10",
"yPosition": "10",
"width": "0",
"height": "0",
"tabId": "a67c3071-6ac4-4c3b-a20c-0197cda091ed",
"tabType": "signerattachment",
"tooltip": "SignerAttachment"
},
{
"name": "Attachment",
"tabLabel": "Attach-document",
"scaleValue": "1",
"optional": "false",
"documentId": "3",
"recipientId": "1",
"pageNumber": "1",
"xPosition": "10",
"yPosition": "10",
"width": "0",
"height": "0",
"tabId": "c20809de-3792-4ff7-ab31-6f09a13f3fbc",
"tabType": "signerattachment",
"tooltip": "SignerAttachment"
},
{
"name": "Attachment",
"tabLabel": "Attach-document",
"scaleValue": "1",
"optional": "false",
"documentId": "3",
"recipientId": "1",
"pageNumber": "1",
"xPosition": "10",
"yPosition": "10",
"width": "0",
"height": "0",
"tabId": "1d0c84cd-6511-47c2-a75f-73721ac2fb0f",
"tabType": "signerattachment",
"tooltip": "SignerAttachment"
}
]
}
Why the signerAttachment tabs are not merged like the signHere tabs and what can be done to merge them in the resulting envelope?
I believe the issue is that in the case of the SignHere tab, your InLineTemplate is not creating the SignHere tabs, it is providing/updating the settings for the existing tab where the tabLabel is "firmatario_00283183"
(The tab is existing because it was created as part of the PDF transformation.)
In contrast, your three definitions for the SignerAttachment tabs are each creating new tabs. So you're seeing the three new SignerAttachment tabs on the document.
Solution: only create as many SignerAttachment tabs as you want. There is no merging (supression) of tabs, just merging of the Recipients.
I will admit that I'm not a gonzo expert on CompositeTemplates. But I think I'm on reasonably firm ground here.
Each signerAttachmentTab specified in each compositeTemplate has specified the same document for placement - "documentId": "3", so each of your composites is placing a new signer attachment tab to the same document, ID 3. If you only want one signer attachment, only specify it in the requisite composite. For documentId = 3, that would be your third composite. If you want an attachment tab on each document, then make sure you specify the correct documentId.

DocuSign UNKNOWN_ENVELOPE_RECIPIENT Getting Error While all fields i made correct

I am using PHP as language using Raw API.
When Creating envelope i m posting following JSON Code.
{
"compositeTemplates": [
{
"compositeTemplateId": "b55d12e6-d82b-445c-910e-7e04a4480a82",
"serverTemplates": [
{
"templateId": "b55d12e6-d82b-445c-910e-7e04a4480a82",
"sequence": "1"
}
]
}
],
"recipients": {
"signers": [
{
"clientUserId": "1001",
"email": "dev#gmail.com",
"tabs": {
"emailTabs": [
{
"anchorXOffset": "429",
"anchorYOffset": "309",
"value": "dev#gmail.com",
"recipientId": "1"
}
],
"textTabs": [
{
"anchorXOffset": "429",
"anchorYOffset": "309",
"name": "Job Title",
"value": "JobTitleValue",
"recipientId": "1"
}
],
"fullNameTabs": [
{
"anchorXOffset": "37",
"anchorYOffset": "165",
"recipientId": "1",
"value": "Signer One"
}
]
},
"name": "Signer One",
"recipientId": "1",
"routingOrder": "1",
"roleName": "WebUser"
}
]
},
"sender": {
"accountId": "-------"
},
"status": "sent"
}
But when i m calling recipient view API i m getting this "UNKNOWN_ENVELOPE_RECIPIENT" ERROR.
JSON data when calling API.
{
"authenticationMethod": "email",
"clientUserId": "1001",
"email": "dev#gmail.com",
"recipientId": "1",
"returnUrl": "-----",
"userName": "Signer One"
}
Also When i m calling get list on envelope recipient list
"signers": [
{
"creationReason": "sender",
"canSignOffline": "true",
"isBulkRecipient": "false",
"recipientSuppliesTabs": "true",
"requireUploadSignature": "false",
"name": "Rakesh Jangid",
"firstName": "",
"lastName": "",
"email": "rakesh#crystaltechesolutions.com",
"recipientId": "1",
"routingOrder": "1",
"note": "",
"roleName": "Owner",
"status": "delivered",
"completedCount": "0",
"deliveredDateTime": "2021-06-23T09:22:23.3800000Z",
"deliveryMethod": "email",
"recipientType": "signer"
}
],
"agents": [],
"editors": [],
"intermediaries": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"inPersonSigners": [],
"seals": [],
"witnesses": [],
"notaries": [],
"recipientCount": "1",
"currentRoutingOrder": "1"
}
can any one help me to get Receipent View links from API.
"clientUserId": "1001"
This line has to also be on the recipient/signer, not just when requesting the recipient view.
So add this:
"name": "Signer One",
"recipientId": "1",
"routingOrder": "1",
"roleName": "WebUser",
"clientUserId": "1001"

Use PDF FormFields in enveloppe

I need to use PdfFormField in an enveloppe, with 2 signers.
I use a dummy pdf file with only 1 field, but I can't get DocuSign to fill it.
Is there any special way to address it ?
Can you tell me what is wrong in my json ?
Here is the json sent :
{
"emailSubject": "Dummy",
"status": "sent",
"documents": [
{
"documentId": "1",
"name": "dummy.pdf",
"documentBase64": "...",
"transformPdfFields": "true",
"recipients": {
"signers": [
{
"recipientId": "1",
"tabs": {
"textTabs": [
{
"documentId": "1",
"pageNumber": "1",
"recipientId": "1",
"tabLabel": "acq-civ",
"value": "aaaaaaaaaaaaaa",
"required": "true"
}
]
}
},
{
"recipientId": "2"
}
]
}
}
],
"recipients": {
"signers": [
{
"recipientId": "1",
"roleName": "buyer",
"firstname": "Firstname",
"lastname": "Lastname",
"name": "Full Name",
"email": "email#gmail.com",
"routingOrder": 1
},
{
"recipientId": "2",
"roleName": "owner",
"name": "Full Name2",
"email": "email2#gmail.com",
"routingOrder": 2
}
]
}
}
I finally managed to do it using compositeTemplates. Simple documents structure doesn't allow form field manipulation after transformation

How to manage visibility settings in Composite Envelope

I am trying to work with visibility settings in a workflow using the docusign api. The workflow consists of two inline templates and I want to restrict it so a signer cannot see 1 document in the second inline template. Here is the json being sent to DocuSign:
{
"compositeTemplates": [
{
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": ,
"name": ,
"recipientId": "2",
"roleName": "High School Faculty"
},
{
"email": ,
"name": ,
"recipientId": "3",
"roleName": "High School Administration"
},
{
"email": ,
"name": ,
"recipientId": "4",
"roleName": "Department Dean"
},
{
"documentVisibility": [
{
"documentId": "2",
"recipientId": "5",
"visible": "false"
}
],
"email": ,
"name": ,
"recipientId": "5",
"roleName": "Department Faculty"
}
]
},
"sequence": "1"
}
],
"serverTemplates": [
{
"sequence": "1",
"templateId": "900cc73b-f35c-45b1-92d1-e8453094aa60"
}
]
},
{
"inlineTemplates": [
{
"documents": [
{
"documentBase64": <data>,
"documentId": "1",
"fileExtension": "docx",
"name": "Packet"
},
{
"documentBase64": <data>,
"documentId": "2",
"fileExtension": "docx",
"name": "Packet"
}
],
"recipients": {
"signers": [
{
"email": ,
"name": ,
"recipientId": "2",
"roleName": "High School Faculty"
},
{
"email": ,
"name": ,
"recipientId": "3",
"roleName": "High School Administration"
},
{
"email": ,
"name": ,
"recipientId": "4",
"roleName": "Department Dean"
},
{
"documentVisibility": [
{
"documentId": "2",
"recipientId": "5",
"visible": "false"
}
],
"email": ,
"name": ,
"recipientId": "5",
"roleName": "Department Faculty"
}
]
},
"sequence": "2"
}
]
}
],
"emailSubject": "College Now Master Form",
"enforceSignerVisibility": "true"
}
When I go through testing the workflow the Department Faculty is still able to view the 2nd Document in the second inline template. I am testing so I am using the same signin for each role, could this be the issue? Can anyone point to what I am doing wrong? We do have visibility turned on for our instance. Thanks!
As per the EnvelopeRecipients docs, you'll want to use the ExcludedDocuments parameter to define it as a part of the Recipient object:
"recipients": {
"signers": [
{
"email": "user#example.com",
"name": "Example Signer",
"recipientId": "2",
"routingOrder":1,
"excludedDocuments":[2],
"tabs": {
"signHereTabs": [
{
"documentId": "1",
"recipientId": "1",
"xPosition": "150",
"yPosition": "150",
"pageNumber":1
}
]
}
}]
}
You'll also want to confirm how your account has Document Visibility configured, as it can be set to exclude the sender alone, or members of the sender's account. If it's set to "unless member of signer's account", testing may be thrown off.

Docusign : create envelope with recipient custom field

I'm trying to create an envelope based on a template and assign a custom field to one of the recipients ("customFields": ["5616999"] , which is the employee ID).
This is my POST REST API:
URI : https://demo.docusign.net/restapi/v2/accounts/{accountid}/envelopes
Payload:
{ "status":"sent",
"emailSubject": "Test with template and custom field",
"templateId": "447e6671-74d1-45ce-bf3b-aa7a5c235ea5", "documents": [{ "documentId": "25407849", "name": "testTemplateDoc2.pdf", "documentBase64": " my base64 string of the document"}],
"templateRoles": [{
"email": "test#gmail.com",
"name": "john doe",
"recipientId": "10501840",
"roleName": "RH",
"routingOrder": "1",
"emailNotification": {
"emailBody": "text12808",
"emailSubject": "Signez ce document [[Collaborateur_UserName]]",
"supportedLanguage": "fr"
},
"recipientSignatureProviders": [{
"signatureProviderName": "universalsignaturepen_opentrust_hash_tsp",
"signatureProviderOptions": {
"sms": "+33265555555"
}
}
],
"tabs": {
"signHereTabs": [{
"anchorString": "/RH1/",
"anchorUnits": "pixels",
"anchorXOffset": "0",
"anchorYOffset": "0",
"name": "Please sign here",
"optional": "false",
"recipientId": "10501840",
"scaleValue": 1
}
]
}
}, {
"email": "test2#gmail.com",
"name": "jane doe",
"recipientId": "61432066",
"roleName": "Collaborateur",
"routingOrder": "2",
"emailNotification": {
"emailBody": "text2 2808",
"emailSubject": "Signez votre document Mr. [[Collaborateur_UserName]]",
"supportedLanguage": "fr"
},
"recipientSignatureProviders": [{
"signatureProviderName": "universalsignaturepen_opentrust_hash_tsp",
"signatureProviderOptions": {
"oneTimePassword": "1234"
}
}
],
"tabs": {
"signHereTabs": [{
"anchorString": "/S1/",
"anchorUnits": "pixels",
"anchorXOffset": "0",
"anchorYOffset": "0",
"name": "Please sign here",
"optional": "false",
"recipientId": "61432066",
"scaleValue": 1
}
]
},
"customFields": ["5616999"]
}, {
"email": "test3#gmail.com",
"name": "john3 doe3",
"recipientId": "64377607",
"roleName": "Directeur",
"routingOrder": "3",
"emailNotification": {
"emailBody": "text3 2808",
"emailSubject": "consultez le document de Mr. [[Collaborateur_UserName]]",
"supportedLanguage": "fr"
},
"recipientSignatureProviders": [{
"signatureProviderName": "universalsignaturepen_opentrust_hash_tsp",
"signatureProviderOptions": {
"oneTimePassword": "1234"
}
}
]
}
]
}
SO I got a 200 OK and my envelope was created successfully, however the recipient custom field does not appear when I do a simple GET on the envelope.
I think it's not taken into account.
This is my GET URI
https://demo.docusign.net/restapi/v2/accounts/{accountID}/envelopes/{envelopeid}/recipients?include_extended=true&include_tabs=true
this is the result :
{
"signers": [
{
"tabs": {
"signHereTabs": [
{
"stampType": "signature",
"name": "Please sign here",
"tabLabel": "Sign Here",
"scaleValue": 1,
"optional": "false",
"documentId": "1",
"recipientId": "1",
"pageNumber": "1",
"xPosition": "69",
"yPosition": "688",
"anchorString": "/RH1/",
"anchorXOffset": "0",
"anchorYOffset": "0",
"anchorUnits": "pixels",
"tabId": "a3c9e24a-054c-4e39-bb85-ff602c9afd15"
}
]
},
"signInEachLocation": "false",
"creationReason": "sender",
"isBulkRecipient": "false",
"recipientSignatureProviders": [
{
"signatureProviderName": "universalsignaturepen_opentrust_hash_tsp",
"signatureProviderOptions": {
"sms": "+330642037079"
}
}
],
"name": "john doe",
"email": "test#gmail.com",
"recipientId": "1",
"recipientIdGuid": "77e97f08-552e-4e5b-ab0d-1802d72813cf",
"requireIdLookup": "false",
"userId": "0358b4e5-2c64-4d37-a6c2-d9f099ff5071",
"routingOrder": "1",
"note": "",
"roleName": "RH",
"status": "created",
"deliveryMethod": "email",
"templateLocked": "false",
"templateRequired": "false",
"emailNotification": {
"emailSubject": "[BPMED] Signez ce document [[Collaborateur_UserName]]",
"emailBody": "text12808",
"supportedLanguage": "fr"
},
"totalTabCount": "1"
},
{
"tabs": {
"signHereTabs": [
{
"stampType": "signature",
"name": "Please sign here",
"tabLabel": "Sign Here",
"scaleValue": 1,
"optional": "false",
"documentId": "1",
"recipientId": "2",
"pageNumber": "1",
"xPosition": "69",
"yPosition": "264",
"anchorString": "/S1/",
"anchorXOffset": "0",
"anchorYOffset": "0",
"anchorUnits": "pixels",
"tabId": "5bf64798-f22a-4f08-9bfd-da5745c1c0a0"
}
]
},
"signInEachLocation": "false",
"creationReason": "sender",
"isBulkRecipient": "false",
"recipientSignatureProviders": [
{
"signatureProviderName": "universalsignaturepen_opentrust_hash_tsp",
"signatureProviderOptions": {
"oneTimePassword": "1234"
}
}
],
"name": "jane doe",
"email": "test2#gmail.com",
"recipientId": "2",
"recipientIdGuid": "c3de6e46-be6a-4ccf-b939-30c0cd251849",
"requireIdLookup": "false",
"userId": "e0a726f8-a89d-4b86-99fc-153150cd4892",
"routingOrder": "2",
"note": "",
"roleName": "Collaborateur",
"status": "created",
"deliveryMethod": "email",
"templateLocked": "false",
"templateRequired": "false",
"emailNotification": {
"emailSubject": "[BPMED] Signez votre document Mr. [[Collaborateur_UserName]]",
"emailBody": "text2 2808",
"supportedLanguage": "fr"
},
"totalTabCount": "2"
}
],
"agents": [],
"editors": [],
"intermediaries": [],
"carbonCopies": [],
"certifiedDeliveries": [
{
"name": "john3 doe3",
"email": "test3#gmail.com",
"recipientId": "3",
"recipientIdGuid": "b9569f7c-996d-4549-88f6-1e05e9b96ea7",
"requireIdLookup": "false",
"userId": "6f0b5463-3baa-4607-bcc9-1958873c12e2",
"routingOrder": "3",
"note": "",
"roleName": "Directeur",
"status": "created",
"templateLocked": "false",
"templateRequired": "false",
"emailNotification": {
"emailSubject": " consultez le document de Mr. [[Collaborateur_UserName]]",
"emailBody": " text3 2808",
"supportedLanguage": "fr"
},
"totalTabCount": "0"
}
],
"inPersonSigners": [],
"recipientCount": "3"
}
I've tried creating the envelope in draft mode and then making a PUT request to add the custom field, but it didn't work either...
PS: I've successfully created envelopes with recipient custom fields (not based on a template) and it was ok and the recipient custom field was well integrated in the envelope.
You can use DocuSign compositeTemplates and specify the recipient custom fields. Here is an example. templateRoles does not support specifying recipient custom fields
{
"emailSubject": "Test with template and custom field",
"status": "sent",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "447e6671-74d1-45ce-bf3b-aa7a5c235ea5"
}
],
"inlineTemplates": [
{
"sequence": "1",
"recipients": {
"signers": [
{
"email": "test#gmail.com",
"name": "john doe",
"recipientId": "10501840",
"roleName": "RH",
"routingOrder": "1",
"customFields": [ "5616999" ],
"tabs": { },
"emailNotification": { },
"recipientSignatureProviders": { }
}
]
}
}
],
"document": {
"documentId": "25407849",
"name": "testTemplateDoc2.pdf",
"fileExtension": "pdf",
"documentBase64": ""
}
}
]
}

Resources