Reputation: 11
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. However, the GET works and the DELETE returns "INVALID REQUEST BODY" or "RESOURCE NOT FOUND" when testing on demo.docusign.net. 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. I have tried this in the REST API Explorer at http://iodocs.docusign.com/ and within my application in IE v9, FireFox and Chrome.
Upvotes: 0
Views: 1004
Reputation: 11
The problem was that ColdFusion cfhttp does not send the BODY of a DELETE request method. I have heard that in version 10 this will be fixed. I had to use a custom tag, CFX_HTTP5, in order to make it work. 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. Please be aware that your version of the custom tag may not have this enhancement. This solved all my delete problems!
Upvotes: 0
Reputation: 3335
I think you are missing account ID and other stuff. Here is the proper URL for demo:
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:
{
"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"
}
],
Upvotes: 0