---
title: "Get invoice PDF download link"
description: "Generate (if needed) and return a signed download URL for the invoice or packing slip PDF. Optionally specify a template."
url: https://docs.invoicefalcon.com/api/documents/get-invoice-pdf-download-link/
api: "API v1 reference"
method: GET
path: "/invoices/{slug}/pdf"
---

# Get invoice PDF download link

`GET https://app.invoicefalcon.com/api/v1/external/invoices/{slug}/pdf`

Generate (if needed) and return a signed download URL for the invoice or packing slip PDF. Optionally specify a template.

## Path parameters

- `slug` (string, required): The invoice's unique slug (UUID).

## Query parameters

- `template_id` (integer): Optional template ID. Falls back to the store's default.
- `packing_slip` (boolean): Set `true` to return the packing slip instead of the invoice. Inferred automatically when `template_id` points at a packing slip template. Packing slips are stored separately, so both documents stay retrievable for the same order.

## Returns

- `invoice` (object)
  - `slug` (string): e.g. `k7xq2m9d4r`
  - `number` (string): e.g. `INV-1042`
  - `pdf_url` (string): Signed download URL.

Rate limit: this call costs 1 point ([rate limits](https://docs.invoicefalcon.com/docs/rate-limiting/)).

## Example request

```sh
curl "https://app.invoicefalcon.com/api/v1/external/invoices/{slug}/pdf" \
  -H "X-Auth-Token: $INVOICE_FALCON_API_KEY"
```

## 200

PDF download link.

```json
{
  "invoice": {
    "slug": "k7xq2m9d4r",
    "number": "INV-1042",
    "pdf_url": "https://invoicefalcon.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZXhhbXBsZSI6dHJ1ZX19/INV-1042.pdf?disposition=attachment"
  }
}
```

## 401

Missing or invalid API key.

```json
{
  "error": "Invalid API key"
}
```

## 403

The store is not on a paid plan. API access requires a paid Invoice Falcon plan.

```json
{
  "error": "REST API access requires a paid plan"
}
```

## 404

Resource not found.

```json
{
  "error": "Not found"
}
```

## 422

Request could not be processed.

```json
{
  "error": "param is missing or the value is empty: customer",
  "errors": {}
}
```

## 429

Rate limit exceeded. Check `X-RateLimit-Reset` header.

```json
{
  "error": "Rate limit exceeded",
  "retry_after": 30,
  "message": "You have exceeded the rate limit of 40 points per 60 seconds. Read requests cost 1 point(s) and write requests cost 2 point(s). Please retry after 30 second(s)."
}
```

