Synchronous generation
How does it work?
curl \
"https://api.pdfmonkey.io/api/v1/documents/sync" \
-X POST \
-H 'Authorization: Bearer YOUR-API-KEY' \
-H 'Content-Type: application/json' \
-d '{
"document": {
"document_template_id": "ID-OF-YOUR-TEMPLATE",
"status": "pending", // To force generation to be queued upon creation
"payload": {
"clientName": "Peter Parker",
"orderDate": "2050-03-14",
"products": [
{ "name": "Spider silk", "quantity": 12, "unitPrice": 123.50 },
{ "name": "Spandex fabric", "quantity": 2, "unitPrice": 28.90 }
]
},
"meta": {
"_filename": "2050-03-14 Peter Parker.pdf",
"clientRef": "spidey-616"
}
}
}'Response
Last updated
Was this helpful?
