List of the templates you have on PandaDoc might grow pretty large. So when requesting the list of the templates by default PandaDoc would only provide the 1st page with 50 templates on the page and even if you raise this number to 100 with count=100, it might not be enough. So the right thing to do would be to iterate over the pages starting from 1 (not 0 but 1 !!!) and do it until the list you get is either empty or has less templates than specified by the count parameter.
There is another issue we face… say you have 1 000 templates and you can only get details for 50 per minute – it would take your application 20 minutes to refresh details for all the templates and for these 20 minutes would drastically throttle all the request to the same endpoint!
Therefore, you might want to consider these options:
- Refreshing only the Newly added templates;
- Refreshing only the Active/Enabled Templates (sometimes your application uses not all the templates, so you can disable the rest);
- Refreshing only the Newly Added and Active/Enabled Templates;
- Refreshing templates only from a specific template folder(s) specified with folder_uuid parameter;
- Refreshing only templates with a specific tag or search query (see q parameter).
Another way to run requests faster would be to use both Production and Sandbox limits simultaneously. This technique can increase your limit to 50+10 = 60 requests per minute (for templates and documents) and to 110 requests/minute for template folders and document folders. At the moment of writing both Sandbox and Production API KEYS return the same details for the templates, documents, document folders and template folders.
Using both quotas Production and Sandbox would complicate the code of your application and might be NOT worth it, so it is more advisable to ask PandaDoc support team to increase your limits instead of consuming both quotas, which can be considered as playing tricks with the service you rely on!
Kos Ovechko Oct 11, 2020
Next article "How to unlock from a Docusign, switch to PandaDoc and prevent future locking" >>