Last updated

Task PDF

When setting up a form within Onboarded, you can upload a PDF template and map inputs from the form to various parts of the PDF. Doing so allows you to retrieve programmatically-generated PDFs with all the fields populated using data from candidates' form submissions. This is helpful when your form is backed by, for example, government-issued PDFs, and you need a filled-out version in the original PDF format for filing or record-keeping.

Task PDFs can be retrieved from both Onboarded Dashboard and via the public API.

API

Task PDFs can be retrieved from the Task-PDF endpoint:

curl -i -X GET 'https://app.onboarded.com/api/v1/tasks/{id}pdf'

If a task has been completed and the associated form has a PDF template, the endpoint will return a binary data blob of the PDF. Please note that PDF is only available upon task completion.

PDF generation happens out-of-band upon task completion. Therefore, if you call the Task-PDF endpoint immediately upon task completion, you may receive a 400 error indicating that the PDF generation is still in progress.

For customers integrating with the Task-PDF endpoint, we recommend subscribing to the task.form_pdf_generated webhook events. This webhook event is sent whenever PDF generation completes for a task. Calling the Task-PDF endpoint upon receiving this webhook ensures your integration will not be affected by potential race condition.

Dashboard

Task PDFs can also be downloaded from the task details view in the Onboarded Dashboard (as shown below): task_pdf.png

Special Considerations

Whenever a task is completed, re-opened (via change request), and then completed again, a new PDF will always be generated to represent the current state of the task submission data. Both the dashboard and the API will always return this latest PDF. Therefore, if your integration both creates task change requests and retrieves task PDF, you will definitely want to listen to task.form_pdf_generated to ensure you're getting the latest PDF whenever a task is re-completed.

To learn more about task lifecycle and change requests, check out this guide.