0

We are trying to create a composite template using 2+ templates using the REST API. We create a draft envelope first from the templates, then send the envelope.

We call the REST URI:

https://demo.docusign.net/restapi/v2/accounts/e3a6986d-edb6-465d-8b7a-782867f37dd8/envelopes

with the JSON

Body:

{
  "status": "created",
  "emailBlurb": null,
  "emailSubject": null,
  "eventNotification": {},
  "compositeTemplates": [
    {
      "serverTemplates": [
        {
          "templateId": "4da7730b-fc1a-4ea1-bcd9-bc7e55e13271",
          "sequence": 1
        }
      ],
      "inlineTemplates": [
        {
          "sequence": 1,
          "recipients": {
            "signers": [
              {
                "roleName": "RoleOne",
                "recipientId": "49c9c05b-b0c2-4c68-8260-28b574119e7f",
                "name": "Tester N",
                "email": "YYYYY@gmail.com"
              }
            ]
          }
        }
      ]
    },
    {
      "serverTemplates": [
        {
          "templateId": "3ae253af-4884-4185-9354-b80f37511ce4",
          "sequence": 2
        }
      ],
      "inlineTemplates": [
        {
          "sequence": 2,
          "recipients": {
            "signers": [
              {
                "roleName": "RoleOne",
                "recipientId": "ee3cb7f5-8c38-4790-af81-2c49726e27c3",
                "name": "Tester N",
                "email": "YYYYYY@gmail.com"
              }
            ]
          }
        }
      ]
    }
  ]
}

This creates the draft envelope, and we can access it and retrieve the tabs. We get the signers information for each template separately with a call to Get Recipients Status

/accounts/e3a6986d-edb6-465d-8b7a-782867f37dd8/envelopes/#{template_id}/recipients

then we "send" the draft envelope using

PUT https://demo.docusign.net/restapi/v2/accounts/e3a6986d-edb6-465d-8b7a-782867f37dd8/envelopes/476ad2d1-2134-402d-9404-ed04df15508f

{"status":"sent"}

and the response is status: 200 {}

Finally when we try to get the recipients view to show it to the signer using

/accounts/e3a6986d-edb6-465d-8b7a-782867f37dd8/envelopes/476ad2d1-2134-402d-9404-ed04df15508f/views/recipient

We get the error response:

{"errorCode"=>"UNKNOWN_ENVELOPE_RECIPIENT",
 "message"=>
  "The recipient you have identified is not a valid recipient of the specified envelope."}

Can someone please help determine what we are doing wrong?

Thanks LON

Larry K
  • 47,808
  • 15
  • 87
  • 140
LOA
  • 11
  • 1
  • 1
    It appears you're not using `ClientUserId`, which is a requirement for the Recipient View (Embedded Signing) – Andrew Jun 02 '15 at 19:53
  • As Andrew mentions you need to use the `clientUserId` property, see [this page](https://www.docusign.com/developer-center/explore/features/embedding-docusign) on the Dev Center for more info. Also, what does your JSON request body look like on your final call that is returning the error?? – Ergin Jun 10 '15 at 19:31
  • Thanks for the help. We have added the clientUserID property and it is now working correctly LON – LOA Jun 12 '15 at 00:01

0 Answers0