1

我使用带有单个模板、角色、选项卡等的 docusign API 取得了很大的成功......我的用例现在是:

1) 有一个包含多个服务器模板的信封

2) 两个服务器模板的角色相同

3) 但是,每个模板的每个角色可能有不同的选项卡

通过阅读 Docusign API 和反复试验,我已经接近了,但在这里无法越过终点线。这是我当前的 JSON:

accountId = 414772
baseUrl = https://demo.docusign.net/restapi/v2/accounts/414772
{
    "accountId": "414772",
    "emailSubject": "DocuSign API - Signature Request from Template",
    "compositeTemplates": [
        {
            "serverTemplates": [
                {
                    "sequence": 1,
                    "templateId": "F42C617E-0C61-4A98-944E-F9CAA0AE55D9"
                }
            ],
            "inlineTemplates": [
                {
                    "sequence": 2,
                    "recipients": {
                        "signers": [
                            {
                                "recipientId": 1,
                                "email": "reirealtor@mailinator.com",
                                "name": "REI Realtor",
                                "roleName": "Realtor",
                                "tabs": {
                                    "textTabs": [
                                        {
                                            "tabLabel": "\\*header_address",
                                            "value": "SOME TEST INFO GOES HERE"
                                        },
                                        {
                                            "tabLabel": "Address",
                                            "value": "123 REally Cool St"
                                        }
                                    ]
                                }
                            },
                            {
                                "recipientId": 2,
                                "email": "reibuyer@mailinator.com",
                                "name": "John Doe",
                                "roleName": "Client"
                            }
                        ]
                    }
                }
            ]
        },
        {
            "serverTemplates": [
                {
                    "sequence": 1,
                    "templateId": "47F5C07B-016C-4E6D-B31D-DCEF9AEAAA69"
                }
            ],
            "inlineTemplates": [
                {
                    "sequence": 2,
                    "recipients": {
                        "signers": [
                            {
                                "recipientId": 1,
                                "email": "reirealtor@mailinator.com",
                                "name": "REI Realtor",
                                "roleName": "Realtor",
                                "tabs": {
                                    "textTabs": [
                                        {
                                            "tabLabel": "\\*header_address",
                                            "value": "SOME TEST INFO GOES HERE"
                                        },
                                        {
                                            "tabLabel": "Some Other Tab",
                                                "value": "Populate some text here"
                                        }
                                    ]
                                }
                            },
                            {
                                "recipientId": 2,
                                "email": "reibuyer@mailinator.com",
                                "name": "John Doe",
                                "roleName": "Client"
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "status": "sent"
}

所以显然这不起作用,但我真的没有得到任何反馈,为什么,Docusign 只是没有回复。我已将其缩小到第四个签名者块

"recipientId": 2,
"email": "reibuyer@mailinator.com",
"name": "John Doe",
"roleName": "Client"

如果我删除这个块,它会创建信封并发送它,但是我的第二个模板没有签名块。我怀疑我一开始就做错了。

有任何想法吗?

4

1 回答 1

4

我认为您真正的问题是序列和 ID 上的数字与字符串。我将在今天晚些时候使用您的 JSDON 模拟一个 POST,但同时这里有一个有效的示例供您查看:

{
        "emailSubject": "Test 3",
        "emailBlurb": "Using two templates from composite template structure",
               "brandId" : "f8c86e34-722e-4360-a9a0-54647bcd3004",
        "status": "created",   
        "compositeTemplates": [{
               "serverTemplates": [{
                       "sequence": "1",
                       "templateId": "6E558133-112C-434E-BF84-7C4DF340F042"
               }],
               "inlineTemplates": [{
                       "sequence": "1",
                       "recipients": {
                              "signers": [{
                                      "email": "David.grigsby@docusign.com",
                                      "name": "David W. Grigsby",
                                      "recipientId": "1",
                                      "roleName": "Role",
                                      "tabs": {
                                             "textTabs": [{
                                                     "value": "David Grigsby",
                                                     "tabLabel": "name"
                                             },
                                             {
                                                     "value": "David",
                                                     "tabLabel": "first_name"
                                             }]
                                      }
                              }]
                       }
               }]
        },
        {
               "serverTemplates": [{
                       "sequence": "2",
                       "templateId": "12C8894E-505C-480F-92FF-245DC387AD34"
               }],
               "inlineTemplates": [{
                       "sequence": "2",
                       "recipients": {
                              "signers": [{
                                      "email": "David.grigsby@docusign.com",
                                      "name": "David W. Grigsby",
                                      "recipientId": "1",
                                      "roleName": "Role",
                                      "tabs": {
                                             "textTabs": [{
                                                     "value": "David W. Grigsby",
                                                     "tabLabel": "name"
                                             },
                                             {
                                                     "value": "Grigsby",
                                                     "tabLabel": "last_name"
                                             }]
                                      }
                              }]
                       }
               }]
        }]
}
于 2014-03-06T15:35:29.467 回答