To generate a PDF with the Placid REST API:
{info} 1 PDF page = 2 credits
Switch to test mode for free watermarked previews!
// - POST to endpoint `https://api.placid.app/api/rest/pdfs`
{
...
"pages": [
{
"template_uuid": "jxac36kja",
"layers": {
"name": {
"text": "Jonathan Doe"
},
"course": {
"text": "has completed the online course « Authentic Business Branding » taught by Frida Baumann on January 24, 2023."
},
"signature-instructor": {
"image": "https://growthacademy.com/assets/instructors/sig/baumann.png"
},
"labelsignature-instructor": {
"text": "Frida Baumann, instructor"
}
},
},
],
...
// Options for filename, size modifications, export,..
}
{
"id": 1,
"status": "queued",
"pdf_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 |
Create a new pdf by using the following endpoint and request structure.
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 | Description |
---|---|---|
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 pdf 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 pdf use the modifications
object. These modifications override the template defaults.
Field | Values |
---|---|
modifications.filename |
Filename of the generated PDF |
modifications.image_quality |
Set image quality level high (default), medium , low |
modifications.dpi |
Define the output DPI of the PDF. Allowed values are 96 (default), 150 , 300 |
modifications.color_mode |
Set to rgb (default) or cmyk |
modifications.color_profile |
Beta feature: We additionally offer the selection of color profiles as a beta feature. If you're interested in testing it, please contact us 💬 Set one of the following color profiles none (default) RGB: rgb-profile-1 - sRGB IEC61966-2.1 rgb-profile-2 - Adobe RGB (1998) rgb-profile-3 - ProPhoto RGB CMYK: cmyk-profile-1 - ISO Coated v2 (ECI) cmyk-profile-2 - ISO Coated v2 300% (ECI v2) cmyk-profile-3 - Coated FOGRA39 300% cmyk-profile-4 - U.S. Web Coated (SWOP 2006) 3v2 cmyk-profile-5 - Japan Color 2cmyk-profile-3011 Coated |
This endpoint allows you to retrieve a PDF by providing their unique id
. Refer to the object at the top of this page to see which properties are included with PDF objects.
Method | URI |
---|---|
GET | https://api.placid.app/api/rest/pdfs/{id} |