# Convert any webpage to PDF
curl -X POST https://docuqueue.com/api/v1/convert \
-H "api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"urls": ["https://example.com"]}'
# Fill a template with JSON data
curl -X POST https://docuqueue.com/api/v1/templates/{template_id}/fill \
-H "api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"data": {"company_name": "Acme", "total": "$1,200"}}'
# Generate multiple PDFs from CSV data
curl -X POST https://docuqueue.com/api/v1/templates/{template_id}/fill-batch \
-H "api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"records": [{"company_name": "Acme"}, {"company_name": "Beta"}]}'
# Download PDF
curl -o output.pdf https://docuqueue.com/api/v1/download/{job_id} \
-H "api-key: YOUR_KEY"
import requests
API_KEY = "YOUR_KEY"
BASE = "https://docuqueue.com/api/v1"
HEADERS = {"api-key": API_KEY, "Content-Type": "application/json"}
# Convert any webpage to PDF
r = requests.post(f"{BASE}/convert", headers=HEADERS,
json={"urls": ["https://example.com"]})
job_id = r.json()["job_id"]
# Fill a template with JSON data
r = requests.post(f"{BASE}/templates/{template_id}/fill",
headers=HEADERS,
json={"data": {"company_name": "Acme", "total": "$1,200"}})
# Generate multiple PDFs from CSV data
r = requests.post(f"{BASE}/templates/{template_id}/fill-batch",
headers=HEADERS,
json={"records": [{"company_name": "Acme"}, {"company_name": "Beta"}]})
# Download PDF
pdf = requests.get(f"{BASE}/download/{job_id}", headers=HEADERS)
open("output.pdf", "wb").write(pdf.content)
const API_KEY = "YOUR_KEY";
const BASE = "https://docuqueue.com/api/v1";
const headers = {"api-key": API_KEY, "Content-Type": "application/json"};
// Convert any webpage to PDF
const res = await fetch(`${BASE}/convert`, {
method: "POST", headers,
body: JSON.stringify({urls: ["https://example.com"]})
});
const {job_id} = await res.json();
// Fill a template with JSON data
const fillRes = await fetch(`${BASE}/templates/${templateId}/fill`, {
method: "POST", headers,
body: JSON.stringify({data: {company_name: "Acme", total: "$1,200"}})
});
// Generate multiple PDFs from CSV data
const batchRes = await fetch(`${BASE}/templates/${templateId}/fill-batch`, {
method: "POST", headers,
body: JSON.stringify({records: [{company_name: "Acme"}, {company_name: "Beta"}]})
});
// Download PDF
const pdf = await fetch(`${BASE}/download/${job_id}`, {headers});
const buf = await pdf.arrayBuffer();
writeFileSync("output.pdf", Buffer.from(buf));