Generate a PDF from any backend that can send HTTP
Use Peedief from a server, scheduled job, webhook handler, internal tool, or automation workflow. The API returns hosted links you can pass to the next step.
curl
curl -X POST "https://peedief.com/api/templates/by-name/invoice/pdf" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{
"contextJson": {
"customerName": "Acme Studios",
"invoiceNumber": "INV-1042",
"items": [
{ "description": "PDF generation", "quantity": 1, "price": 99 }
],
"total": 99
},
"fileName": "invoice-1042.pdf"
}'
Node.js
const response = await fetch(
'https://peedief.com/api/templates/by-name/invoice/pdf',
{
method: 'POST',
headers: {
'x-api-key': process.env.PEEDIEF_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
contextJson: {
customerName: 'Acme Studios',
invoiceNumber: 'INV-1042',
total: 99
},
fileName: 'invoice-1042.pdf'
})
}
);
const pdf = await response.json();
console.log(pdf.url, pdf.previewUrl);
Python
import os
import requests
response = requests.post(
"https://peedief.com/api/templates/by-name/invoice/pdf",
headers={
"x-api-key": os.environ["PEEDIEF_API_KEY"],
"Content-Type": "application/json",
},
json={
"contextJson": {
"customerName": "Acme Studios",
"invoiceNumber": "INV-1042",
"total": 99,
},
"fileName": "invoice-1042.pdf",
},
)
pdf = response.json()
print(pdf["url"], pdf["previewUrl"])