QuickReports

Introduction

Welcome to the Quick Reports documentation! 🚀

How it works?

  1. 1. Send a POST request with your JSON report structure.
  2. 2. Quick Reports processes the data, generates a PDF, and returns a download URL.
  3. 3. Retrieve the PDF and share or store it as needed.

Getting Started

1. Send a POST Request

To generate a report, send a POST request to the API endpoint with your JSON data.

curl -X POST "https://api.quickreports.dev/reports" \
-H "Content-Type: application/json" \
-H "X-API-KEY: XXXXXXXX" \
-d '{
  "title": "Sales Report - Q1 2024",
  "elements": [
    {
      "type": "header",
      "mainHeading": "Main Heading text",
      "backgroundColor": "#000000",
      "textColor": "#FFFFFF"
    },
  ]
}'

Using the API

Quick Reports provides a simple REST API that allows you to generate PDF reports from structured JSON data. This section explains how to send requests, handle responses, and customize reports.

🟢 API Endpoint

To generate a report, send a POST request to the following endpoint:

https://api.quickreports.dev/reports

🔓 Authentication

The /reports endpoint requires authentication. Generate your access key from the dashboard and include it in your request headers.

-H "X-API-KEY: YOUR-ACCESS-KEY"

🟠 Request Format

The request body must be in JSON format, defining the report structure. Here's an example request:

🔹 Example: Sending a Report Request.

curl -X POST "https://api.quickreports.dev/reports" -H "Content-Type: application/json" -d '{
  "title": "Sales Report - Q1 2024",
  "elements": [
    {
      "type": "header",
      "mainHeading": "Main Heading text",
      "mainImage":"https://s3.amazonaws.com/example.png",
      "subHeading":  "Subheading text",
      "backgroundColor": "#000000",
      "textColor": "#FFFFFF"
    },
    {
        "type":"table",
        "orientation":"Horizontal",
        "tableHeaders":["Product", "Revenue", "Growth"],
        "tableData":[{
            "Product": "Product A",
            "Revenue": "$95,800",
            "Growth": "+8%"}]
    }
  ]
}'

Reports support multiple elements, including headers, tables, and charts.

Next

Elements >>