We just released a new endpoint to the ReportingCloud Web API:
This endpoint returns information about a template located in the template storage. It returns a JSON structure with the template name, the contained merge fields, the nested merge block structure and included merge fields of the merge blocks.
The following sample CURL shows the usage and the return value:
The wrappers implement a new TemplateInfo object that returns the merge block and merge field structure like in this sample:
This new method allows you to retrieve the contained merge fields of a template. Consider the following scenario: You would like to create an HTML form with input elements based on merge fields of a template. Using the templates/info endpoint, you can loop through all fields in order to create input form elements for user input. After the users completed this HTML form, you can merge back the data into the template in order to create a resulting document.
Start today with ReportingCloud and sign up for a free trial account.