> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qwoty.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Quote PDF

> Download a quote PDF (accepted snapshot when available, otherwise official)

## Authorization

**Authorization** `string` *required*

Bearer token for authentication. Format: `Bearer qwoty_your_token`

## Path Parameters

**id** `string` *required*

UUID of the project

## Query Parameters

**force** `boolean` (default: false)

Force PDF regeneration before download. Use `true` to bypass freshness checks.
Ignored when an accepted snapshot is returned.

## Behavior

* If the project is `accepted` and an accepted PDF snapshot exists (`pdf_accepted_storage_path`), that file is returned. The snapshot may come from e-signature (Documenso) or from a manual acceptance (official PDF without signature block).
* Otherwise, the official PDF is returned (generated on demand if needed). Official means downloadable quote PDF without signature block.
* The response is a file download with `application/pdf` content type.

**Source:** `src/app/api/projects/[id]/pdf/route.ts` (kept outside `app/api/(bff)/` as a documented, tool-friendly HTTP contract).

## Examples

```bash cURL theme={null}
curl --request GET \
  --url "https://qwoty.app/api/projects/550e8400-e29b-41d4-a716-446655440000/pdf?force=false" \
  --header "Authorization: Bearer qwoty_your_token" \
  --output quote.pdf
```

```javascript JavaScript theme={null}
const projectId = '550e8400-e29b-41d4-a716-446655440000'

const response = await fetch(
  `https://qwoty.app/api/projects/${projectId}/pdf?force=false`,
  {
    headers: {
      Authorization: 'Bearer qwoty_your_token',
    },
  },
)

if (!response.ok) {
  const error = await response.json()
  throw new Error(error.error)
}

const blob = await response.blob()
```

```python Python theme={null}
import requests

project_id = '550e8400-e29b-41d4-a716-446655440000'

response = requests.get(
    f'https://qwoty.app/api/projects/{project_id}/pdf?force=false',
    headers={
        'Authorization': 'Bearer qwoty_your_token'
    }
)

if response.status_code != 200:
    raise Exception(response.json().get('error', 'Request failed'))

with open('quote.pdf', 'wb') as f:
    f.write(response.content)
```

## Response

**Content-Type** `string`

Always `application/pdf` on success.

**Content-Disposition** `string`

Attachment filename. Example: `quote-Q-2024-001.pdf` or
`quote-Q-2024-001-accepted.pdf`.

```text 200 application/pdf theme={null}
(binary PDF file)
```

```json 404 theme={null}
{
  "error": "Project not found"
}
```

```json 500 theme={null}
{
  "error": "Failed to prepare PDF"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.