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
并且该方法是用于检索选项卡信息的GET,以及用于删除基于http://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm的API文档的选项卡信息的DELETE。我在http://iodocs.docusign.com/的REST API资源管理器和IE v9,FireFox和Chrome中的应用程序中尝试过此操作。
答案 0 :(得分:0)
我认为您缺少帐户ID和其他内容。以下是演示的正确URL:
以下是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是:
{
"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"
}
],
答案 1 :(得分:0)
问题是ColdFusion cfhttp不发送DELETE请求方法的BODY。我听说在第10版中这将被修复。我必须使用自定义标记CFX_HTTP5才能使其正常工作。标签作者Andrei Kondrashev非常乐于助人,并为我提供了一个使用DELETE请求方法发送BODY的标签版本。请注意,您的自定义标记版本可能没有此增强功能。这解决了我所有的删除问题!