没有服务器模板的DocuSign错误代码ENVELOPE_IS_INCOMPLETE,使用服务器模板成功

时间:2016-05-03 23:19:03

标签: docusignapi

以下请求正文返回错误代码:ENVELOPE_IS_INCOMPLETE

  

信封不完整。完整的信封需要文件,   收件人,标签和主题行。

{  
   "status":"sent",
   "compositeTemplates":[  
      {  
         "inlineTemplates":[  
            {  
               "sequence":"1",
               "recipients":{  
                  "signers":[  
                     {  
                        "name":"Dr. Oswald",
                        "email":"somewhere@google.com",
                        "accessCode":null,
                        "roleName":"recipient",
                        "clientUserId":"test",
                        "recipientId":"1",
                        "tabs":{  
                           "textTabs":[  
                              {  
                                 "tabLabel":"\\*recipientFullName",
                                 "value":"Grace Hooper",
                                 "tabId":null,
                                 "tabLocked":false
                              }
                           ],
                           "checkboxTabs":[  

                           ],
                           "titleTabs":[  

                           ]
                        },
                        "routingOrder":null
                     }
                  ],
                  "agents":[  

                  ]
               },
               "customFields":null
            }
         ],
         "document":{  
            "name":"HIA",
            "documentId":1,
            "documentBase64":"...",
            "transformPdfFields":true
         }
      }
   ],
   "notification":null
}

但添加服务器模板 - 有效。根据文档,ServerTemplate不需要CompositeTemplate。这个请求没问题:

 {
   "status":"sent",
   "compositeTemplates":[
      {
         "serverTemplates":[ // THIS IS THE ONLY ADDITION
            {
               "sequence":"0",
               "templateId":"ASDASDASD-SD-SADS-AA9A-ASD"
            }
         ],
         "inlineTemplates":[
            {
               "sequence":"1",
               "recipients":{
                  "signers":[
                     {
                        "name":"Dr. Oswald",
                        "email":"someone@google.com",
                        "accessCode":null,
                        "roleName":"recipient",
                        "clientUserId":"test",
                        "recipientId":"1",
                        "tabs":{
                           "textTabs":[
                              {
                                 "tabLabel":"\\*recipientFullName",
                                 "value":"Grace Hooper",
                                 "tabId":null,
                                 "tabLocked":false
                              }
                           ],
                           "checkboxTabs":[

                           ],
                           "titleTabs":[

                           ]
                        },
                        "routingOrder":null
                     }
                  ],
                  "agents":[

                  ]
               },
               "customFields":null
            }
         ],
         "document":{
            "name":"HIA",
            "documentId":1,
            "documentBase64":"...",
            "transformPdfFields":true
         }
      }
   ],
   "notification":null
}

1 个答案:

答案 0 :(得分:2)

此处的错误消息是正确报告,我需要添加电子邮件主题并且问题已解决。空字符串不起作用。

  

完整信封需要文档,收件人,标签和主题行。

在请求中添加emailSubject解决了这个问题。