1

This is my JSON code so far:

{
  "status": "sent",
  "emailSubject": "This is an api Demo Doc, sent for signature",
  "recipients": {
    "carbonCopies": [
      {
        "email": "nila@gmail.com",
        "name": "Nilashree",
        "recipientId": "2"
      }
    ],
    "signers": [
      {
        "email": "{{signer1Email}}",
        "name": "Nilashree Nandkumar shirodkar",
        "recipientId": "1"
      }
    ]
  },
  "compositeTemplates": [
    {
      "inlineTemplates": [
        {
          "sequence": "1",
          "recipients": {
            "signers": [
              {
                "email": "nshiro2@students.towson.edu",
                "name": "Nila Joseph",
                "recipientId": "1",
                "defaultRecipient": "true"
              }
            ]
          }
        }
      ],
      "documents": {
        "documentId": "1",
        "name": "application_form.pdf",
        "transformPdfFields": "true",
        "documentBase64": "{{}}"
      }
    }
  ]
}

But I am getting the following error:

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

Can anyone please let me know what am I doing wrong?

Larry K
  • 47,808
  • 15
  • 87
  • 140

1 Answers1

0

Why are you using a composite template? Perhaps you are planning towards a later, more complicated envelope definition.

Your mistake is that each composite template can optionally contain only one document. The field name is document, not documents.

Instead of

  "documents": {
    "documentId": "1",
    "name": "application_form.pdf",
    "transformPdfFields": "true",
    "documentBase64": "{{}}"
  }

use

  "document": {
    "documentId": "1",
    "name": "application_form.pdf",
    "transformPdfFields": "true",
    "documentBase64": "{{}}"
  }

Also, I don't believe there's a need for the recipients outside of the composite templates structure. I'm not 100% sure about this issue though.

Larry K
  • 47,808
  • 15
  • 87
  • 140
  • I am using a composite template becase i think its the only way to auto-transform the PDF elements to Docisign Elements(Correct me if I am wrong) by using property transforPdfFields :'' true''.Thank you the solution worked. It was that incorrect use of's' in document element. – Nilashree Shirodkar Sep 25 '18 at 18:10
  • You don't need to use composite template. In the regular envelope definition document array, set "transformPdfFields": "true" – Larry K Sep 26 '18 at 06:23
  • Please "check" (accept) my answer since it solved your problem. Thanks! – Larry K Sep 26 '18 at 06:23
  • When I use transformPdfFileds:"true",does it place the DocuSign fields exactly next to the labels of PDF fields? In my case it just created the Docusign Satandards Fileds pallets on to the left.The user had to drag and drop fileds from pallet on to the form. Is there any property that I am missing to position auto transformed fields next to the particular PDf form Labels. – Nilashree Shirodkar Sep 27 '18 at 18:31
  • Sorry, I have not used the convert feature. Please ask a new question on stack overflow with the details of what is happening and what you'd like to happen – Larry K Sep 28 '18 at 04:33