Docusign复合模板给出TAB_REFERS_TO_MISSING_DOCUMENT

时间:2016-12-15 16:16:23

标签: docusignapi docusigncompositetmplts

我试图通过REST api将这两个模板用作复合模板。我自己发出了每个模板,效果很好。以下是日志文件中的请求:

Content-Length: 1526
Host: demo.docusign.net
X-DocuSign-Authentication: {"Username":"Kathleen.Jones@XXX.com","Password":"[omitted]","IntegratorKey":"[omitted]"}
X-Forwarded-For: 63.118.233.100, 104.129.194.117

{
  "compositeTemplates": [
    {
      "serverTemplates": [
        {
          "sequence": "1",
          "templateId": "2d743750-f910-4a30-ad34-ac5bc0ca8daa"
        },
        {
          "sequence": "2",
          "templateId": "63479d79-a776-4767-a2a3-1ebd01d7d8fa "
        }
      ],
      "inlineTemplates": [
        {
          "sequence": "1",
          "recipients": {
            "signers": [
              {
                "name": "Joe Blow",
                "email": "JoeBlow@outlook.com",
                "recipientId": "1",
                "roleName": "CEO"
              },
              {
                "name": "Kathy Blow",
                "email": "KathyBlow@outlook.com",
                "recipientId": "2",
                "roleName": "Uber CEO"
              }
            ]
          }
        },
        {
          "sequence": "2",
          "recipients": {
            "signers": [
              {
                "name": "Joe Blow",
                "email": "JoeBloww@outlook.com",
                "recipientId": "2",
                "roleName": "Uber CEO"
              },
              {
                "name": "Kathy Blow",
                "email": "KathyBlow@outlook.com",
                "recipientId": "1",
                "roleName": "CEO"
              }
            ]
          }
        }
      ]
    }
  ],
  "status": "sent",
  "emailSubject": "Please Sign the enclosed docs at your earliest convenience"
}
400 BadRequest
Content-Type: application/json; charset=utf-8
X-DocuSign-TraceToken: cb23f0ed-6be2-4189-9237-5575671f8f4b

{
  "errorCode": "TAB_REFERS_TO_MISSING_DOCUMENT",
  "message": "The DocumentId specified in the tab element does not refer to a document in this envelope. Tab refers to DocumentId 15100956 which is not present."
}

就像我说的那样,我独立使用了2个模板,它们很好用。有什么想法吗?

1 个答案:

答案 0 :(得分:1)

我在StackOverflow answer中找到了答案:

  

在您发布的请求JSON中,您将“文档”(复数)指定为文档对象的集合/数组 - 这是不正确的。 compositeTemplates数组中的每个Composite Template项最多只能包含一个文档。