PDFs are generated from one or more templates used as pages
, filling their layers
with your data.
Method | URI |
---|---|
POST | https://api.placid.app/api/rest/pdfs |
{
"webhook_success": "https://webhook.url",
"passthrough": null,
"pages": [
{
"template_uuid": "<template_uuid>",
"layers": {
"title": {
"text": "Lorem Ipsum"
},
"logo": {
"image": "https://imageurl.png"
},
"qr-code": {
"value": "https://qr-code.url"
}
...
},
},
// ...
],
"modifications": {
},
"transfer": {
}
}
Field | Values | Description |
---|---|---|
webhook_success |
Webhook URL | After the PDF is created Placid will POST the response to this Webhook URL |
passthrough |
string or array |
Any data added to this parameter will be saved and sent in any subsequent webhooks and requests for this PDF (max-length is 1024 characters) |
pages |
array of page objects |
Your desired pages/templates; Add multiple templates to get a merged PDF |
transfer |
Additionally transfer the generated PDF to your storage |
The content of your PDF will be defined by an array of templates in your pages
object.
Field | Values | |
---|---|---|
pages.*.template_uuid |
The ID of the template used for your page | |
pages.*.layers |
Dynamically change the content and properties of your template layers |
Get your {template_uuid}
from the template overview in the Templates
tab of your Placid API project.
To transfer the generated video to your storage use the transfer
object.
Field | Values |
---|---|
transfer.to |
s3 |
transfer.key , transfer.secret |
Your credentials (Placid never stores them) |
transfer.bucket |
Your bucket name |
transfer.visibility |
public or private |
transfer.path |
File path (Define the full video path starting from the root directory of your bucket, including filename and file extension. Placid will overwrite existing files in the specified directory!) |
To modify the generated video use the modifications
object.
Field | Values |
---|---|
modifications.filename |
Filename of the generated PDF |
By default all PDFs are created async. Define a webhook_success
URL or poll the polling_url
of the response until the status of the response is finished
.
{
"id": 1,
"status": "queued",
"video_url": null,
"polling_url": null
}
Field | Values |
---|---|
id |
Unique pdf id for internal reference |
status |
queued The request has been put into the queue. finished The pdf has been created successfully. error There was an error. |
pdf_url |
URL to created pdf or null |
polling_url |
Endpoint that you can GET poll for status updates |
{info} We recommend storing created PDFs on your servers, as we only store them for a limited time.