DocuSign RestApi - Error while uploading document - TAB_REFERS_TO_MISSING_DOCUMENT

∥☆過路亽.° 提交于 2019-12-20 05:40:31

问题


I'm getting the following error when I try to apply a template (created in my web account) to the document I'm trying to upload.

"DocumentId specified in the tab element does not refer to a document in this envelope. Tab refers to DocumentId 41791752 which is not present."

Any help would be greatly appreciated. Thanks.

Here's the code I have:

string xmlBody = "<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">" +
                "<emailSubject>DocuSign API - Signature Request"</emailSubject>" +
                "<status>sent</status>" +   // "sent" to send immediately, "created" to save as draft in your account
                   "<compositeTemplates>" +
                       "<compositeTemplate>" +
                           "<serverTemplates>" +
                                  "<serverTemplate>" +
                                       "<sequence>1</sequence>" +
                                       "<templateId>" + templateID + "</templateId>" +
                                  "</serverTemplate>" +
                           "</serverTemplates>" +
                           "<inlineTemplates>" +
                                  "<inlineTemplate>" +
                                      "<sequence>2</sequence>" +
                                      "<recipients>" +                                        
                                           "<signers>" +
                                                  "<signer>" +
                                                        "<recipientId>1</recipientId>" +
                                                        "<email>" + recipientEmail + "</email>" +
                                                        "<name>" + recipientName + "</name>" +
                                                        "<roleName>Signer</roleName>" +
                                                   "</signer>" +
                                             "</signers>" +                                       
                                       "</recipients>" +
                                  "</inlineTemplate>" +
                          "</inlineTemplates>" +
                           "<document>" +
                                 "<name>" + documentName + "</name>" +
                                 "<documentId>1</documentId>" +
                          "</document>" +
                    "</compositeTemplate>" +
                   "</compositeTemplates>" +
               "</envelopeDefinition>";

回答1:


The error message you quoted:

DocumentId specified in the tab element does not refer to a document in this envelope. Tab refers to DocumentId 41791752 which is not present.

I suggest that the template is referring to that documentId. But you're registering your document as Id 1.

Try changing

  "<documentId>1</documentId>" +
to
  "<documentId>41791752</documentId>" +


来源:https://stackoverflow.com/questions/36610216/docusign-restapi-error-while-uploading-document-tab-refers-to-missing-docume

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!