You need to have an array of compositetemplates, DocA and DocB will come from ServerTemplates and DocC will add as an inlineTemplates. I have put a sample CompositeTemplate calls, where templatedId - E5577130-E7C4-4601-B618-95DD79644971 is having adding document to the envelope from first composite template (Your DocA/DocB scenario) and "documentId" : "2" coming from inlineTemplate. And recipients are declared in each composite templates separately.
POST /restapi/v2/accounts/{{acctID}}/envelopes HTTP/1.1
Host: demo.docusign.net
X-DocuSign-Authentication: <DocuSignCredentials><Username>{{user}}
</Username><Password>{{pwd}}</Password><IntegratorKey>{{IntegratorKey}}
</IntegratorKey></DocuSignCredentials>
Content-Type: multipart/form-data; boundary=BOUNDARY
--BOUNDARY
Content-Type: application/json
Content-Disposition: form-data
{
"emailSubject": "REST example - two docs, one from template and one direct",
"enableWetSign": false,
"enforceSignerVisibility": false,
"status": "created",
"compositeTemplates": [
{
"compositeTemplateId": "1",
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": "[email protected]",
"name": "Daffy Duck",
"recipientId": "1",
"roleName": "Primary_Signer",
"tabs":{
"textTabs":[
{
"documentId":"1",
"pageNumber":"1",
"xPosition":"525",
"yPosition":"750",
"recipientId":"1",
"locked":"true",
"tabLabel":"Primary_TrxID",
"value": "e93k33"
}
]
}
}
]
},
"sequence": "2"
}
],
"serverTemplates":
[
{
"sequence": "1",
"templateId": "E5577130-E7C4-4601-B618-95DD79644971"
}
]
},
{
"compositeTemplateId": "2",
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": "[email protected]",
"name": "Daffy Duck",
"recipientId": "1",
"roleName": "Primary_Signer",
"tabs":{
"textTabs":[
{
"documentId":"2",
"pageNumber":"1",
"xPosition":"525",
"yPosition":"750",
"recipientId":"1",
"locked":"true",
"tabLabel":"Primary_TrxID",
"value": "e93k33"
}
]
}
}
]
},
"sequence": "1"
}
],
"document" :
{
"documentId" : "2",
"name": "Option2"
}
}
]
}
--BOUNDARY
Content-Disposition: file; documentid=2; name="Option2";
filename="Option2.pdf"; compositeTemplateId=2
Content-Type: application/pdf
Content-Transfer-Encoding: base64
<DocBytesBase64>
--BOUNDARY--
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…