Searching Shared Envelopes in Docusign - docusignapi

I'm currently using the docusign api to make a request that searches the user's folders in order to bring back all the envelopes that are out for signature. This works but it doesn't seem to bring back envelopes from shared folders.
Having executed the 'list' api action I can see that my user has access to another user's folders and having logged in as that user I can see that some signing requests have been sent. I'm just wondering if this is a limitation of the API search function or whether I'll have to perform a list then iterate through each folder requesting envelopes, the search API function has been quite useful as it allows me to return recipient information as a part of the request whereas it seems that listitems doesn't allow that.
Edit: I'm looking to perform a lookup that will bring back all of the envelopes that have been sent by user A and user B that are out for signature.
The situation is that we have multiple company accounts that can send docusign documents to customers. What we need to be able to do is to view all documents that are out for signature across all accounts in one single list.
Any help would be much appreciated.

Per, https://docs.docusign.com/esign/restapi/Folders/Folders/list/
call GET /v2/accounts/{accountId}/folders this will return list of folders which userA has access to, this will also include the list of userB folders. Once you get folderId from previous call then use below call to get the list of envelopes in the folder
GET /v2/accounts/{accountId}/folders/{folderId}

Related

Using invite endpoint to share with specific users

I'm trying to share a document in OneDrive by providing access to specific people across orgs. While I'm able to use the /invite endpoint to provide access, sometimes I am not aware whether a given email address is entitled to receive access. For instance, let's say:
A user from org-1 is sharing a file with three email IDs
Two email IDs belong to same org-1
But the third email ID belongs to org-2, which is not entitled to receive access as per org-1's policy
When I dispatch a request to /invite with the three email IDs, the whole request fails i.e. none receive access to the file.
Is it possible to have partial fulfilment? i.e. the entitled users of org-1 are given access but the user from org-2 is denied access, while the response returned is 200?
Also is this possible in Sharepoint as well?
No, you cannot make it partially success on the server side but you can validate if the given accounts are from your organization on your side(writing code) and then remove that and send the request. If you want to send it to other organizations as well you need to configure it on the tenant or site where you want to share data with.

Are there any APIs that list Envelope IDs as a Signer?

I'm looking for an API call that would effectively allow a Signer account to poll for Envelope IDs. Ideally I would like to get the envelopes id's of documents that fall under the "Action Needed" criteria.
I have looked into using the listStatusChanges GET Request, but it only returns envelope ID's that have been sent from other Docusign accounts.
Here is an example. For you to use this, you would need to replace your account and user Ids
GET <serverURI>/restapi/v2.1/accounts/ae232f1f-xxxx-xxxx-xxxx-626847fad8bb/envelopes?from_date=2020-01-26T08:00:00.000Z&to_date=2020-03-29T06:59:58.000Z&user_id=ee76c29e-xxxx-xxxx-xxxx-a0f95cd8e225&start_position=0&count=39&order=desc&order_by=last_modified&folder_ids=awaiting_my_signature&folder_types=normal,inbox,sentitems&include=recipients,powerform,folders&include_purge_information=true&query_budget=3
This is probably more than you need, but that's how the web app does it.

RestAPI "create" envelope where the envelope belongs to a different user than the API user?

I want to make an API call to "create" an envelope:
https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/create/
but where the envelope belongs to a different user than the API caller.
Right now, when a DocuSign envelope is created, they all show up in Manage/Drafts of the API user...but I'd like to control which user they go to, so a user like name#example.com can log into their DocuSign account and have that envelope show up in their drafts. I want to do this programmatically instead of clicking around a UI every time.
We have our DocuSign integration through Intelledox, and in their Infiniti Design, we have different hooks set up (create/post/send email) and their UI dropdowns for Action Input have a lot of different actions one can do....but there's no "Assign Envelope Owner" or anything like that...hence me digging through the API to see what can be done.
I saw a question like this over at DocuSign REST API, easily move envelope from user A to user B? (ie, change the envelope owner) but it was 6 years ago and wasn't sure if this ever got moved to "possible".
If your objective is that you need other users to see the envelope, then you simply share the user's envelopes with other users. That way, one does not have to login with the API user in DS to see the envelopes. If you want the envelope being sent to appear to a different user other than the API user, try using custody transfer feature in DS. however this will be limiting to only one user. Else, I do not thing there is any other way, May be you can check with IX support on that.

DocuSign - How to get a URL that lasts longer than a few minutes?

I am using the DocuSign REST Api and noticed that the lifetime of a URL obtained using the EnvelopeViews API (https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeViews/createRecipient) is only a few minutes. However, I have gotten emails in the past with DocuSign links. How are these links able to be added to an email (and therefore have a longer lifetime)?
Is there a separate API that can be used to get a longer-life link like the one in the email?
For example, here is an email that has a Review Document DocuSign link:
Good question. Here's what you can do.
Your application wants to let Larry sign a document using the
EnvelopeViews::createRecipient API call.
Your application should store the details needed for the API call in your app's database. Something like: envelopeId, signerEmail, clientUserId.
Create a guid for the database record and add it to the database record.
Now you can look up the database record via either the row's key or
via the guid. Ensure that the guid database column is indexed.
Now create a signing url that you will send to Larry. Something like:
https://myapplication.example.com/docusign-ceremony/[guid]
Send the url to Larry
When Larry clicks on the URL:
Your app is invoked
Look up the guid in the url in your database. You should find the
record that you stored there.
Retrieve all of the record's info: envelopeId, signerEmail,
clientUserId.
Call the EnvelopeViews::createRecipient API call with the data
and get back the signing ceremony url (that must be used within
5 minutes)
Redirect the user's browser to the url.
They'll sign the document(s) and then be re-directed back to your
application.
Done.
And guess what? This is pretty much what DocuSign does itself.
The response from Larry K above is correct, you would need to handle this on your side.
These are all the parameters that you can send as part of the request body for the POST {vx}/accounts/{accountid}/envelopes/{envelopeid}/views/recipient API endpoint and there are no options to set the expiration time for the recipient view that you create.
You could look into using PowerForms to see if they fit your needs. With PowerForms you can create a URL that users can click and it will allow them to fill out a specific DocuSign envelope. This might not fit your needs if you need to pre-fill some of the fields with information related to the specific recipient but it might be worth looking at.
PowerForms Documentation:
https://www.docusign.com/features-and-benefits/features/powerforms
Please correct me if I'm wrong but I think that your goal is creating the recipient view URL, creating an email formatted in a specific way and sending that email to the recipients.
If you use the branding feature you could specify the format for your email (if you want to use a specific message) and just send the envelope to your recipients. Once the recipients receive the email they'll see the message in the format that you specified and the link for accessing the envelope would be a regular DocuSign link that doesn't expire.
The link below shows how to create Brands in your account. Specifically signing brands would allow you to set the email content.
If you have multiple email formats you could create multiple brands and just specify the brandId when creating the envelope.
I hope this helps.
Branding:
https://support.docusign.com/guides/ndse-admin-guide-configure-branding

How can I pull a list of all the envelopes sent/received by all the users (like in report tab) through Docusign REST API?

I am an admin account user and to get insights from data I need to pull the details of all the envelopes from all accounts. The similar thing is what a report provides in Docusign dashboard but I need the list of recipients as well. Can anyone please help me. Thanks.
Listing envelopes sent by your users: Envelopes::listStatusChanges
I think that call may cover envelopes sent by anyone in your account (if the accessToken represents a user with admin privileges). But I'm not sure.
If it doesn't then you can loop through the account's users.
Tracking who has received an envelope through their DocuSign account is done with the Folders::listItems API call. You may need to list both the Inbox and Deleted folders. You also need to check that the person signed the specific envelope vs receiving it for some other reason (cc, certified copy, etc).
Finally, an alternative if you have higher volumes is to purchase the DocuSign Report Feed product (see note below). It will send you DB table dumps about your account activity on a regular basis so you can do your own reporting on DocuSign activity. It is the best way to have full access to report data. Ask your DocuSign contact for more info.
Note: I'm not sure of the exact name for the reporting product.
This can be done if you install DocuSign for Salesforce managed package and use Connect feature in DocuSign. Configure your webhooks to create DocuSign Status and DocuSign Recipient Status records for each send. Any DocuSign objects or custom object can be used in the Connect configuration, after selecting objects, select which events you want the results to be pushed back to Salesforce.
Use a parent object to store envelope details and child object for the recipient data. Use Envelope Id to relate the child records to the parent. Eventually, you will be able to build various reports on Salesforce.
More info here: https://support.docusign.com/guides/dfs-admin-guide-ds-connect-for-salesforce

Resources