In docusign can i request status for a list of envelope ID - docusignapi

I am exploring docusign API.
I am trying to understand if the following is possible with status API
Is it possible to request the status for a set of Envelope Ids. I have seen the documentation for requesting status for ONE envelope id.
Thanks for reading

Yes you can easily request statuses for a set of envelopes through the DocuSign API. I recommend going through the DocuSign Developer Center which introduces tools such as the API Explorer and the API Walkthroughs in the Getting Started section.
Take a look at the 5th (middle) walkthrough here, titled Get Status of Envelopes -
http://iodocs.docusign.com/apiwalkthroughs
The walkthrough shows you the api call in 6 languages (PHP, Java, Javascript, C#, Python, Objective-C) for getting status of a set of envelopes. Using URL params you can filter by status and date.
The API call you need to make is:
Method
GET
URI
/accounts/{accountId}/envelopes
Optional URL params
from_date (url encoded)
status (filter by real-time envelope status)
As mentioned the from_date needs to be URL encoded. For instance, to filter all envelopes that are sent, delivered, or completed since March 1, 2014, you would append the following to the URL:
/envelopes?from_date=3%2F1%2F2014&status=sent,delivered,completed

Yes DocuSign allows retrieving statuses for multiple envelopes.
However, I actually found the above documentation to be inaccurate and missing some info. The HTTP method should be GET and the parameter should be named envelope_ids.
So that would give you an example query of:
GET /accounts/{accountId}/envelopes/status?envelope_ids=abc,def
The response contains the standard DocuSign pagination fields, but they don't seem to be processed if included in the request. There is no mention in the docs as the maximum number of envelopes that can be retrieved at a time.

Related

How can I get the decline reason by using Docusign API without "EnvelopeRecipients:: List"

I've been working with the DocuSign API for some time now, and it's all fine, but when the signer refuses to sign, I get a rejection message using "EnvelopeRecipients:: List".
However, frequent use of the API is prohibited in the go-Live instructions.What should I do?
enter link description here
enter image description here
RecipientViewRequest viewOptions = new RecipientViewRequest
{
ReturnUrl = returnUrl,
ClientUserId = this.CurrentUserID,//DSConfig.ClientID,
AuthenticationMethod = "none",
UserName = displayName,
Email = userEmail
};
// Use the SDK to obtain a Recipient View URL
var envelopesApi = GetEnvelopesApi();
ViewUrl viewUrl = envelopesApi.CreateRecipientView(JwtAuthClient.JwtAuth.Account.AccountId, envelopeId, viewOptions);
You could use DocuSign Connect webhook or if you're using embedded signing, it's in the URL that goes back to your app after the user finished signing.
" frequent use of the API is prohibited" is not accurate. Polling is what is bad/not allowed. "frequent" is relative. If your app need to make more API calls - you may make more API calls. There are limits etc. but you don't want to also go overboard with the notion you cannot make API calls.
You're facing limitation issues because of bad implementation.
I know it's too late but I recently work on DocuSign API and randomly found this question, that's why decide to answer it for other people if they come to this question to find the solution.
The Latest DocuSign API version is 2.1 and I'll only talk about that version.
In this version, either you call via SDK or your custom code List API Call
end-point has many options which we can use to optimize the Envelope check status.
count, start_position, and continuation_token parameters are useful when you have a large number of envelopes on the Cloud which status do you want to check (include decline) to split the result in chunks or you can say page wise. It will help you to manage frequent call limitation issues like you can filter only those envelopes which status you want to check with further options and fetch envelopes in a bunch instead of each envelope status will help you to reduce the number of calls to DocuSign.
(I'm not going to train you on how you can write code as this is not a platform for that)
For the case which is mentioned in the question, the same API end-point will be useful to fetch only declined envelopes with messages.
Like for that purpose you just need to pass "declined" against the status parameter which is useful to filter cloud envelops status-wise. To include declined message with the response, you need to pass "recipients" against the "include" parameter, which appends the Recipient entity with each envelope object where you can filter out the declined message. "DeclinedReason" or "VoidedReason" there are two properties which can return a decline message with this call. If you want to see the complete schema of the envelope entity, you can go through same link List API Call
In short, to solve the limitation issue you can use "listStatusChanges" end-point which has too many optional parameters which you can utilize as per your need but the performance depends on how you utilize it.
PS: Webhook is a better option to sync data between two services in optimize way or without any calling limitation, my answer is only for those who don't want to use webhook.

Does the DocuSign Intermediate API plan let me use the API to get PDF and form fields?

I tried calling DocuSign sales and support (transferred around 3 times) and no one could give me a straight answer on this. Their "support" actually told be to try stackoverflow, so here I am...
I'm looking at their API pricing levels here: https://www.docusign.com/products-and-pricing/api-plans-b
If I have the Intermediate API, can I make the following API requests?
GET /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}
GET /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/form_data
The part that's throwing me for a loop is the DocuSign Connect feature in the Advanced API plan. The description of it is:
The DocuSign Connect module lets you configure webhooks for envelope events and recipient actions for some or all users in your account. It can also be used to transport the completed documents back to your app or website and to retrieve any form field data entered by your recipients.
I don't need the webhooks, but I need to be able to get the completed documents as PDFs and get the form field data. Do I really need the DocuSign Connect feature for that?
You will be fine with the intermediate plan. Here is the basic distinction between polling and Connect - With Connect, we will proactively notify YOU when key envelope events occur.
Otherwise, it's up to you to call GET /envelopes and/or GET /form_data to retrieve that information. Be wary of the resource limits when you poll.
As a quick aside, instead of making two requests to retrive that information, just make one - GET /envelopes?include=recipients,tabs. This will provide you all the information you seek in one request.
The important excerpt from that guide:
You may not exceed one GET request per unique envelope endpoint per 15
minutes. If you exceed this limit the request will not fail, but it
will be flagged as a violation of rate limits which can cause your app
to fail review to go-live review.
For example, the following transactions violate API rules due to the repeated GET requests to the first document and second recipient:
[12:00:00] POST /accounts/12345/envelopes
[12:01:00] GET /accounts/12345/envelopes/AAA/documents/1
[12:02:00] GET /accounts/12345/envelopes/AAA/recipients/2
[12:03:00] POST /accounts/12345/envelopes
[12:04:00] GET /accounts/12345/envelopes/AAA/documents/1 *
[12:05:00] GET /accounts/12345/envelopes/AAA/recipients/2 *
However, the following set of requests comply with API rules and limits and would not be flagged by the platform:
[12:00:00] POST /accounts/12345/envelopes
[12:01:00] GET /accounts/12345/envelopes/AAA
[12:16:00] GET /accounts/12345/envelopes/AAA
[12:17:00] GET /accounts/12345/envelopes/AAA/documents/1
[12:32:00] GET /accounts/12345/envelopes/AAA/documents/1
[12:40:00] PUT /accounts/12345/envelopes/AAA/recipients/1
[12:41:00] PUT /accounts/12345/envelopes/AAA/recipients/1

Polling docusign envelope status limit

How many DocuSign envelope statuses can I get at a time by calling the API
PUT /restapi/v2.1/accounts/{accountId}/envelopes/status?envelope_ids=[list_of_ids]
I have a bulk number of envelope Ids and it is increasing day by day. What I am going to do is, I am going to pull all the envelope statuses (except the voided and completed envelopes) in a scheduler manner.
I have not found anything or I have missed in the documentation. Is there a limitation in docusign with the number or request size ?
There are two limits: the max length of a URL including its query parameters, and the max envelope ids for the call.
Avoiding the URL length limit: As documented, you can set the query parameter to a special value: envelope_ids=request_body. In this case, the method uses the envelope IDs in the request body.
From the documentation:
envelope_ids query parameter -- The envelope IDs to include in the results.
The value of this property can be:
A comma-separated list of envelope IDs. [or]
The special value request_body. In this case, the method uses the envelope IDs in the request body.
I don't know what the second limit is.
As an alternative, consider setting up a webhook. You can receive the webhook notifications of completed envelopes from behind the firewall (without changing the firewall) by using an intermediate queuing system.
Example code for AWS, Azure, and Google Cloud is available for C#, Java, PHP, Python, and Node.js. See the Connect-* repositories in github.com/docusign

What is the perfect way to get response from docusign api webhook response in php?

I have set a web hook URL for docusign API. when any update from document signer come, i will get update about envelop. but how can i get the response? What is the format. Can someone show me a example?
In order to receive and process webhook notifications from DocuSign Connect, you'll need to create an application to "listen" for (and process) the notifications. DocuSign provides sample applications like this in a variety of languages -- you can use this link to find those samples on GitHub: https://github.com/docusign?utf8=%E2%9C%93&q=connect.
For example, here's the webhook sample in PHP: https://github.com/docusign/recipe-010-webhook-php.
You will get response from DocuSign in an XML format, You can find more details at https://www.docusign.com/blog/dsdev-adding-webhooks-application/,
https://www.docusign.com/supportdocs/ndse-admin-guide/Content/connect-technical-details.htm and Guide is available at https://www.docusign.com/supportdocs/pdf/connect-guide.pdf

DocuSign Api: how to get the envelope blurb and title without the status

Is it possible to retrieve the blurb, title and recipients for an envelope without polling for the status at the same time? The reason for asking is that it appears from the API documentation that any calls to /account/{accountid}/envelopes appear to be classed as a status update.
To get email blurb and title, you use the Get Individual Envelope Status operation:
GET /accounts/{accountId}/envelopes/{envelopeId}
To get recipients, you use the Get Envelope Recipient Status operation:
GET /accounts/{accountId}/envelopes/{envelopeId}/recipients
The reference to "status" in these operation names is simply the naming convention that DocuSign decided to use (since the operations are commonly used to determine status of envelope / recipients) -- but the API responses contain lots of additional information beyond just status.

Resources