1

到目前为止,这是我的 JSON 代码:

{
  "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": "{{}}"
      }
    }
  ]
}

但我收到以下错误:

"errorCode": "ENVELOPE_IS_INCOMPLETE",
"message": "信封不完整。完整的信封需要文档、收件人、标签和主题行。"

谁能让我知道我做错了什么?

4

1 回答 1

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.

于 2018-09-25T04:29:03.600 回答