首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >DocuSign接口:自定义字段填充

DocuSign接口:自定义字段填充
EN

Stack Overflow用户
提问于 2018-02-07 04:28:25
回答 2查看 1.7K关注 0票数 1

我对“选项卡”和“自定义字段”之间的区别感到困惑,也许--

当我将json发送到DocuSign API的baseURL/envelopes,请求API发送带有模板的信封时,它工作得很好:

代码语言:javascript
复制
{ "accountId": "xxx",
   "status": "sent",
   "emailSubject": "Please sign this document",
   "emailBlurb": "Here's a document for you to sign",
   "templateId": "xxxx",
   "templateRoles": [
        {
            "email": "test@email.com",
            "name": "Test Person",
            "roleName": "parent_signer" }] }

当我尝试为自定义字段填充添加参数时,我得到一个400错误:

代码语言:javascript
复制
{ "accountId": "xxx",
   "status": "sent",
   "emailSubject": "Please sign this document",
   "emailBlurb": "Here's a document for you to sign",
   "templateId": "xxxx",
   "templateRoles": [
        {
            "email": "test@email.com",
            "name": "Test Person",
            "tabs": [
               { "textTabs":
                  [
                     {"tabLabel": "Doc_Name",
                      "name": "Doc_Name",
                      "value": "Doc Name Data Would Go Here"}
                  ]
               }
            ],
            "roleName": "parent_signer" }] }

我的模板中的单个文档包含具有这些名称的自定义字段。https://imgur.com/z519zm3

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-02-07 07:59:32

您需要指定需要在其中显示选项卡的文档和页面。在JSON中,它将如下所示:

代码语言:javascript
复制
"textTabs": [
    {
        "tabLabel": "Doc_Name",
        "name": "Doc_Name",
        "value": "Doc Name Data Would Go Here",
        "DocumentId": "123",
        "PageNumber": "1"
    }
票数 1
EN

Stack Overflow用户

发布于 2018-12-29 03:29:19

"tabs“不是数组。这里有一个docusign示例:https://developers.docusign.com/esign-rest-api/guides/features/templates

你的代码应该是这样的:

代码语言:javascript
复制
    ...
    "templateRoles": [             // is an array
        {
            "email": "test@email.com",
            "name": "Test Person",
            "tabs": {              // is not an array (an object)
                "textTabs": [      // is an array (of objects)
                    {
                        "tabLabel": "Doc_Name", // should match Template "Data Label"
                        "name": "Doc_Name", // this field is unnecessary
                        "value": "Doc Name Data Would Go Here"
                    }
                ] // , other arrays of tabs like checkboxTabs may go here as well
            }
            "roleName": "parent_signer" }] }
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48651431

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档