Problem: Envelopes moved to recycle bin are been showing up in the report even after 2 days. We are using EnvelopesApi.listStatusChanges to get the envelope status
Description:
We are using move envelopes feature to move the envelopes to the recycle bin and eventually after 1 day the envelope being moved is removed from the account and we can no longer see the envelope in any of the folders. But interestingly the envelope that's been moved is shown up when we made an API call EnvelopesApi.listStatusChange and even it's been showing up when we made the Rest call get envelope status /accounts/{accountId}/envelopes
Question
Is there a way to identify such kinds of envelopes that have been moved to recycle bin and no longer been available in any of the folders but shown up through the API Calls?. Looking to see if we can identify such kind of envelopes with any parameters that have been returned from any of the API calls
You should call below URI, as documented here:
GET /v2/accounts/{accountId}/folders
to know all the folders you have access to, this will also return the recyclebin folder uri, response will be like below:
{
"ownerUserName": "Sender Nae",
"ownerEmail": "email#gmail.com",
"ownerUserId": "87b00103-461d-487b-8928-1991dfdb8d19",
"type": "recyclebin",
"name": "Deleted Items",
"uri": "/folders/2fdc7ffc-60d5-4c36-9f9a-1410c30de0eb",
"folderId": "2fdc7ffc-60d5-4c36-9f9a-1410c30de0eb"
}
Now, read folderId or uri from the response for type - recyclebin, and call below uri to know all the envelopes which have been moved to recyclebin. Details are available at DS Docs
GET /restapi/v2/accounts/{accountId}/folders/2fdc7ffc-60d5-4c36-9f9a-1410c30de0eb
Related
ERROR: Content Type specified is not supported.
Hi there, I am new to DocuSign and I am trying to learn the implementation from last couple of days. What I did so far is, created a developer account and created a QuickStart project.
Goal
I want to integrate the DocuSign API's in my application, but I don't really want the user to leave my application. I just want to make use of DocuSign within my app. - Embedded Signing
What I did?
I successfully created an envelope with a sample document and after that I have to get that URL to view (for Recipient).
So I called the below API:
** EnvelopeViews: createRecipient**
** POST - {{baseUrl}}/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}/views/recipient**
All the details, like accountId, envelopeId are correct, along with that the request body that I pass with this is:
Request Body
{
"authenticationMethod": "none",
"clientUserId": "bcc49234-f30b-XXXX-XXXX-XXXXXXXXXXXX",
"email": "abc#gmail.com",
"recipientId": "007",
"returnUrl":"http://localhost",
"userName": "user name"
}
Note: * clientUserId is my Integration Key (please let me know if this is what I need to pass here or something else).*
Response
{
"errorCode": "INVALID_CONTENT_TYPE",
"message": "Content Type specified is not supported."
}
Note: Apart from the solution, please provide any link(s) to resources where I can easily see the implementation(as in my use case).
Umair,
First clientUserId is a bit of a confusing term, it's not the IK (Integration Key) but any string you want. It is unique to the signer and the envelope. You choose it.
You can find a detailed example of this with code in 8 languages on the DocuSign Developer Center How To Request Signature Through your app page.
I'm not clear how you make the API calls, if you are using postman, there are headers that needs to be set. One of them is called Content-Type and it has to be set to text/plain.
I can create a nested folder /folder1/folder2 in (personal) OneDrive with the following Graph request (using the beta API):
POST drives/{id}/root:/folder1:/children
{
"name": "folder2",
"folder": {},
"#microsoft.graph.conflictBehavior": "fail"
}
Here, folder1 didn't exist beforehand; the one API call creates both it and folder1/folder2.
However, the same code fails for SharePoint and OneDrive for Business with a 404 error. Is this type of request supported? I'd rather not have to make a separate API call for every level of nesting.
I'm asking this because I'm not sure whether my site has policies that cause the request to fail, or because the API actually doesn't support it.
This works for me. Remove name parameter from the body and use PATCH instead of POST. Specify the path in the URL.
PATCH drives/{id}/root:/folder1/folder2
{
"folder": {},
"#microsoft.graph.conflictBehavior": "fail"
}
Tested using v1.0 and beta for OneDrive for Business.
I'm using the DocuSign API to electronically sign documents within my app. I'm using the access code authentication feature, for some additional security; however, I am trying to 'Unlock' a signer (via the API) that has input the wrong access code too many times, without voided and creating a new envelope, or using the DocuSign Admin interface.
I don't care if I have to resend the initial email, I just want to be able to conserve my client's total envelope count. It's also important (if there are multiple signers) that I don't force one signer to have to sign multiple times, if they completed their signatures prior to signer2's authentication error.
I have attempted a POST to:
/v2/accounts/{accountId}/envelopes/{envelopeId}?resend_envelope=true
I have also sought a solution using the docusign-java-client:
Recipients recipients = envelopesApi.listRecipients(accountId, envelopeId);
List<Signer> signers = recipients.getSigners();
for (Signer signer : signers) {
signer.setRecipientAuthenticationStatus(null);
}
I still get the below response
"recipientAuthenticationStatus": {
"accessCodeResult": {
"status": "Failed",
"eventTimestamp": "2018-01-15T23:49:15.8600000Z"
}
I'm able to "Resend" via the DocuSign admin GUI, and everything works as expected...
Is there any way that I'm able "reset/unlock" this authentication feature programatically, through the API?
You can use below PUT endpoint
PUT /restapi/v2/accounts/<accountId>/envelopes/<envelopeId>?resend_envelope=true
Body as:
{
}
This should send another email to the signer who failed the authentication, and that user will again get option to enter the access code.
I think you will need to delete and then re-add the recipient (signer). That makes the signer become a new recipient.
However, doing so means you'll need to re-create everything about the signer: their document tabs/fields, etc.
I can't imagine that it is less expensive to simply void/resend the envelope than to spend a developer's time to work on this issue.
If this scenario is occurring a lot, then perhaps think about providing better training to your signers with respect to using the access code feature.
Per the documentation found here
I must include the json or xml with the request (if the authentication method failed). I assumed incorrectly that if there was only one recipient, then I would NOT have to specify. If you just want to resend the envelope, you don't need to include and signer data.
Such as:
{"signers" :
[{"email":"testEmail#gmail.com",
"name":"FirstName LastName",
"recipientId":"1"
}]
}
You should then get something like the below response:
{"recipientUpdateResults":
[{
"recipientId": "1",
"errorDetails":
{
"errorCode": "SUCCESS",
"message": ""
}
}]
}
I just started suing DocuSign's sandbox to test some of the API call that I plan to use on my website. I was testing the call that returns the information about a particular template. I set up a template in my sandbox and emailed it to myself. I then tried to get the template info by making this call:
Envelope envInfo = envelopesApi.GetEnvelope(accountId, envelopeId);
In the JSON that I get back the value for "status" is "template", which is not one of the possible statuses according to DocuSign (https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get%20Envelope%20Status%20Changes.htm). If anything it should be "Delivered". Has anyone had a similar issue? Thanks.
It was my own dumb error - I was checking the template ID instead of the envelope ID.
How can I delete a draft envelope using REST API? (status=created). I want to be able to destroy the envelope as it needs changes to subject and email blurb which I have been told is not possible via REST API after the creation of the envelope.
To Delete through the DocuSign Console:
You can delete an envelope from your Drafts folder by navigating to that folder, selecting the envelope(s) in question, and deleting through the UI.
To Delete through the DocuSign REST API:
This is not well documented at the moment but this can be accomplished by using the MoveEnvelope() call and moving it into your Recycle Bin folder. The following page from the REST API guide describes the call you need make:
DocuSign REST API Guide - Move Envelopes
The details of the call are as follows:
URL:
/accounts/{accountId}/folders/{folderId}
Method:
PUT
Body:
{
"envelopeIds": [
"sample string 1",
"sample string 2"
],
"fromFolderId": "sample string 1"
}
As with all other calls, this can be formatted in JSON or XML. If using XML request bodies, use the following:
<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>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</envelopeIds>
<fromFolderId>sample string 1</fromFolderId>
</envelopeMoveRequest>