Skip to main content

Report Flow API - Getting Started

Welcome to the Report Flow API! This guide will help you generate PDFs in 5 minutes.

⚡ 5-Minute Quick Start

Step 1: Get API Keys (1 minute)

Access the Report Flow admin panel and get the following information:

  1. Navigate to Workspace SettingsAPI Keys
  2. Copy the Application Key (appkey) — used as the appkey HTTP header.
tip

Authentication uses a single appkey header (lowercase). Store the value securely.

Step 2: Check Design ID (1 minute)

  1. Go to Design Management
  2. Select the design you want to use
  3. Copy the Design ID (e.g., 550e8400-e29b-41d4-a716-446655440000)

Step 2.5: Check Parameter Structure (1 minute, Optional)

Check the parameter structure required by the design:

curl -X GET https://api.re-port-flow.com/v1/file/design/parameter/550e8400-e29b-41d4-a716-446655440000 \
-H "appkey: your-app-key"

Response example:

{
"customerName": "string",
"invoiceNumber": "string",
"amount": "number"
}
tip

For details on parameter structure, see the Design Parameters Guide.

Step 3: Generate Your First PDF (3 minutes)

Run the following cURL command in your terminal:

curl -X POST https://api.re-port-flow.com/v1/file/sync/single \
-H "Content-Type: application/json" \
-H "appkey: your-app-key" \
-d '{
"designId": "550e8400-e29b-41d4-a716-446655440000",
"version": 1,
"content": {
"fileName": "invoice.pdf",
"params": {
"customerName": "John Doe",
"invoiceNumber": "INV-2024-001",
"amount": 10000
}
}
}' \
--output my-first-pdf.pdf
success

On success, my-first-pdf.pdf will be saved to the current directory!

🎯 Main Use Cases

Use Case 1: Instant Invoice Generation

Generate and download PDFs instantly when users click a button.

Endpoint: Sync Single PDF Generation

// On button click
async function downloadInvoice(invoiceId) {
const pdf = await generatePDF({
designId: 'invoice-template',
version: 1,
fileName: `invoice_${invoiceId}.pdf`,
data: invoiceData
});

// Download in browser
downloadFile(pdf, `invoice_${invoiceId}.pdf`);
}

Use Case 2: Bulk Monthly Report Generation

Generate reports for all customers at month-end and send via email.

Endpoint: Async Multiple PDF Generation

// Batch processing
async function generateMonthlyReports(customers) {
const contents = customers.map(customer => ({
fileName: `report_${customer.id}.pdf`,
params: customer.data
}));

const result = await generateMultiplePDFsAsync('report-template', contents);

// Send emails to each customer
await sendEmailsWithPDFs(result);
}

Use Case 3: Preview Feature

Real-time preview in design editor.

Endpoint: Sync Single PDF Generation

// On preview button click
async function showPreview(designId, params) {
const pdf = await generatePDF({
designId,
version: 1,
fileName: 'preview.pdf',
data: params
});

// Display in browser
openPDFInNewTab(pdf);
}

🧭 API Overview

PDF Generation Endpoints

EndpointPurposeTimeoutResponse
POST /file/sync/singleSync single PDF120 secPDF file
POST /file/async/singleAsync single PDFNoneURL + fileId
POST /file/sync/multipleSync multiple PDFs120 secZIP file
POST /file/async/multipleAsync multiple PDFsNoneURL + fileId

Other Endpoints

EndpointDescription
GET /file/download/{uuid}Bulk ZIP download
GET /file/download/{uuid}/{fileId}Individual file download
GET /file/design/parameter/{designId}Get design parameters

🧪 Try in Postman

If you want to try the API right away, use our official Postman collection:

Postman Public Workspace

Run in Postman

The official Postman collection includes:

  • ✅ Runnable requests for all 7 endpoints
  • ✅ Automatic application-key authentication
  • ✅ Realistic sample parameters
  • ✅ Auto-test scripts for response validation
  • ✅ Error-case samples (412, 401, 400, 429)

📚 Next Steps

🔧 Limitations

  • Request Size: Maximum 50MB (Base64-encoded; ~37MB raw equivalent)
  • File Name: Anything except / \\ : * ? " < > | and control characters is allowed
  • Authentication: appkey header (lowercase) required on every request

💡 Sample Code

JavaScript (Node.js)

const axios = require('axios');

async function generatePDF() {
const response = await axios.post(
'https://api.re-port-flow.com/v1/file/sync/single',
{
designId: '550e8400-e29b-41d4-a716-446655440000',
version: 1,
content: {
fileName: 'invoice.pdf',
params: {
customerName: 'John Doe',
invoiceNumber: 'INV-2024-001',
amount: 10000
}
}
},
{
headers: {
'appkey': 'your-app-key'
},
responseType: 'arraybuffer'
}
);

return response.data;
}

Python

import requests

def generate_pdf():
url = 'https://api.re-port-flow.com/v1/file/sync/single'
headers = {
'appkey': 'your-app-key',
'Content-Type': 'application/json'
}
data = {
'designId': '550e8400-e29b-41d4-a716-446655440000',
'version': 1,
'content': {
'fileName': 'invoice.pdf',
'params': {
'customerName': 'John Doe',
'invoiceNumber': 'INV-2024-001',
'amount': 10000
}
}
}

response = requests.post(url, headers=headers, json=data)
return response.content

Integrations

You can call Report Flow without writing API code directly:

🆘 Support

For questions or support, please contact: