Create a signing request "From Composite Templatesv2/accounts/:accountId/envelopes"

StackOverflow https://stackoverflow.com/questions/23612932

  •  20-07-2023
  •  | 
  •  

Question

I have used the web UI at (http://iodocs.docusign.com/) to execute some API calls. Everything seems fine but I am not sure that I know how to use the API to create a new signature request: "From Composite Templatesv2/accounts/:accountId/envelopes"

The attached json is the request that is sent with the configuration I have specified:

{
  "emailBlurb": "blurb",
  "emailSubject": "subject",
  "status": "Created",
  "templateId": "599D3416-55C6-49D6-9F81-0C5F29050632",
  "compositeTemplates": [
    {
      "serverTemplates": [
        {
          "sequence": "1",
          "templateId": "599D3416-55C6-49D6-9F81-0C5F29050632"
        }
      ],
      "inlineTemplates": [
        {
          "sequence": "2",
          "documents": [
            {
              "name": "etest.docx",
              "documentId": "5"
            }
          ],
          "recipients": {
            "signers": [
              {
                "roleName": "signer",
                "recipientId": "1"
              }
            ]
          }
        }
      ]
    }
  ]
}

The request is sent, I receive it but I am wondering how to:

1) Specify a new signers using this UI. I have added one, but I cannot specify the email address.

2) Add a new document. I have added one but the document is not really uploaded.

I have found how to do 1) using directly an http POST:

curl --request POST 'https://demo.docusign.net/restapi/v2/accounts/487325/envelopes' --header 'Content-Type: application/json' -H 'Accept: application/json' --data '{ emailSubject: "Test 3", emaiBlurb: "Using composite template structure", status: "sent", compositeTemplates: [{ serverTemplates: [{ sequence: "1", templateId: "599D3416-55C6-49D6-9F81-0C5F29050632" }], inlineTemplates: [{ sequence: "1", recipients: { signers: [{ email: "test.email@gmail.com", name: "Joe Bloggs", recipientId: "1", roleName: "signer", tabs: { textTabs: [{ value: "Joe Bloggs", tabLabel: "name" }, { value: "Joe", tabLabel: "first_name" }] } }] } }] }] }' -H 'Authorization:bearer pFJjeUmiOJ+6SzDktsTIPr4RVMM='

but I do not find how to add a new document.

What I would like to do is to use a template but add new documents, new signers and new tabs.

Thanks

Was it helpful?

Solution

The answer I just posted to this other question describes how to create an Envelope from a combination of server template(s) and document(s): getting unspecified error in docusign API while using COMPOSITE template.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top