DocuSign API 使用 XML 将信封移至回收站
DocuSign API using XML to move Envelope to Recycle Bin
我在尝试使用 REST API 将完成的信封移动到 DocuSign 中已删除的垃圾箱时遇到问题。我得到的错误是:
<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. <envelopeMoveRequest xmlns=''> was not expected.</message>
</errorDetails>
这是我拨打的 API 电话:
地址:https://www.docusign.net/restapi/v2/accounts/{accountid}/folders/recyclebin
Http-Method: PUT
Content-Type: application/xml
Headers: {Content-Type=[application/xml], 接受=[application/xml], X-DocuSign-Authentication=[{"Username": "username","Password":"password","IntegratorKey":"integrator key"}],Context-Length=[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 调用是如何出错的。
通常 DocuSign 请求的相应 XML
(与 JSON 等效项相比)具有表示集合或数组的各个元素的额外节点。因此,在这种情况下,请尝试为每个 envelopeId 添加一个单独的节点。
现在你有:
<envelopeIds>EnvelopeId</envelopeIds>
试试改成这样:
<envelopeIds>
<envelopeId>EnvelopeId</envelopeId>
</envelopeIds>
以下对我有用。确保你也没有 copy/pasting 任何隐藏或额外的字符:
<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>
我在尝试使用 REST API 将完成的信封移动到 DocuSign 中已删除的垃圾箱时遇到问题。我得到的错误是:
<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. <envelopeMoveRequest xmlns=''> was not expected.</message>
</errorDetails>
这是我拨打的 API 电话:
地址:https://www.docusign.net/restapi/v2/accounts/{accountid}/folders/recyclebin
Http-Method: PUT
Content-Type: application/xml
Headers: {Content-Type=[application/xml], 接受=[application/xml], X-DocuSign-Authentication=[{"Username": "username","Password":"password","IntegratorKey":"integrator key"}],Context-Length=[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 调用是如何出错的。
通常 DocuSign 请求的相应 XML
(与 JSON 等效项相比)具有表示集合或数组的各个元素的额外节点。因此,在这种情况下,请尝试为每个 envelopeId 添加一个单独的节点。
现在你有:
<envelopeIds>EnvelopeId</envelopeIds>
试试改成这样:
<envelopeIds>
<envelopeId>EnvelopeId</envelopeId>
</envelopeIds>
以下对我有用。确保你也没有 copy/pasting 任何隐藏或额外的字符:
<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>