【问题标题】:DocuSign API using XML to move Envelope to Recycle BinDocuSign API 使用 XML 将信封移动到回收站
【发布时间】:2016-03-24 16:50:04
【问题描述】:

我在尝试使用 REST API 将已完成的信封移动到 DocuSign 中已删除的 bin 时遇到问题。我得到的错误是:

<errorDetails xmlns="http://www.docusign.com/restapi" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <errorCode>INVALID_REQUEST_BODY</errorCode>
    <message>The request body is missing or improperly formatted. &lt;envelopeMoveRequest xmlns=''&gt; was not expected.</message>
</errorDetails>

这是我进行的 API 调用:


地址:https://www.docusign.net/restapi/v2/accounts/{accountid}/folders/recyclebin
Http-Method:PUT
内容类型:application/xml
标题:{Content-Type=[application/xml], Accept=[application/xml], X-DocuSign-Authentication=[{"Username":"username","Password":"password","IntegratorKey ":"积分键"}], 上下文长度=[31274]}
有效载荷:

<?xml version="1.0" encoding="UTF-8"?>
<envelopeMoveRequest xmlns="http://www.docusign.com/restapi" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <envelopeIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>EnvelopeId</d2p1:string>
  </envelopeIds>
  <fromFolderId/>
</envelopeMoveRequest>

我可以使用一些帮助来弄清楚我的 API 调用是如何出错的。

【问题讨论】:

    标签: docusignapi


    【解决方案1】:

    以下内容对我有用。确保您没有复制/粘贴任何隐藏或额外的字符:

    <envelopeMoveRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
      <envelopeIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d2p1:string>828a593e-10ae-4e54-bccc-66b5e66a5e81</d2p1:string>
      </envelopeIds>
    </envelopeMoveRequest> 
    

    【讨论】:

    • 经过一些测试,我发现 XML 声明:"" 导致了错误
    【解决方案2】:

    通常,DocuSign 请求对应的XML(与 JSON 等价物相比)具有代表集合或数组的各个元素的额外节点。因此,在这种情况下,请尝试为每个信封Id 添加一个单独的节点。

    现在你有:

    <envelopeIds>EnvelopeId</envelopeIds>
    

    试着改成这样:

    <envelopeIds>
        <envelopeId>EnvelopeId</envelopeId>
    </envelopeIds>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多