1
votes

I am trying to create an envelope from a text document using the docusign Rest API and JSON, but we receive following error code

"errorCode": "ENVELOPE_IS_INCOMPLETE", "message": "The Envelope is not Complete. A Complete Envelope Requires Documents, Recipients, Tabs, and a Subject Line."

Please can someone tell me what I am missing?

Please find below the POST we are sending.

POST https://demo.docusign.net:7801/restapi/v2/accounts/XXXX/envelopes
Content-Length: 742
Content-Type: multipart/form-data; boundary=8B10626873356827771077AAF6D55D6E0
Connection: Keep-Alive
Accept: application/json
Host: demo.docusign.net
User-Agent: SAPNetWeaverApplicationServer(1.0;740)
x-docusign-authentication: <DocuSignCredentials><Username>XXXX</Username><Password>[omitted]</Password><IntegratorKey>[omitted]</IntegratorKey></DocuSignCredentials>
X-SecurityProtocol-Version: TLSv1

--8B10626873356827771077AAF6D55D6E0
Content-Type: application/json; charset=utf-8
Content-Length: 376
content-disposition: form-data

{ "emailBlurb": "Test Webui",  "emailSubject": "Test Webui", "status": "sent", "compositeTemplates": [{"inlineTemplates": [{ "sequence": "1", "recipients": { "signers": [{ "recipientId": "1", "name": "JESS", "email": "[email protected]","defaultRecipient": "true" }] } }],"document": {"documentId": "1","name": "f4506t.txt","transformPdfFields": "true"}  }]}
--8B10626873356827771077AAF6D55D6E0
Content-Type:  application/text; charset=utf-8
Content-Length: 11
content-disposition: file; filename="f4506t.txt"; documentid="1"

Hallo Webui
--8B10626873356827771077AAF6D55D6E0--
1
The error says that the payload that your are posting needs to have: Documents Recipients Tabs, and a Subject Line. are you including those on the object your are posting? - acromm
yes...it's everything included. - Themicaa
"Tabs" are missing - acromm

1 Answers

1
votes

There are few issues in your JSON:

a. Since you are uploading a text document so "transformPdfFields": "true" is not valid as it is only for PDF document and its required when you want to convert PDF fields to DocuSign tabs if those pdf fields are created as per DocuSign standard. b. Inside your "signers" property, no tabs are defined so DocuSign will not be able to know what you are planning to do with that document with any DocuSign tabs being present, Your signer node should look something like below:

"signers": [{
                    "recipientId": "1",
                    "name": "JESS",
                    "email": "[email protected]",
                    "tabs": {
                           "dateSignedTabs": [
                              {
                                 ......add required tab details
                              }
                           ],
                           "signHereTabs": [
                              {
                                 ......add required tab details
                              }
                           ]
                        }
                }]