Docusignapi 将文档上载到现有Envlope API

Docusignapi 将文档上载到现有Envlope API,docusignapi,Docusignapi,我正在尝试将文档上载到现有的草稿信封中 这是我的要求: // construct an outgoing XML formatted request body (JSON also accepted) string requestBody = "<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">" + "<documents>" + "<document>" +

我正在尝试将文档上载到现有的草稿信封中

这是我的要求:

// construct an outgoing XML formatted request body (JSON also accepted)
string requestBody =
  "<envelopeDefinition   xmlns=\"http://www.docusign.com/restapi\">" +
  "<documents>" + 
  "<document>"  +
  "<documentId>" + 50 + "</documentId>" +
  "<name>" + "BigTester.pdf" + "</name>" +
  "<order>" + 50 + "</order>" +
  "<filebytes>" + bytes + "</filebytes>" + 
  "</document>" +
  "</documents>" +
  "</envelopeDefinition>";
//构造一个输出XML格式的请求体(也接受JSON)
字符串请求体=
"" +
"" + 
""  +
"" + 50 + "" +
“+”BigTester.pdf“+”+
"" + 50 + "" +
“”+字节+“”+
"" +
"" +
"";

以下是我得到的反馈:

Error code: BadRequest
<errorDetails xmlns="http://www.docusign.com/restapi" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <errorCode>NO_DOCUMENT_RECEIVED</errorCode>
  <message>The document element did not contain the encoded document, or there is a problem with the encoding. Bytes for document corresponding to documentId 1234 not found in request. 'documentId=&lt;
x&gt;' possibly missing from Content-Disposition header.</message>
</errorDetails>
错误代码:BadRequest
没有收到任何文件
文档元素不包含编码的文档,或者编码有问题。在请求中找不到与documentId 1234对应的文档的字节。'文档ID=
内容处置标头中可能缺少x'。

filebytes
替换为
documentBase64
并添加
fileExtension

文档的示例XML节点

  <documents>
    <document>
      <documentBase64>sample string 11</documentBase64>
      <documentFields>
        <nameValue>
          <name>sample string 1</name>
          <value>sample string 2</value>
        </nameValue>
      </documentFields>
      <documentId>sample string 1</documentId>
      <encryptedWithKeyManager>sample string 10</encryptedWithKeyManager>
      <fileExtension>sample string 7</fileExtension>
      <matchBoxes>
        <matchBox>
          <height>5</height>
          <pageNumber>1</pageNumber>
          <width>4</width>
          <xPosition>2</xPosition>
          <yPosition>3</yPosition>
        </matchBox>
      </matchBoxes>
      <name>sample string 4</name>
      <order>sample string 8</order>
      <pages>sample string 9</pages>
      <password>sample string 5</password>
      <remoteUrl>sample string 3</remoteUrl>
      <transformPdfFields>sample string 6</transformPdfFields>
      <uri>sample string 2</uri>
    </document>
  </documents>

样本串11
示例字符串1
样本串2
示例字符串1
样本串10
样本串7
5.
1.
4.
2.
3.
样本串4
样本串8
样本串9
样本串5
样本串3
样本串6
样本串2

ah。。。谢谢我现在真的让它工作了。。。但我唯一的问题是,我在添加文档后使用API打开Sender视图,它以某种方式重置了我传递的信封。。。。一旦出现sender视图,它就会清除信封中的所有文档。我想在我打电话时创建的发送可能会重置它,但我将其取出,同样的问题仍然存在。。。所以场景是,我有一些文档,对信封中的文档进行拉拽(所有文档都在那里)。。。呼叫发件人视图,文档已消失。抱歉,响应延迟,请将此作为新问题发布。