DocuSign REST API bulk recipient transactions not showing in response - docusignapi

I have issues with getting the ID for the newly created envelopes when using the bulk send feature.
I'm using a template that has a bulk recipient signer (from a CSV file).
I've managed to create with success a draft envelope with a bulk recipient signer based on the template, to pass the CSV file to the envelope and to change the status to 'sent' in order to trigger the sending of an envelope for each recipient.
The issue is that the response returned from sending the envelope doesn't contains the 'bulkRecipientTransactions' element (the CSV file contains 2 signers).
Below you can see a response sample:
<envelopeUpdateSummary xmlns="http://www.docusign.com/restapi" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<bulkEnvelopeStatus>
<batchId>97ef8125-b305-4de7-837b-d89c36bd994e</batchId>
<batchSize>2</batchSize>
<bulkEnvelopesBatchUri>/bulk_envelopes/97ef8125-b305-4de7-837b-d89c36bd994e</bulkEnvelopesBatchUri>
<failed>0</failed>
<queued>2</queued>
<sent>0</sent>
<submittedDate>2015-07-24T07:10:18.9900000Z</submittedDate>
</bulkEnvelopeStatus>
</envelopeUpdateSummary>
The same result came back when i've used the DocuSign API explorer for creating & sending a bulk recipient envelope - no 'bulkRecipientTransactions' element.
Also I've tried to check the status of one bulk send batch (/accounts/{accountId}/bulk_envelopes/{batchId}), but I've got as a result only the general batch info's - the element 'bulkEnvelopes' was missing!
<bulkEnvelopeStatus xmlns="http://www.docusign.com/restapi" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<batchId>97ef8125-b305-4de7-837b-d89c36bd994e</batchId>
<batchSize>2</batchSize>
<bulkEnvelopesBatchUri>/bulk_envelopes/97ef8125-b305-4de7-837b-d89c36bd994e</bulkEnvelopesBatchUri>
<endPosition>2</endPosition>
<failed>0</failed>
<nextUri/>
<previousUri/>
<queued>0</queued>
<resultSetSize>0</resultSetSize>
<sent>2</sent>
<startPosition>0</startPosition>
<submittedDate>2015-07-24T07:10:18.9900000Z</submittedDate>
<totalSetSize>2</totalSetSize>
</bulkEnvelopeStatus>
For all the workflow I've used the REST API v2 using C# and xml.

When you use /accounts/{accountId}/bulk_envelopes/{batchId} to get envelopes, you need specify queryString ?include=(all,failed,queued,sent).otherwise, you may not get any envelopes list result

Related

Docusign - api get utl to download document

I need api to create URL link for download document of envelope.
I found this api:
GET /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}
But this api just return the file and i what a URL i can download the file (of course with expired time)
The endpoint you're looking for is:
POST /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient
You will need to provide in the body information about the recipient, see here for details:
https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeViews/createRecipient
We also have code examples in various langagues to show you how to do this here:
https://developers.docusign.com/esign-rest-api/code-examples/code-example-request-a-signature-via-email

DocuSignApi - Envelope status returned as "template"

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.

user can not sign because there’s no URL created and sent to us from Docusign

We are receiving the following error when I try to create a recipient view. Basically the document is sent to 2 users, one of them has already signed but the other user can not sign because there’s no URL created and sent to us from Docusign. We are using node.js docusign sdk.
var recipientView = new docusign.RecipientViewRequest();
recipientView.setReturnUrl();
recipientView.setUserName();
recipientView.setEmail(;
recipientView.setAuthenticationMethod("email");
recipientView.setClientUserId();
var envelopesApi = new docusign.EnvelopesApi();
envelopesApi.createRecipientView(accountId, envelope.id, recipientView,
function(error, viewUrl, response) {
// no url is returned here.the error (in the image) is shown
});
I printed the values of accountId, envelopeId and those seemed to be fine.I checked if the user had changed his first name, last name and there were no errors there. If I create a new user from scratch everything works fine.
FrontEnd Error
Response Error
Through your screenshots it looks like you are getting an UKNOWN_ENVELOPE_RECIPIENT error returned from the API. This means the recipient data you are sending to identify the recipient is not correct. It needs to exactly match the data you assigned to the recipient when you added them to the envelope, such as name, email, recipientId, and clientUserId.
Try calling the EnvelopeRecipients: List API before you make the request to generate the URL and ensure that the recipient data matches what you are sending in your createRecipientView() request. That should help identify which piece of data is off, once you correct that the call will then start returning the proper URL.
Also see the Embedded Signing features page in the DocuSign Developer Center which shows exactly which params you need to set etc:

listStatusChanges api gives error after passing more than 50 envelopeids

I am calling Envelopes: listStatusChanges api to fetch envelope statuses. I am passing envelope ids(comma seperated list) as a parameter to this method, upto 50 envelope ids it gives me result but as soon as I pass more than 50 envelope ids it gives me following error. I aslo tried with Docusign Apiexplorer by passing same envelope ids list but the result is same. Is there any limitation on passing these envelope ids?
'error: " 404 - File or directory not found. Server Error 404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable. "'
The 404 error is being thrown by the webserver as the length of the URL of your HTTP GET request is too long. See more detailed explanation here
You can instead use other parameters(for ex: from_date) on the listStatusChanges api to query the list of envelopes. You can then filter the response based on envelopeId's you are looking for.
Another more efficient option would be to use Docusign Connect to get notifications on Envelope Status changes.

Delete Envelope in created state

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>

Resources