0

DocuSign REST API 展示了如何分别使用 recipientId 和 tabId 获取和删除收件人和收件人选项卡,并且只更改 HTTP 方法。但是,在 demo.docusign.net 上进行测试时,GET 有效并且 DELETE 返回“INVALID REQUEST BODY”或“RESOURCE NOT FOUND”。这是正文删除选项卡的代码:

{
    "signHereTabs": [{
        "tabId":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }]
}

网址是

baseUrl/restapi/v2/accounts/123456/envelopes/yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy/recipients/1/tabs 

要删除收件人:

{
    "signers": [{
        "recipientId":"1"
    }]
}

网址是

baseUrl/restapi/v2/accounts/123456/envelopes/yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy/recipients

根据http://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm的 API 文档,方法是 GET 用于检索选项卡信息,DELETE 用于删除选项卡信息。我已经在http://iodocs.docusign.com/的 REST API Explorer 中以及在我的 IE v9、FireFox 和 Chrome 中的应用程序中进行了尝试。

4

2 回答 2

0

我认为您缺少帐户 ID 和其他内容。这是演示的正确 URL:

https://demo.docusign.net/restapi/v2/accounts/42393/envelopes/75210c12-427f-42e3-a6f0-01009f6bf951/recipients/1/tabs

这是 curl 对我有用的方法。

curl --request DELETE 'https://demo.docusign.net/restapi/v2/accounts/42393/envelopes/75210c12-427f-42e3-a6f0-01009f6bf951/recipients/1/tabs'  --header 'Content-Type:application/json'  --header 'Accept:application/json' --header 'X-DocuSign-Authentication: <DocuSignCredentials><Username>....</Username><Password>.....</Password><IntegratorKey>...</IntegratorKey></DocuSignCredentials>' -d @delete-tabs.txt

删除-tabs.txt 是:

{
  "signHereTabs":[{
    "tabId":"4039cf12-9b88-4232-ac85-d1f1c2d22fc6"
  }]
}

之前的信封标签:

{
  "signHereTabs": [
    {
      "name": "Sign Here",
      "tabLabel": "Signature 329",
      "scaleValue": 1,
      "optional": "false",
      "documentId": "1",
      "recipientId": "1",
      "pageNumber": "4",
      "xPosition": "77",
      "yPosition": "614",
      "tabId": "4039cf12-9b88-4232-ac85-d1f1c2d22fc6"
    }
  ],
  "fullNameTabs": [
    {
      "name": "Full Name",
      "tabLabel": "Full Name",
      "documentId": "1",
      "recipientId": "1",
      "pageNumber": "2",
      "xPosition": "182",
      "yPosition": "729",
      "tabId": "9db5fdf5-d669-4b93-8c79-d8e196a3f76c"
    },
    {
      "name": "Full Name",
      "tabLabel": "Full Name",
      "documentId": "1",
      "recipientId": "1",
      "pageNumber": "4",
      "xPosition": "180",
      "yPosition": "727",
      "tabId": "d477c65c-ccba-46ab-b826-29688cff1a0b"
    }
   ]
}

后:

{
  "fullNameTabs": [
    {
      "name": "Full Name",
      "tabLabel": "Full Name",
      "documentId": "1",
      "recipientId": "1",
      "pageNumber": "2",
      "xPosition": "182",
      "yPosition": "729",
      "tabId": "9db5fdf5-d669-4b93-8c79-d8e196a3f76c"
    },
    {
      "name": "Full Name",
      "tabLabel": "Full Name",
      "documentId": "1",
      "recipientId": "1",
      "pageNumber": "4",
      "xPosition": "180",
      "yPosition": "727",
      "tabId": "d477c65c-ccba-46ab-b826-29688cff1a0b"
    }
  ],
于 2013-07-20T05:26:57.223 回答
0

问题是 ColdFusion cfhttp 不发送 DELETE 请求方法的 BODY。我听说在版本 10 中这将得到修复。我必须使用自定义标签CFX_HTTP5才能使其正常工作。标签作者 Andrei Kondrashev 非常乐于助人,并为我提供了一个使用 DELETE 请求方法发送 BODY 的标签版本。请注意,您的自定义标签版本可能没有此增强功能。这解决了我所有的删除问题!

于 2013-09-05T16:50:41.743 回答