简体   繁体   English

DocuSign REST API v2删除收件人和收件人的选项卡不起作用

[英]DocuSign REST API v2 Delete Recipient and Tabs for a Recipient Does Not Work

DocuSign REST API shows how to GET and DELETE a recipient and recipient tab using the recipientId and tabId respectively and just changing the HTTP method. DocuSign REST API显示了如何分别使用receiveId和tabId以及仅更改HTTP方法来获取和删除收件人和收件人标签。 However, the GET works and the DELETE returns "INVALID REQUEST BODY" or "RESOURCE NOT FOUND" when testing on demo.docusign.net. 但是,在demo.docusign.net上进行测试时,GET可以正常工作,并且DELETE返回“ INVALID REQUEST BODY”或“ RESOURCE NOT FOUND”。 Here is the code for the body to delete a tab: 这是删除标签页的正文代码:

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

The URL is 该网址是

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

To delete a recipient: 删除收件人:

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

The URL is 该网址是

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

and the method is GET for retrieving tab info and DELETE for deleting tab info based on the API documentation at http://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm . 根据http://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm上的API文档,方法是GET(获取索引)和DELETE(删除索引) I have tried this in the REST API Explorer at http://iodocs.docusign.com/ and within my application in IE v9, FireFox and Chrome. 我已经在REST API资源管理器中( http://iodocs.docusign.com/)以及我在IE v9,FireFox和Chrome中的应用程序中进行了尝试。

I think you are missing account ID and other stuff. 我认为您缺少帐户ID和其他内容。 Here is the proper URL for demo: 这是演示的正确URL:

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

Here is what just worked for me with 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

delete-tabs.txt is: delete-tabs.txt是:

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

Envelope tabs before: 信封标签之前:

{
  "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"
    }
   ]
}

After: 后:

{
  "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"
    }
  ],

The problem was that ColdFusion cfhttp does not send the BODY of a DELETE request method. 问题是ColdFusion cfhttp没有发送DELETE请求方法的BODY。 I have heard that in version 10 this will be fixed. 我听说在版本10中将解决此问题。 I had to use a custom tag, CFX_HTTP5 , in order to make it work. 我必须使用自定义标签CFX_HTTP5才能使其正常工作。 The tag author, Andrei Kondrashev, was very helpful and provided me with a version of the tag that sent the BODY with the DELETE request method. 标签创建者Andrei Kondrashev很有帮助,并为我提供了一个标签版本,该版本通过BOOST DELETE请求方法发送了BODY。 Please be aware that your version of the custom tag may not have this enhancement. 请注意,您的自定义标签版本可能没有此增强功能。 This solved all my delete problems! 这解决了我所有的删除问题!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM