Synchronous request
Synchronous means that when calling the API the request will wait for the pdf file to be generated before returning a response.
Last updated
Synchronous means that when calling the API the request will wait for the pdf file to be generated before returning a response.
Last updated
Synchronous requests are useful when you want to get the results back immediately.
It is usually easier to use synchronous requests when integrating with no-code solutions such as Zapier.
If your server environment can deal with potentially having many long running connections open at the same time, then synchronous requests might be a good choice.
We recommend using Asynchronous requests for a better performance on your application.
Send a POST request to https://api.pdforge.com/v1/pdf/sync
Body params:
Name | Type | Description |
---|---|---|
The endpoint accepts only JSON data.
It's required to send the templateId
parameter.
If your template has variables, it's also required to send the data
object with your variables.
Request:
This endpoint responds with 200 OK
once the pdf has been generated with the following body:
The response body will contain a signedUrl
key which is a temporary URL pointing to the generated pdf file on our s3 bucket. This URL will expire after 1 hour.
templateId
(required)
string
The id of your pdf template
data
object
The object containg the variables from your pdf template