Overview
The following operations allow you to work with envelope documents. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to carry out operations on envelope documents, see Sample configuration.
Operation | Description |
---|---|
Gets a list of all documents from an envelope | |
Gets the specified document from an envelope | |
getDocumentFromAnEnvelope | Gets the specified document from an envelope |
envelopeDocumentsUpdateList | Adds one or more documents to an existing envelope document. |
Operation details
This section provides details on each of the operations.
Getting a list of envelope documents
The listEnvelopeDocuments
operation allows you to gets a list of documents from an envelope.
<docusign.listEnvelopeDocuments> <accountId>{$ctx:accountId}</accountId> <envelopeId>{$ctx:envelopeId}</envelopeId> </docusign.listEnvelopeDocuments>
Properties
accountId
: The ID of the account. This information was returned in the login response.envelopeId
: The ID of the envelope whose documents you want to retrieve.
Sample request
Following is a sample REST request that can be handled by the listEnvelopeDocuments
operation.
{ "apiUrl":"https://demo.docusign.net", "apiVersion":"v2", "integratorKey":"37f2a694-cf45-4cb3-8ee6-1396b9e75739", "userName":"thulas@gmail.com", "password":"XXXXXXXXXXXXX", "accountId":"1910007", "envelopeId":"18f8c59c-da74-4a59-a94d-29accc85f704" }
Related DocuSign API documentation
https://docs.docusign.com/esign/restapi/Envelopes/EnvelopeDocuments/list/
Getting a specific document from an envelope
The getDocumentFromAnEnvelope
operation allows you to retrieve the specified document from an envelope.
<docusign.getDocumentFromAnEnvelope> <accountId>{$ctx:accountId}</accountId> <envelopeId>{$ctx:envelopeId}</envelopeId> <documentId>{$ctx:documentId}</documentId> </docusign.getDocumentFromAnEnvelope>
Properties
accountId
: The ID of the account.envelopeId
: The ID of the envelope that contains the document.documentId
: The ID of the document to retrieve.
Sample request
Following is a sample REST request that can be handled by the getDocumentFromAnEnvelope
operation.
{ "apiUrl":"https://demo.docusign.net", "apiVersion":"v2", "integratorKey":"37f2a694-cf45-4cb3-8ee6-1396b9e75739", "userName":"thulas@gmail.com", "password":"XXXXXXXXXXXXX", "accountId":"1910007", "envelopeId":"18f8c59c-da74-4a59-a94d-29accc85f704", "documentId":"1" }
Related DocuSign API documentation
https://docs.docusign.com/esign/restapi/Envelopes/EnvelopeDocuments/get/
Add documents to existing envelope using multipart/form-data
The envelopeDocumentsUpdateList operation allows you to adds one or more documents to an existing envelope document using multipart/form-data.
<docusign.envelopeDocumentsUpdateList> <accountId>{$url:accountId}</accountId> <envelopeId>{$url:envelopeId}</envelopeId> </docusign.envelopeDocumentsUpdateList>
Properties
accountId
: The account ID. This information is returned in the login response.envelopeId
: The ID of the envelope that contains the document.
Sample request
Following is a sample REST request that can be handled by the envelopeDocumentsUpdateList operation.
--AAA Content-Disposition: form-data Content-Type: application/json { "documents": [ { "documentId": "3", "name": "sampleDoc.pdf", "transformPdfFields": "false" } ] } --AAA Content-Disposition: attachment; filename="sampleDoc.pdf"; documentId="3" Content-Type: application/pdf VGhlIEJTQiBudW1iZXIgaWRlbnRpZmllcyBhIGJyYW5jaCBvZiBhIGZpbmFuY2lhbCBpbnN0aXR1dGlvbiBpbiBBdXN0cmFsaWEu --AAA--
Note
envelopeDocumentsUpdateList operation supports to adds one or more documents to an existing envelope document with the Content-Type multipart/form-data with boundary as a pass-through scenario.
When invoke the operation using proxy consider the following things as well.
Content-Type:multipart/form-data; boundary=AAA
Give the apiUrl, apiVersion, integratorKey, userName, password, accountId and envelopeId as URL params with the request.
Sample configuration
Following is a sample proxy service that illustrates how to connect to DocuSign with the init
operation and use the getDocumentFromAnEnvelope
operation. The sample request for this proxy can be found in getDocumentFromAnEnvelope sample request. You can use this sample as a template for using other operations in this category.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="createList" transports="https http" startOnLoad="true" trace="disable"> <description/> <target> <inSequence> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="apiVersion" expression="json-eval($.apiVersion)"/> <property name="integratorKey" expression="json-eval($.integratorKey)"/> <property name="userName" expression="json-eval($.userName)"/> <property name="password" expression="json-eval($.password)"/> <property name="blocking" expression="json-eval($.blocking)"/> <property name="accountId" expression="json-eval($.accountId)"/> <property name="envelopeId" expression="json-eval($.envelopeId)"/> <property name="documentId" expression="json-eval($.documentId)"/> <docusign.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiVersion>{$ctx:apiVersion}</apiVersion> <integratorKey>{$ctx:integratorKey}</integratorKey> <userName>{$ctx:userName}</userName> <password>{$ctx:password}</password> <blocking>{$ctx:blocking}</blocking> </docusign.init> <docusign.getDocumentFromAnEnvelope> <accountId>{$ctx:accountId}</accountId> <envelopeId>{$ctx:envelopeId}</envelopeId> <documentId>{$ctx:documentId}</documentId> </docusign.getDocumentFromAnEnvelope> <respond/> </inSequence> <outSequence> <log/> <send/> </outSequence> </target> <parameter name="serviceType">proxy</parameter> </proxy>