Docusign API-创建信封,应用模板,预填充值 [英] Docusign API - Create envelope, apply template, prefill values

查看:59
本文介绍了Docusign API-创建信封,应用模板,预填充值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

许多问题解决了我的部分要求,但是我似乎无法完成一个完整的解决方案.我在网站上创建了一个模板(它具有各种文本字段,初始字段和签名块).单个收件人,对这些字段使用锚标记.当我获取一个.docx文件时,请通过api创建一个信封,我要应用前面提到的模板,然后在文档/模板上预填充4个文本字段.

Many questions address portions of my request, but I cannot seem to make a complete solution work. I have created a template on my site (it has various text fields, initial fields, and signature block). Single recipient, using anchor tags for the fields. When I take a .docx file, create an envelope via the api, I want to apply the template previously mentioned, and then prefill 4 text fields on the document/template.

锚标记未正确放置字段.

Anchor tags are not placing the fields appropriately.

有什么建议/建议吗?

工作请求呼叫是:

{
"documents": 
   [
   {
  "documentBase64":"<BASE64STREAM>",
  "documentId":"3",
  "fileExtension":"docx",
  "name":"10001000_20170803_FILE"
  }
   ],
   "emailSubject": "TEST - Group Audit - 10001000",
   "templateId": "TEMPLATE_ID",
   "templateRoles" : 
   [
  {
  "email": "JDOE@email.com",
  "name": "JOHN DOE",
  "roleName": "signer1",
  "tabs": 
     {
     "textTabs": 
        [
           {
           "documentId": "3",
           "recipientId": "1",
           "tabLabel": "groupname",
           "value": "TEST GROUP ONE"
           },
           {
           "documentId": "3",
           "recipientId": "1",
           "tabLabel": "groupnumber",
           "value": "10001000"
           },
           {
           "documentId": "3",
           "recipientId": "1",
           "tabLabel": "txt",
           "value": "my@email.com"
           },
           {
           "documentId": "3",
           "recipientId": "1",
           "tabLabel": "fein",
           "value": "870142380"
           },
           {
           "documentId": "3",
           "recipientId": "1",
           "tabLabel": "physicaladdress",
           "value": "1 STREET WAY, , MY CITY, CA,  98001"
           }
        ]
     }
  }
],
   "status":"sent"
}

推荐答案

根据您提供的信息,我了解您的情况如下:

Based on the information you've provided, I understand your scenario to be as follows:

  • 您已经通过DocuSign UI创建了一个模板;该模板包含一个占位符"文档(您将在运行时通过 Create/Send Envlope API调用替换该文档),并定义该文档的收件人和标签.

  • You've created a template via the DocuSign UI; that template contains a 'placeholder' document (which you will replace at run-time via your Create/Send Envlope API call) and defines the recipient(s) and tabs for that document.

通过API创建/发送信封时,您希望将文档指定为API请求的一部分(即用于代替DocuSign模板所包含的占位符"文档)并自动-填充模板定义的某些标签.

When you create/send the envelope via API, you want to specify the document as part of the API request (i.e., to be used instead of the 'placeholder' document that the DocuSign template contains) and also auto-populate some of the tabs that the template defines.

如果这是对您要实现的目标的准确描述,则需要在API请求结构中使用复合模板.这是一个 Create/Send Envelope JSON请求的示例,该请求使用复合模板(并包含基于您在问题中提供的信息的数据):

If that's an accurate description of what you're trying to achieve, then you need to use Composite Templates in the API request structure. Here's an example of a Create/Send Envelope JSON request that uses composite templates (and contains data based upon the information you provided in your question):

{
  "compositeTemplates": [
    {
      "serverTemplates": [
        {
          "sequence": "1",
          "templateId": "TEMPLATE_ID"
        }
      ],
      "inlineTemplates": [
        {
          "sequence": "2",
          "recipients": {
            "signers": [
              {
                "name": "JOHN DOE",
                "email": "JDOE@email.com",
                "roleName": "signer1",
                "tabs":
                  {
                      "textTabs":[
                        {
                            "tabLabel" : "groupname",
                            "value" : "TEST GROUP ONE" 
                        },
                        {
                            "tabLabel" : "groupnumber",
                            "value" : "10001000" 
                        },
                        {
                            "tabLabel" : "txt",
                            "value" : "my@email.com" 
                        },
                        {
                            "tabLabel" : "fein",
                            "value" : "870142380" 
                        },
                        {
                            "tabLabel" : "physicaladdress",
                            "value" : "1 STREET WAY, , MY CITY, CA,  98001" 
                        }
                      ]
                  }                 
              }
            ]
          }
        }
      ],
      "document": {
        "documentId": "3",
        "name": "10001000_20170803_FILE.docx",
        "fileExtension": "docx",
        "documentBase64": "BASE64STREAM"
      }
    }
  ],
  "status": "sent",
  "emailSubject": "TEST - Group Audit - 10001000"
}

这篇关于Docusign API-创建信封,应用模板,预填充值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆