我对“选项卡”和“自定义字段”之间的区别感到困惑,也许--
当我将json发送到DocuSign API的baseURL/envelopes,请求API发送带有模板的信封时,它工作得很好:
{ "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错误:
{ "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
发布于 2018-02-07 07:59:32
您需要指定需要在其中显示选项卡的文档和页面。在JSON中,它将如下所示:
"textTabs": [
{
"tabLabel": "Doc_Name",
"name": "Doc_Name",
"value": "Doc Name Data Would Go Here",
"DocumentId": "123",
"PageNumber": "1"
}发布于 2018-12-29 03:29:19
"tabs“不是数组。这里有一个docusign示例:https://developers.docusign.com/esign-rest-api/guides/features/templates
你的代码应该是这样的:
...
"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" }] }https://stackoverflow.com/questions/48651431
复制相似问题