PDFs
Besides images, Stencil supports generating PDFs from the same template.
Create a PDF asynchronously
POST
https://api.usestencil.com/v1/pdfs
Request Body
Name | Type | Description |
---|---|---|
modfications | array | Array of modification objects |
metadata | object | Extra metadata to be included together with the webhook |
webhook_url | string | URL of the webhook to be called when the pdf is generated |
template* | string | The ID of the template |
You can send a GET
request to self
to check the status of PDF generation. See the next API for details.
Get the PDF
GET
https://api.usestencil.com/v1/pdfs/:pdf_id
Path Parameters
Name | Type | Description |
---|---|---|
pdf_id* | string | The PDF id. You can get the PDF id from the response of creating a PDF |
For PDF generation, we only support asynchronous request, as PDF generation usually takes a slightly longer time than image generation.
Last updated