Download generated PDFs
Goal
Download a completed submission as a PDF, either a single Form's Response, or the combined PDF for an entire Packet Response, to attach to a chart or archive.
Prerequisites
- An API key pair, see Authentication.
- A completed Response or Packet Response, see Fetch completed form responses or Check packet completion status.
Steps
1. Download a single Form's response PDF
curl -J -O \
--url https://api.app.zentake.com/v2/responses/<response_id>/download \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <your_api_key>' \
--header 'X-API-SECRET: <your_api_secret>'
-J -O saves the file locally using the filename the server provides.
Reference: Download response PDF.
2. Download the combined Packet Response PDF
If the submission was part of a Packet, download the single PDF covering every Form in the packet instead of one download per Form:
curl -J -O \
--url https://api.app.zentake.com/v2/packet_responses/<packet_response_id>/download \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <your_api_key>' \
--header 'X-API-SECRET: <your_api_secret>'
Reference: Download packet response PDF.
There's no GET /v2/packet_responses list or retrieve endpoint. This
download is the only way to reach a packet response directly by id. Get
the packet_response_id from a Response's packet_response field, or
from a webhook payload.
3. (Optional) Look up the source PDF template
If the Form is built on an uploaded PDF template rather than structured questions, you can also fetch the reusable template itself (not a specific Patient's filled instance):
curl --request GET \
--url https://api.app.zentake.com/v2/documents \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <your_api_key>' \
--header 'X-API-SECRET: <your_api_secret>'
Reference: Get documents, Get document by id. See PDF Document for the difference between the template and the filled file.
What success looks like
200 OKwith aContent-Disposition: attachmentheader and a PDF byte stream,curl -J -Owrites it to disk with the server-supplied filename.
Filled PDFs contain the same PHI as the underlying Response, treat downloaded files with the same handling and storage requirements.
Next
- Export intake data to an EHR, for structured CSV export instead of per-submission PDFs.