---
updatedAt: 2025-09-08T14:36:30.000Z
agentTools:
  projectIndex: https://developer.operations1.com/llms.txt
---

# Automate Report-PDF Download

A showcase on how to automatically download PDFs for completed reports with our API

1. **Event Trigger**: When a report is completed, our software can make use of [webhooks](https://developer.operations1.com/docs/what-it-is-and-what-its-for) to trigger something. In this case, our software uses [report-complete webhook](https://developer.operations1.com/docs/webhooks#report-complete-v1) to trigger a script that takes care of the generation of a PDF and exports it using our API.
2. **Start the PDF generation** with the POST request to [/reports/\{reportId}/pdfs](https://developer.operations1.com/reference/generatepdfreportjob) endpoint. This request includes the necessary data, such as the report ID, and export parameters. Our backend starts to generate the PDF file. The returned payload includes the`reportPdfId`, simply called `id` in the payload, which you'll need for the next steps.
3. **Status Monitoring**: After initiating the PDF generation, you can track the status of the report PDF generation by using the [/pdf-jobs/\{pdfJobId}](https://developer.operations1.com/reference/getpdfreportjob) endpoint. Periodically check the status for a `completed`. To be safe regarding [rate limiting](https://developer.operations1.com/docs/rate-limiting), have those checks delayed for 1-2 seconds. If the status changes to `completed`, proceed to the next step. Otherwise, keep checking. The average PDF takes 5-10 seconds to generate. Generating multiple PDFs (e.g. multiple languages) extends the time it takes.
4. **PDF Retrieval**: Once the report PDF generation status is `completed`, make a GET request to [/pdf-jobs/\{pdfJobId}/file](https://developer.operations1.com/reference/getpdfreportfile) to retrieve the PDF file.
5. **PDF Storage**: The downloaded PDF report can be stored in a designated location, making it accessible within your systems.