Api Overview
Endpoints
Endpoint List and Description
The API supports the following main endpoints:
Endpoint | Description |
---|---|
/api/v1/templates | Handles operations related to the template database |
/api/v1/generate/single/:id | Generates a single PDF document from a specific template |
Please replace :id
with the unique identifier (UUID) of your template.
Request and Response Examples
Here's an example of how you can use a curl API call to generate a single PDF document from a template. Check the integration guides for language specific examples.
Get endpoint example
curl -X GET \
-H "Authorization: Bearer <your_api_key>" \
https://api.pdfdesignapi.com/api/v1/templates
Replace <your_api_key>
with your actual API key
Post example with PDF result
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your_api_key>" \
-d '{
"data": {
"date": "",
"customer": {
"name": "",
"email": "",
"address": ""
},
"items": [
{
"description": "",
"quantity": 0,
"price": 0
},
{
"description": "",
"quantity": 0,
"price": 0
}
]
}
}' \
https://api.pdfdesignapi.com/api/v1/generate/single/00000000-0000-0000-0000-000000000000 \
-o result.pdf
Replace <your_api_key>
with your actual API key and 00000000-0000-0000-0000-000000000000
with the UUID of your template. The -d
option contains the data that will be used to populate the dynamic fields in your template. The results will be saves in the file result.pdf