
# Download an Identity Process PDF

{{<tags>}}

To download the PDF version of an **Identity Process**, the process must be already **completed** by the user. Below are useful guides to help you understand key concepts, create an **Identity Flow**, perform a **Process**, and retrieve **Process Results**:

- {{< newtab href="/guides/di_main_concepts/" >}}DI main concepts{{< /newtab >}}: Understand the core concepts of **Digital Identity**.
- {{< newtab href="/guides/flows_web/" >}}Create an Identity Flow{{< /newtab >}}: Learn how to create an **Identity Flow** using the **Flow Builder** or the {{< newtab href="/guides/di_dashboard/" >}}Web Integration Dashboard{{< /newtab >}}.
- {{< newtab href="/guides/get_result/" >}}Guide to Get Results{{< /newtab >}}: Get **process results** with a query to **Truora's API** or from the **Dashboard**.
- {{< newtab href="/guides/webhook_rule/" >}}Webhooks guide{{< /newtab >}}: Automate actions like retrieving **process results** using webhooks.
---

## Download PDF

### From Truora's Dashboard

1. Go to the **Results** tab in the side menu.

2. Find the process you need from the list and click on it.
   - You may use the search bar on top to find your processes by ID, document number, flow name and more.
   
   {{<img src="/images/illustrations/download_process_pdf/results_view.gif" alt="results_view" width="80%" class="border border-slate-300 rounded-md">}}

3. Click the **Download** button at the upper right of the view.
   {{<img src="/images/illustrations/download_process_pdf/results_pdf.gif" alt="results_pdf" width="80%" class="border border-slate-300 rounded-md">}}

It may take a while for the download to complete. Once it's done, click the downloaded file to open it in a new tab or choose your preferred pdf viewer.

{{<img src="/images/illustrations/download_process_pdf/process_pdf_example.png" alt="example_process_pdf" width="50%" class="border border-slate-300 rounded-md">}}

---

### By means of Truora's API

To download a PDF for a process using Truora’s [API](/docs/), follow these steps:

1. Create a **GET** request to the endpoint `https://api.identity.truora.com/v1/processes/{process_id}/pdf`.

- Replace `{process_id}` in the URL with the `Process ID` obtained from the completed process in **Truora's Dashboard**.

- Alternatively (recommended): Use **Webhooks** to be notified when a process completes and extract the `Process ID` from the response. To learn more about this procedure, visit our {{< newtab href="/digital-identity/web_webhooks/" >}}Webhooks{{< /newtab >}} guide.

2. Include a **Header** named `Truora-API-Key` and set it to your API key.

3. Send the request:
    - If the PDF has not been requested before, the API will return a ``202 Accepted`` with `"file_status": "requested"` response:

  {{<code lang="json" method="GET" endpoint="/v1/processes/{process_id}/pdf" response="202 - Requested">}}
    {
      "file_status": "requested",
    } 
  {{</code>}}

4. Continue polling:

- **While the pdf is being generated:** The API will progress to ``202 Accepted`` with `"file_status": "in_progress"`, 

{{<code lang="json" method="GET" endpoint="/v1/processes/{process_id}/pdf" response="202 - In Progress">}}
    {
      "file_status": "in_progress",
    }
{{</code>}}

- **When the pdf is ready:**

  - The API responds with **302 Found**, automatically redirecting to the PDF file. **\***
  - Finally, a **200 OK** response returns the actual binary file. The response body contains the raw binary data of the PDF file. Ensure your HTTP client handles this data to save or display the PDF correctly.


> **\* NOTE: 302 Redirect Handling**<br>
If the PDF is ready, the API responds with **302 Found** and a **Location** header containing the **PDF URL**. Most HTTP clients (browsers, API libraries) handle redirects automatically. If yours does not, extract the **PDF URL** from the **Location** header and make a **GET** request to the **PDF URL** to download the file.