By Advicement | Updated 5 months ago | Business Software

7.6 / 10



Service Level


Back to All Tutorials (1)

How to Integrate with DynamicDocs API and Generate High-Quality PDF Documents

This tutorial article will demonstrate how you can integrate with DynamicDocs API through RapidAPI.com and create PDF documents from dynamic templates. Our aim is to create a walkthrough tutorial (in less than 1000 words) to enable anyone to integrate with DynamicDocs API in less than 10 minutes. Without wasting any further time, let’s go!

What is DynamicDocs API?

DynamicDocs created by ADVICEment is a publicly available API that allows users to generate dynamic PDF documents in a matter of seconds. The document templates are written in LaTeX, a mark-up style language that separates formatting and content. LaTeX consistently applies user-defined style throughout the documents and has become very popular in academic circles due to its ability to create high-quality, complex documents. The template files are stored under the user’s ADVICEment account, where they can be tested and compiled online. The files utilise special commands that can create dynamic text with logic statements, tables spanning multiple pages, great-looking headers & footers and custom charts based on the underlying data. For more information on writing templates visit the DynamicDocs documentation page. Once the templates are set up and published, users can call the DynamicDocs API with document data in the JSON format and receive the PDF document in a matter of seconds.

What information is needed to create the first PDF document?

The following bits of information is required to create your first API call:

  • ADVICEment API Key (known as Adv-Security-Token header parameter)
  • RapidAPI API Key (known as X-RapidAPI-Key header parameter)
  • Template Identifier (known as template-token query parameter)

Get ready to write these down in the next few steps.

Step 1: Create your account on ADVICEment.io and publish your first template.

You will need to create an account on ADVICEment by simply going to the signup page. There you will be asked some basic details regarding the user and their organisation. Once registered, you will receive an automated email with confirmation instructions.

ADVICEment DynamicDocs API Signup Page

Once you have accessed your account, you can generate your ADVICEment API Key (Adv-Security-Token) by going to the ‘Dashboard’ -> ‘Account Details’ -> ‘Edit’ and then under Security Settings, clicking on ‘Generate Account Security Token’. Be prepared to write it down or copy it into your password store. Note that you cannot access it again, and for security reasons, should you lose it, you will have to generate a new one which will mean having to change your existing API calls.

ADVICEment DynamicDocs API Dashboard

ADVICEment DynamicDocs API Account Details

Now let’s create our document template, which can be done by going to the ‘My Templates’ page and clicking on the ‘Create New Templates’ button. You will then be presented with various document templates to get you started. For the purpose of this tutorial, select ‘Simple Contract’ while keeping the default options. You can then open the ‘Simple Contract’ template on the ‘My Templates’ page. Once opened, you will be able to edit the template files, add images and compile them with the data.json payload. Simply click the blue ‘Publish’ button at the top of the page and get your template-token, which can be found in your template’s ‘Settings’ page.

ADVICEment DynamicDocs API Template Edit

ADVICEment DynamicDocs API Template Settings

Step 2: Create an account on RapidAPI.com.

To make use of the DynamicDocs API and subscribe to the Basic plan, which gives you 200 free requests every month, you will need to register an account with RapidAPI.com. This step can be skipped if you already have an account with RapidAPI and have your X-RapidAPI-Key. If not, then simply visit the RapidAPI.com signup page, verify your email address with a code and go to ‘My Apps’ -> ‘Default Application’ -> ‘Security’ section of your account. There you will find the X-Rapid-API-Key token, also known as ‘Application Key’. Finally, visit the DynamicDocs plans page and subscribe to the Basic plan to get notified of the latest API news.

DynamicDocs API on RapidAPI.com

Step 3: Make your first API call.

You are now all set to make your first API call and make your first dynamic PDF document. The table below lists all the information you will need with the double brackets representing the actual parameter:

DynamicDocs API End Point Summary

The body of the API call is the dynamic data used in the document and can be found when opening a template in Step 1. Note that you can use a great tool like Postman to perform the API call or simply go to the DynamicDocs End Point page on RapidAPI and test it there with your parameters.

DynamicDocs API Endpoint on RapidAPI.com

Final Remarks

Now that you’re all set, go out and create your dynamic PDF documents! We hope we achieved our objective of creating an easy to follow tutorial. If you have any comments, suggestions or critiques, please do not hesitate to get in touch with us using the contact form. We will ensure to get back to you timeously.

PS. The final word count is 908; #winning.

Rating: 5 - Votes: 1