I am using composite templates with server templates and would like to know the template id that was used to generate the document in the payload that gets sent to the webhook? Is that possible?
Our setup looks similar to this (not complete):
{
"compositeTemplates":[
{
"compositeTemplateId":"888cec02d-47a1-49df-be44-948e8f42383a",
"inlineTemplates":[
{
"recipients":{
"signers":[
{
"clientUserId":"bjangles",
"email":"bojangles@premierinc.com",
"name":"Bo Jangles",
"recipientId":"298463583",
"roleName":"Signer1"
}
]
},
"sequence":"3"
}
],
"serverTemplates":[
{
"sequence":"2",
"templateId":"888cec02d-47a1-49df-be44-948e8f42383a"
}
]
},
{
"compositeTemplateId":"999cec02d-47a1-49df-be44-948e8f42383a",
"inlineTemplates":[
{
"sequence":"3"
}
],
"serverTemplates":[
{
"sequence":"4",
"templateId":"999cec02d-47a1-49df-be44-948e8f42383a"
}
]
}
]
}
In the DocumentStatus Node sent to us in the XML payload from DocuSign
<DocumentStatuses>
<DocumentStatus>
<ID>1</ID>
<Name>Test.pdf</Name>
<TemplateName>Test 1</TemplateName>
<Sequence>1</Sequence>
</DocumentStatus>
<DocumentStatus>
<ID>2</ID>
<Name>Test.pdf</Name>
<TemplateName>Test 2</TemplateName>
<Sequence>2</Sequence>
</DocumentStatus>
</DocumentStatuses>
I can see the Template Name that was used but I would like to have the template Id as well. We have that as a business key in our database for tracking what was actually signed.
Thanks!
You need to make below API call to know the templateId used to create an envelope:
GET /v2/accounts/{accountId}/envelopes/{envelopeId}/templates
Detail documentation is available here