Mitch
Mitch

Reputation: 1878

Optional DocuSign editor before sending

I am using the DocuSign API to generate digital agreements. So far all has gone well, but I now have a requirement to optionally have the contract sent to a user for editing within DocuSign before it is sent to the signatories.

My existing API calls are fairly simple, just using a template for the document:

POST https://demo.docusign.net/restapi/v2/accounts/<account_id>/envelopes HTTP/1.1

{
  "status": "sent",
  "templateId": "<template_id>",
  "templateRoles": [
    {
      "email": "[email protected]",
      "name": "Person One",
      "roleName": "Signatory1"
    },
    {
      "email": "[email protected]",
      "name": "Person Two",
      "roleName": "Signatory2"
    }
  ]
}

I need to have the same template sent to an editing user to adjust the envelope details before delivering to the signatories.

Anybody had any luck with a similar requirement?

Things I have tried:

Upvotes: 1

Views: 107

Answers (1)

Praveen Reddy
Praveen Reddy

Reputation: 7393

You can use the following composite template to add an Editor in addition to the template roles you have.

{
  "status": "sent",
  "compositeTemplates": [
    {
        "serverTemplates": [
            {
                "sequence": "2",
                "templateId": "<template_id>"
            }
        ],
        "inlineTemplates": [
            {
                "sequence": "1",
                "recipients": {
                    "signers": [
                        {
                            "email": "[email protected]",
                            "name": "Person One",
                            "roleName": "Signatory1",
                            "recipientId": "1"
                        },
                        {
                            "email": "[email protected]",
                            "name": "Person Two",
                            "roleName": "Signatory2",
                            "recipientId": "2"
                        }
                    ],
                    "editors": [
                        {
                            "name": "person three",
                            "email": "[email protected]",
                            "recipientId": "3",
                            "routingOrder": "0"
                        }
                    ]
                }
            }
        ]
    }
  ]
}

Upvotes: 1

Related Questions