Self-hosted
Generated downloadable filled-out Joyfill Forms and PDFs with your own internal data.
Intro
In this guide I'm going to show you how to utilize your own internal data with Joyfill Templates to generate downloadable PDFs.
Required Steps
- Complete the steps in the Getting Started docs
- Have your API keys and make sure they have been properly base64 encoded. See Authentication documentation for more details.
- Complete Build Form Template Guide
1. Retrieve document template ID from your library
In our Build Form Template guide we created our first template. We will be utilizing that template with our own custom data to generate a PDF Export.
Navigate to your form library and grab the ID from the template list.

Your IDs will be unique to your organization. Ensure you use the IDs listed in your template library. Do not use the ID from the screenshot above because it will not work for you.
2. Retrieve field identifiers
What are field identifiers? - Field identifiers are a readable ID for mapping your custom data to Joyfill fields. Identifiers can be any string or ID that helps you identify what data belongs to a particular field.
Navigate to the Template builder and select your fields to review their identifiers. My identifiers are: job_number and job_description. If you followed the "Build Form Template" guide you should have the same identifiers set.

3. Prepare HTTP request (postman)
To send our HTTP request we are going to be using postman. Feel free to use whatever tool you want to make an http request to our Export API.
a. Add Export API URL (BETA URL)

b. Configure Authorization
- Type: API KEY
- Key: Authorization
- Value: Basic Base64EncodedKeys
- Add to: Header

c. Add Body
In this step we will pass the information in a JSON body to the export endpoint.
- documentID - Should be the ID from your template library.
- fields - You can pass in an array of objects with an identifier to set any of the associated field properties.
- bonus - Just for fun in addition to populating the value, I'm going to modify a couple of the style properties on the fly as well. Inside the field objects you can overwrite any property supported by the JoyDoc data model.
{
"document": "doc_63e3e090f09ca65b2cecb164",
"fields": [
{
"identifier": "job_number",
"value": "joy100",
"fontColor": "#0096FF",
"textAlign": "center",
"fontWeight": "bold"
},
{
"identifier": "job_description",
"value": "This is an example job to show off Joyfill!"
}
]
}
4. Generate Downloadable PDF
Once you have your http request all ready to go hit the send button or whatever fires off the http request in your own tool.
You should get a response in the following format
{
"download_url": "pdf_download_url"
}
The PDF below was generated from my request. As you can see inside PDF exports I can populate values, change field styles, and do pretty much any modification I want right on the fly. You're no longer restricted by static pre-defined PDFs with Joyfill Exports.

Bonus: Populating Your Pre-existing Legacy PDFs
If you have a PDF or paper based PDF that you need to be able to populate with your own data I have good news! You can do that within Joyfill.
All you need to do is 1) Follow the Support Legacy PDFs guide in order to convert your PDF into a Joyfill template and then 2) follow the same steps listed above.
By walking through this tutorial with your legacy PDFs you will see how quickly and easily you can populate your legacy PDFs with custom data via a simple API request.
Updated about 2 months ago