-->

Pre-populating Template Tabs with REST API

2019-07-22 15:11发布

问题:

Trying to pre-populate some fields before sending an envelope using a template in my account, but when the signer/recipient receives the link to the document in their email, the fields are left blank. Here's a portion of the JSON I'm using to make the request in the API:

var body = JSON.stringify({
  "emailSubject": "DocuSign API call - Request Signature",
  "templateId": templateId,
  "templateRoles": [{
  "email": recipientEmail,
  "name": recipientName,
  "roleName": templateRoleName,
  "tabs": {
    "companyTabs": [
     {
      "tabLabel": "\\*SignerCompany",
      "value": recipientCompany
     },
    ],
    "titleTabs": [
     {
      "tabLabel": "\\*SignerTitle",
      "value": recipientTitle
     }
    ]
   }
  }],
  "status": "sent", ....

So the company and title tabs with the labels "SignerCompany" and "SignerTitle" aren't being pre-filled for the recipient. I've tried changing font colors and other things and those seem to work, but somehow the value just doesn't.

I've viewed many similar problems with trying to pre-populate these templates but haven't been able to figure it out. Any help is much appreciated!

回答1:

This was just asked (and answered) in another recent Stack Overflow post. The issue is that you can not set the company and title tabs in particular (they are read-only).

The system populates their data based on the user's account profile, so if no profile or no data in their profile they'll show up as blank as you're seeing.

See this post for a more detailed answer: https://stackoverflow.com/a/38009218/1968395



标签: docusignapi