我使用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"
如果我删除此块,它会创建信封并发送它,但是我的第二个模板没有签名块。我怀疑我开始时只是做错了。
有什么想法吗?
答案 0 :(得分:4)
我认为你真正的问题是数字vs序列和ids上的字符串。我今天晚些时候会用你的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"
}]
}
}]
}
}]
}]
}