I need to fill some fields in our fillabe .pdf, apply our Docusign template to it and do a bulk send for 2 roles, so here is my approach:
1- I create a draft envelope from the pre-filled .pdf and I use the template in creating the envelope:
POST "https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes"
Body:
{
"status": "created",
"documents": [{
"documentId": "documentId_placeholder",
"name": "RaymondJames_prefilled.pdf",
"documentBase64": "lcDocumentBase64",
"transformPdfFields": "true"
}],
"templateId": "TemplateID_placeholder",
"templateRoles":
[
{
"roleName": "RecipientNo1RoleName_placeholder",
"isBulkRecipient": "true",
"name":"Name_placeholder",
"email":"Email_placeholder",
"emailSubject": "EmailSubject_placeholder",
"tabs":{
"textTabs":[
{
"tabLabel":"First Name",
"value": "FirstName_placeholder"
},
{
"tabLabel":"managertext",
"value": "ManagerText_placeholder"
}
]
}
},
]
}
2- Then I upload the bulk csv to the envelope bulk_recipients:
PUT "https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes/"+{envelopeId}+"/recipients/"+{recipientId}+"/bulk_recipients"
Body:
"Name,Email,Email Subject,managertext,Home Phone,First Name John S.,[email protected],Please revise the form and sign,Manager #1,888-111-1111,JS_firstname Mary S.,[email protected],Please revise the form and sign,Manager #2,888-111-1111,MS_firstname"
3- Then I change the status of the envelope to "Sent" and send the envelope to the bulk recipients.
The above is working but as soon as change the csv filed name from Name to Role1::Name (the way that is mentioned in the documentations), it looks for filed "Name" and doesn't accept the roles at all. so for adding roles I tried other endpoint but none could do what I need for having pre-filled pdf + docusign template and docusign fileds added + bulk_recipients.
I would appreciate your help on this.
Thanks,
Kathy