Skip to main content

Hi,

I'm encountering an issue when using the compositeTemplates feature to create an envelope from a template that contains multiple documents.

When retrieving this template via the EnvelopeTemplates:list endpoint, only the first document is returned in the response - the remaining documents are omitted.

This behavior is different from what I observe in the DocuSign web UI. If I simulate the same process (e.g., by creating an empty envelope and applying the templates), all documents are present as expected.

Is this a known limitation of the EnvelopeTemplates:list API? Or am I missing something in the way the template is structured or retrieved?

 

Thanks in advance for any help or clarification.

Hi ​@JanS 

If you want to retrieve the documents of a template, you need to use the API getDocument to retrieve all the documents you have in your template.

If you need help in a to analyze a specific case, you'll need to open a support ticket with our Support team, as custom tabs are associated with a specific account. The team will need to review additional data related to your account to fully understand what happened in your case.

You can do that through the Web Form or by logging in to the Support Site and selecting Create a Case

 

Thank you.


Hi ​@camila.yumi,

 

thank you for your response.

I am not trying to retrieve all documents in the template.

As the message states, I am trying to use EnvelopeTemplates:list endpoint, this enpoint should return information about which template was used for which document in the envelope.

The endpoint doesn't work correctly when I create the envelope using composite templates - it returns the information only about first document in the template, not the others.

My question is whether this is expected behaviour or not.

This forces us to use much more API calls - as the endpoint works correctly when I create empty envelope and apply the templates with another call, then another call is needed for adding documents. Reccomended approach - as I understood from documentation - is to use composite templates, but this breaks the endpoint mentioned above.


Basically this would be the flow: 

 

Create envelope using composite templates - server template
Endpoint: Envelopes:create
Payload: 

{
"compositeTemplates": s
{
"serverTemplates": s
{
"sequence": "1",
"templateId": "any template that has documents count > 1"
}
]
}
],
"status": "created"
}

Try to recieve template for each of the document 

Endpoint: EnvelopeTemplates:list
Payload: none - pass envelope id in URL

Response looks like this:
 

{
"templates": a
{
"templateId": "9fc52fd7-ec14-456b-977b-1a66abe4f326",
"name": "Long stay agreement - two documents",
"documentId": "1",
"applied": "true",
"uri": "/templates/9fc52fd7-ec14-456b-977b-1a66abe4f326"
}
]
}


When I would do the same with envelope created from UI / api but not composite template response look like this:
 

{
"templates": l
{
"templateId": "9fc52fd7-ec14-456b-977b-1a66abe4f326",
"name": "Long stay agreement - two documents",
"documentId": "1",
"applied": "true",
"uri": "/templates/9fc52fd7-ec14-456b-977b-1a66abe4f326"
},
{
"templateId": "9fc52fd7-ec14-456b-977b-1a66abe4f326",
"name": "Long stay agreement - two documents",
"documentId": "2",
"applied": "true",
"uri": "/templates/9fc52fd7-ec14-456b-977b-1a66abe4f326"
}
]
}

 

Both envelopes are created from same template and were not tampered with. Yet, when using composite templates the endpoint returns data only for the first document from the template.


Reply