Create your first report in less than 10 minutes!
Access the control panel screen, click on your free subscription to open it, and click on the view key button.
curl -X POST --header "Content-Type:application/json;charset=UTF-8" --user "YOUR API KEY:" -d @orders-smallest.json http://gateway.flashreport.io/api/v1/report/new
Access the reports screen, click on the download icon of the first row.
curl -X POST --header "Content-Type:application/json;charset=UTF-8" --user "YOUR API KEY:" -d @orders-smallest.json http://gateway.flashreport.io/api/v1/report/new?template=orders
Access the reports screen again, click on the download icon of the first row.
Because we used a template, we were able to use custom headers and footers, sort data per country, count orders per city, and include a pie chart. Designing a template is extra work, but is necessary to have better looking reports. We recommend that you use Jaspersoft Studio to design your template and test it with your data file.
You have successfully generated a PDF document from JSON data, with and without using a template.
While using CURL to generate the report is useful for testing Flashreport api, it's not the usual way to do it. In most cases, you'll write code in your favourite programming language that generates the same HTTP POST command than CURL. This code will run in the system that has the information you want to generate PDF documents from. That system might be a business application, a big data process, a connected device...
Read the documentation to learn about additional options.
Check our code samples on GitHub