I need to get the templateId related to each document in a composite templates envelope.
I am already calling the Envelope: get API to fetch recipient, tabs and documents under the envelope right after the Envelope: create API call. I cannot use another API call to EnvelopeTemplates API to get the templateId and documentId mapping because of the envelope polling limits.
Is there any way to include the templateId for each document in the Envelope: get API itself?
Polling limits apply only if you are making a GET request to the same resource (i.e. GET Envelope to the same envelope) in the span of 15 minutes. EnvelopeTemplates and Envelope are two separate resources. You can use the EnvelopeTemplates:listByDocument to get the template Id associated with a particular document.
If you are querying the same template that you are using to create an envelope, wouldn't it be better to cache the templateId since you would need it right after?