I want to get inputstream of documents present in document library and attachments in list items.
Related
I am trying to access the custom field values for documents that I download. I am able to list the completed envelopes and download the documents, but the custom fields are showing up as empty?
var docFields = envelopeApi.ListDocumentFields(AccountID, envelopeId, docId);
Console.WriteLine(docFields.DocumentFields.Count);
Count is always zero even though the custom fields have been filled in by the user?
The endpoint which you calling is to download the document custom fields which is added by the sender as the metadata of the document. It will not help you in downloading the form data entered by the signer on the document. To download form data via API, you can use GET /v2/accounts/{accountId}/envelopes/{envelopeId}/form_data, more details available at getFormData DS Docs. You can also use to download tab details for the recipients using GET /v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs, more details available at Download Recipient tab data
Most recommended way is to setup DS Connect so that you do not have to poll DS API to get envelope status or form data etc, instead host a webservice on your side and configure the same in DocuSign so that DocuSign can push the required data to your webservice in an XML format.
The docusign website allows for me to save a document as a template, but I have not been able to find a way to do this programmatically through the API. Is there a simple way to save a document as a template?
Yes, you can create a Template via the API by issuing this request:
POST /v2/accounts/{accountId}/templates
The API documentation contains details about this operation.
UPDATE
Do I understand correctly that your goal is to create a Template that's based upon an existing DocuSign Document, i.e., to mimic the following functionality in the DocuSign web UI?
If that's the case, then I'm not aware of any single API call that can do this. Instead, I believe you'll need to issue a series of API calls, to retrieve info about the existing Document(s) and then create the new Template using that info:
1) Get information about the existing DocuSign Document (envelope): GET /v2/accounts/{accountId}/envelopes/{envelopeId} (docs)
This operation returns recipient info (including tabs for each recipient) as well as envelope data like email subject, email body, reminders, etc. It also returns a documentsUri property that you can use to get the document(s) that belong to the envelope.
2) Get the list of document(s) that the envelope contains by issuing a GET request to the URI specified by the documentsUri from the prior response. (docs)
This operation returns information about each document in the specified envelope, but does not return document contents.
3) For each document listed in the prior API response, issue a GET request to the URI specified by the uri property for the document. (docs)
4) Finally, create a new Template using the data that you received in response to the previous API requests: POST /v2/accounts/{accountId}/templates (docs)
Note: As a final note -- if you're using one of the DocuSign SDKs, it's possible that there might be a function that you can call to implement this scenario, without having to piece together all of these API calls yourself. I'm not familiar enough with the SDKs to say whether or not they provide this type of functionality, but it'd be worth checking for, if you're using an SDK.
I am writing a Java program that will download docusign documents and save to my local file system. That is already working, but now I'd like to (as a docusign admin) download ALL completed documents regardless of the envelope and document type/ID. How can I achieve this?
Right now, I am only able to retrieve ALL documents by envelope ID and document ID.
Documents are children of envelopes. So you need to list the envelopes, then retrieve their associated documents.
You have to get the list of envelopes, then get every documents are into each envelope :
Check this link in docusign support. Remember you have a limit of 5000 api calls in one hour.
I am trying to use the Logic App 'List Records' connector for CRM Online to move attachments to SharePoint Online, For example- when an email is created with an attachment in CRM, I am trying to move the attachment to SharePoint Online. I am successful in moving all the attachments from all the emails in the system in one go but I want to filter the attachments based on single email as similar to how we do in C# plugin/workflow by querying the entity "activitymimeattachment". But I couldn't achieve it through filtering in Logic Apps(I have tried entering filter as "_objectid_value eq EMAILMESSAGE") AND also from the given list of entities, or by entering a custom value of the entity as "activitymimeattachment" which is not exposed. My Logic App is Failing . If this entity is not exposed, how can we can get the attachment list for an email?
Please give some suggestions on it...Many Thanks.
Trigger on the creation of attachment event. I am doing this way because using a function I can get the GUID of email.
Microsoft has only exposed attachmentid field.
I was trying to trigger LA on create of Attachment, However logic App was not triggering, even when I was testing it after adding a file on email entity. I think this a bug.
I want to create a envelope in Docusign from an external source. I am having the external file URL (a PDF or DOC). So does the API support like I will give an external URL and it will upload it to docusign by creating a new envelope.
In order to add a file to a DocuSign Envelope, you need to specify the document bytes in the API request. It's not possible to simply specify the URL in the request and have DocuSign read the file automatically using the URL.
Using the REST API, there are a couple of ways to supply the document bytes in the Create Envelope API request -- the simpliest way is to include the base64-encoded byte stream in the documentBase64 property under the document object. See the REST API Guide for further details (https://10226ec94e53f4ca538f-0035e62ac0d194a46695a3b225d72cc8.ssl.cf2.rackcdn.com/rest-api-guide-v2.pdf).