'Document Matching with Signing Roles using API
I have an application which will call the DocuSign API endpoint as shown here:
curl --header "Authorization: Bearer ${access_token}" \
--header "Content-Type: application/json" \
--data-binary @${request_data} \
--request POST ${base_path}/v2.1/accounts/${account_id}/envelopes \
--output $response
and I am including a basic JSON body with the POST which includes two documents and 2 (or 3) signers. Then the results are passed through this endpoint:
curl --header "Authorization: Bearer ${access_token}" \
--header "Content-Type: application/json" \
--data-binary "{\"returnUrl\": \"https://REDACTED FOR SECURITY\"}" \
--request POST ${base_path}/v2.1/accounts/${account_id}/envelopes/${envelope_id}/views/sender \
--output $response
This API call returns a URL when followed, launches the default browser and opens the DocuSign tag editing screen with an overlay screen that shows all of the template matches we have built. Template Matches The Apply button is chosen on this screen and after a few seconds the user is allowed to view and verify all of the Tags that are applied. This is all working great...
My question comes in where I am wanting to programmatically pass the signer roles into the envelope so the Recipients are aligned properly. I am also wanting to pass in the Access Code too: Edit Recipient Screen Edit Recipient Screen
Can this be done? I cannot find details on how to pass this in or substitute the signer data that I did pass in with the roles that are defined in the templates that are being applied. We will always launch the Tag Edit screen before sending as a manual verification that all tags are present and aligned properly. This is because the docs we send are dynamically generated from a different system and they move items on the page based on the content. The templates do a very good job but 10% of the time we must manually adjust the resulting tags prior to sending.
Thank you in advance for any assistance or suggestions on how to accomplish this task...
Solution 1:[1]
You will need to know the template role name for the recipient you want to pass and then do something like this:
{
"templateId": "{GUID_TEMPLATE_ID}",
"templateRoles": [
{
"email": "[email protected]",
"name": "signer name",
"roleName": "signer",
"accessCode" : "123456"
},
]
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Inbar Gazit |
